Skip to content

fix(security-insights): make the insights file parseable and unset the image exec bit - #331

Open
mesutoezdil wants to merge 1 commit into
Project-HAMi:mainfrom
mesutoezdil:fix/osps-security-insights
Open

mesutoezdil wants to merge 1 commit into
Project-HAMi:mainfrom
mesutoezdil:fix/osps-security-insights

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

security-insights.yml targeted the unreleased 2.2.0 spec, where in-scope and out-of-scope are declared as string lists but generated as a single *URL, so si.Load rejected the whole file and every Baseline check reading it degraded, including OSPS-QA-04.01 reporting no repository list when both are present; it now declares 2.1.0, uses security-policy in place of policy, folds the scope text into the neighbouring comment, and passes both cue vet against the v2.1.0 schema and si.Load.

docs/images/sample_nvidia-smi.png was committed as mode 100755 and the scanner treats a binary blob carrying an execute bit as a generated executable artifact, which is why it tripped OSPS-QA-05.01 while docs/images/hami-core-arch.png at 100644 did not, so the mode is now 100644 with the content byte-identical.

@hami-robot

hami-robot Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mesutoezdil
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a8cb41fc-bb35-4fc7-91df-c98665fca5ff

📥 Commits

Reviewing files that changed from the base of the PR and between 2c5c03d and 47aa194.

⛔ Files ignored due to path filters (1)
  • docs/images/sample_nvidia-smi.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • security-insights.yml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The security insights configuration updates its schema metadata and review dates. It also replaces structured vulnerability scope fields with a security-policy URL and a prose comment.

Changes

Security insights configuration

Layer / File(s) Summary
Metadata and policy update
security-insights.yml
The schema version changed from 2.2.0 to 2.1.0. The update and review dates changed to 2026-09-15. Vulnerability scope rules now use security-policy and comment fields.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b6d21

The configuration parses successfully and the permission-only image change does not alter behavior; this PR is mergeable.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies both main changes: making the Security Insights file parseable and removing the image executable bit.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the policy page
Dates hop forward on the page
Scope rules gather in one note
Three exclusions share one coat
The security file rests in shape

Comment @coderabbitai help to get the list of available commands.

…e image exec bit

The OpenSSF Security Insights reader (ossf/si-tooling, used by LFX Insights
through ossf/pvtr-github-repo-scanner) rejected the whole file, so every
Baseline check that reads it fell back to a failure or a manual review,
including OSPS-QA-04.01 "Insights does not contain a list of repositories"
even though the repositories are listed.

Two problems, both from targeting the unreleased 2.2.0 spec:

  in-scope and out-of-scope are declared as string lists in the spec but the
  generated Go type annotates them as a single URL, so a list fails to
  unmarshal and aborts the load. The scope text moves into the neighbouring
  comment, which carries the same information.

  policy only exists on the spec's unreleased main branch. 2.1.0 is the
  latest tag, so the file now declares 2.1.0 and uses security-policy, which
  the reader maps onto the same field.

The file now passes both cue vet against the 2.1.0 schema and si.Load.

docs/images/sample_nvidia-smi.png was committed as 100755. The scanner flags a
binary blob carrying an execute bit as a generated executable artifact, which
is why that PNG tripped OSPS-QA-05.01 and docs/images/hami-core-arch.png, the
same format at 100644, did not. Content is unchanged.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil
mesutoezdil force-pushed the fix/osps-security-insights branch from 47aa194 to b6d2102 Compare September 15, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant