Repository navigation
ci: upload only fixable scan findings - #202
Merged
Merged
Conversation
Upload only findings that have a fix (ignore-unfixed) to code scanning from the shared scan-image action, so that the alerts show what can be acted on. A new report input uploads a full report, findings without a fix included, as a workflow artifact (JSON and table); the weekly scan sets it. The action is identical to the FOCA copy again (repository-neutral header) and the docs describe the change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR changes the shared image-scan action so SARIF uploads contain only fixable findings, while scan failure behavior remains focused on fixable critical and high findings. It adds an opt-in full JSON/table report artifact, enabled for weekly scans, and updates workflow comments and operational/development documentation to explain the two reporting paths. Flow diagram for fixable findings and full scan reportsflowchart TD
A[Trivy scans image] --> B{report enabled?}
A --> C[Fixable findings]
C --> D[Upload SARIF to code scanning]
C --> E[Fail on fixable critical and high findings]
B -->|true| F[Full findings including unfixed]
F --> G[Write trivy-report.json]
F --> H[Write trivy-report.txt]
G --> I[Upload trivy-report-category artifact]
H --> I
B -->|false| J[No full report artifact]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #202 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 1136 1136
=========================================
Hits 1136 1136 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
uniqueg
marked this pull request as ready for review
October 23, 2026 14:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/actions/scan-image: the SARIF upload to code scanning contains only findings that have a fix (ignore-unfixed: true). This applies to every scan that uploads (pull requests and pushes todevinchecks.yaml, the weekly scan inscan.yaml); the release scan does not upload and is unchanged. Findings without a fix show up as alerts once a distribution ships a fix. Failing on fixable critical and high findings is unchanged.report(default"false"): uploads a full report, findings without a fix included, as the workflow artifacttrivy-report-<category>(trivy-report.jsonandtrivy-report.txt, a table). It is not uploaded to code scanning. The weekly scan (scan.yaml) sets it, so each run has atrivy-report-release-imageartifact.docs/operations.md) and the image scan section ofdocs/development.mddescribe what code scanning shows and where the full report is. Comments inchecks.yamlandscan.yamlupdated.Light lane: CI-only change without secrets or permission changes (the artifact upload needs no extra permission); the release workflow is not touched. I reviewed the diff myself.
Existing alerts for unfixed findings: code scanning closes alerts that are missing from the next analysis of the same category on the same ref. After the merge, the push to
dev(categoryimage) and a manual run of the weekly scan (categoryrelease-image, default branchdev) should close them; I will check with the code scanning API.Verification
pre-commit run --files <changed files>: all hooks passed (check-yaml, actionlint, semgrep, gitleaks, ...).mkdocs build --strict: passed.diffof.github/actions/scan-image/action.ymlwith the FOCA branch: identical.dev.Declined review findings
ignore-unfixedand are uploaded. Intended: a secret in an image can always be acted on (remove and rotate it), and critical and high secrets already fail the scan; accepted secrets stay out via.trivyignore.yaml.Open questions
None.
Closes #201
🤖 Generated with Claude Code
Summary by Sourcery
Upload only actionable Trivy findings to code scanning while preserving complete scan reports as optional workflow artifacts.
New Features:
Bug Fixes:
CI:
Documentation: