fix(scan): classify missing release file and add --tag to local scans - #356
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smith-xyz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR Summary by QodoFix local scans: classify missing /etc/redhat-release and add --tag identity
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1.
|
|
/override ci/prow/payload-scan-5-0 this is to fix that issue, will need a change in openshift/release |
|
@smith-xyz: Overrode contexts on behalf of smith-xyz: ci/prow/payload-scan-5-0 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@smith-xyz: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
Summary
/etc/redhat-releasedetected viaLstatasErrDistributionFileMissinginstead of leaking a raw lstat error that noconfig exception can match (previously only the
ReadFilepath wasclassified).
--tagflag toscan localso tag-scoped config exceptions (e.g.[[tag.agentic-skills.ignore]]) can apply. Local scans previously used anempty mock tag name, making every tag ignore unreachable. The tag carries
identity only — the scan root remains
--pathand is never resolved to a<path>/<tag>subdirectory (pinned by test).payload-scan-5-0smoke test failure on theagentic-skillsFROM-scratch data-only image: no OS layer, zero binaries, and the existing
ErrOSNotCertifiedtag ignore could not fire underscan local.Without
--tag, behavior is unchanged: the mock tag name stays empty, noignores match, and the scan root normalization (
filepath.Clean) is identicalto the previous
filepath.Join(path, "").Companion openshift/release change passes the tag name per image in the
payload-scan-*steps; this PR must merge first since old binaries reject thenew flag.