Fix failing Anchore Container Scan: upgrade scan-action v3 → v7 - #5
Merged
Conversation
The scheduled Anchore Container Scan job was failing because
anchore/scan-action@v3 pins grype v0.74.4, which relies on the legacy
Grype vulnerability DB (schema v5). Anchore has deprecated that schema,
so the DB served to the old grype is now stale:
db could not be loaded: the vulnerability database was built
18 weeks ago (max allowed age is 5 days)
Grype then exits without writing results.sarif, and the
upload-sarif step fails with 'Invalid SARIF. Unexpected end of JSON input'.
Upgrade to anchore/scan-action@v7, which bundles a current grype that
uses the maintained DB (schema v6). In v7 the SARIF report is written to
a temp dir and exposed via the step output rather than a fixed
results.sarif, so reference ${{ steps.scan.outputs.sarif }} in the
upload step.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJEgmMAsLQtv4PUiuFXJx1
kjake
marked this pull request as ready for review
July 18, 2026 01:56
kjake
pushed a commit
that referenced
this pull request
Jul 18, 2026
Resolve conflicts from master's Anchore fix (PR #5) and Dependabot action bumps (PR #7): - .github/workflows/anchore.yml: keep scan-action@v7 (master's newer fix) over this branch's @v6; the rest (checkout@v7, buildx@v4, build-push@v7, codeql upload@v4) came from master's bumps. - .github/workflows/docker.yml: take master's setup-qemu-action@v4 bump while keeping this branch's functional QEMU image pin (tonistiigi/binfmt:qemu-v8.1.5) and its explanatory comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJEgmMAsLQtv4PUiuFXJx1
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.
Problem
The scheduled Anchore Container Scan job has been failing. From the failing run's logs:
Root cause
anchore/scan-action@v3pins grype v0.74.4, which depends on the legacy Grype vulnerability database (schema v5). Anchore has deprecated that schema, so the DB served to old grype is now badly stale (18 weeks old vs. the 5-day max). Grype aborts without writingresults.sarif, and the subsequentupload-sarifstep then fails parsing an empty file (Unexpected end of JSON input).Fix
anchore/scan-action@v3→@v7, which bundles a current grype that uses the maintained DB (schema v6).sarifoutput instead of a fixedresults.sarif, so the scan step now hasid: scanand the upload step references${{ steps.scan.outputs.sarif }}.All scan parameters (
fail-build: false,severity-cutoff: critical,only-fixed: true) are preserved.Verification
Once merged (or via
workflow_dispatch), the job should complete: grype loads a fresh DB, emits valid SARIF, and the report uploads to code scanning.🤖 Generated with Claude Code
https://claude.ai/code/session_01PJEgmMAsLQtv4PUiuFXJx1
Generated by Claude Code