Skip to content

ci(trivy): report amd64 image vulnerabilities to GitHub Security - #686

Merged
jmclong (jmclong) merged 3 commits into
mainfrom
fix/trivy-db-throttling
Oct 29, 2026
Merged

jmclong (jmclong) merged 3 commits into
mainfrom
fix/trivy-db-throttling

Conversation

@jmclong

@jmclong jmclong (jmclong) commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Scan rendered CSI sidecar images on linux/amd64 only; driver and manager scans already use amd64.
  • Remove the ECR-only vulnerability database override, using the default Google mirror with GHCR fallback.
  • Upload SARIF reports for the driver, manager, and all three sidecars on main and pull requests, using distinct analysis categories.
  • Use report-only vulnerability scans, matching the DACS reporting pattern without its separate critical-vulnerability blocking step.
  • Preserve ignore-unfixed filtering. Vulnerability findings, including critical findings, do not fail scan jobs; scanner and upload errors still fail.
  • Update the chart README. CodeQL and DevSkim workflows are unchanged.

Reason

Run 40670127144 failed downloading the vulnerability database from public ECR with TOOMANYREQUESTS: Data limit exceeded. Default mirrors avoid forcing every scan through that single registry. SARIF uploads make findings available for triage in GitHub Security instead of failing scan jobs for the existing vulnerability backlog.

Validation

  • All commit-time pre-commit hooks passed, including actionlint, zizmor, Markdown/link checks, and Helm validation.
  • A fresh database download with Trivy 0.70.0, matching the pinned action default, succeeded from mirror.gcr.io/aquasec/trivy-db:2.
  • A report-only scan of alpine:3.18.0 generated SARIF 2.1.0 with 49 findings, including one critical finding, and exited successfully.
  • A missing-database test confirmed scanner initialization errors still fail with exit-code set to 0.
  • git diff --check passed.
  • Go builds and unit tests were not run because only workflow configuration and documentation changed. GitHub SARIF ingestion requires the hosted CI run.

Coverage

ARM64 sidecar images are intentionally no longer scanned by this workflow. Architecture build and test workflows are unchanged. This PR adds no vulnerability-severity gate and does not alter repository branch-protection or code-scanning rules.

Limit sidecar vulnerability scans to linux/amd64 and remove the ECR-only database override from all image scans. Keep vulnerability failure settings unchanged and update the chart documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2b22cc4d-c0c5-4ee7-9bac-ce9a8221fe37
Upload separate SARIF analyses for the driver, manager, and each sidecar on main and pull requests. Preserve fixable-vulnerability filtering without adding a critical-severity blocking step. Scanner and upload errors remain failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2b22cc4d-c0c5-4ee7-9bac-ce9a8221fe37
@jmclong jmclong (jmclong) changed the title ci(trivy): scan amd64 and use default database mirrors ci(trivy): report amd64 image vulnerabilities to GitHub Security Oct 28, 2026
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2b22cc4d-c0c5-4ee7-9bac-ce9a8221fe37

@hasethuraman Hari (hasethuraman) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI jmclong (@jmclong) After PR #686:
Scans still run and still find the same vulnerabilities.
They write SARIF and upload it with github/codeql-action/upload-sarif.
exit-code is set to 0, so the job succeeds even when critical findings exist.
Those findings become code scanning alerts instead of failing the build.

@jmclong
jmclong (jmclong) merged commit 13ee2cb into main Oct 29, 2026
26 checks passed
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.

3 participants