Skip to content

CP-47362: Report grype findings in the CI log - #1003

Merged
evan-cz merged 2 commits into
CP-47350-go-1267from
CP-47362-grype-output
Sep 4, 2026
Merged

CP-47362: Report grype findings in the CI log#1003
evan-cz merged 2 commits into
CP-47350-go-1267from
CP-47362-grype-output

Conversation

@evan-cz

@evan-cz evan-cz commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1001.

A failing image scan currently reports only that findings exist at or above the threshold, never which package or advisory tripped it. anchore/scan-action defaults to writing SARIF to a temporary file and printing nothing; nothing in either workflow consumes that file, and the runner discards it when the job ends.

Diagnosing a failure therefore means reproducing the scan locally against a private registry — which needs a working Docker daemon and registry credentials, and silently produces an empty catalogue when either is missing. An empty catalogue reads as a clean result, which is actively misleading.

Setting output-format: table puts the findings in the step log. Applied to both the pull request gate and the scheduled scan in scan-images.yml, which had the same default.

No functional change to what is scanned or what fails the build.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes high-severity image-scan findings visible in CI logs while retaining the existing failure behavior, and updates the bundled Prometheus config reloader and its vulnerability override.

  • Configures both image-scan workflows to emit table output.
  • Updates prometheus-config-reloader from v0.91.0 to v0.93.1.
  • Replaces the previous x/crypto, x/net, and x/text overrides with an x/crypto v0.56.0 override.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/docker-build.yml Adds supported table-formatted scan output without changing the high-severity build gate.
.github/workflows/scan-images.yml Adds the same table output to scheduled image scans while preserving existing scan semantics.
docker/Dockerfile Updates the bundled config reloader and adjusts its Go module vulnerability override; the build toolchain and invoked CLI flags remain compatible.

Reviews (7): Last reviewed commit: "CP-47363: Upgrade prometheus-config-relo..." | Re-trigger Greptile

@evan-cz
evan-cz force-pushed the CP-47362-grype-output branch 2 times, most recently from a663d19 to 12ed1bf Compare September 4, 2026 18:03
@evan-cz

evan-cz commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Rebuilding against the re-tagged ghcr.io/cloudzero/alloy:v1.19.2-patch-1, which now carries the etcd v3.6.14 fix for GO-2026-6107. No change to this branch — the tag moved, the pin did not.

@evan-cz
evan-cz force-pushed the CP-47362-grype-output branch from 12ed1bf to 12597b4 Compare September 4, 2026 18:41
@evan-cz
evan-cz force-pushed the CP-47362-grype-output branch from 12597b4 to bf342e4 Compare September 4, 2026 18:59
Makes a failing image scan say what it found. The scan action defaults
to writing SARIF to a temporary file and printing nothing, so a failure
reports only that findings exist at or above the threshold. The file is
discarded when the runner is torn down, leaving no way to learn which
package or advisory tripped the gate short of reproducing the scan
locally against a private registry.

Nothing in either workflow consumes the SARIF, so the format is switched
to the table, which the action writes to the step log.

Applied to the pull request gate and the scheduled image scan, which had
the same default.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brings the bundled config reloader up two minor versions, from v0.91.0,
picking up upstream's own dependency work and clearing the three
high-severity x/crypto findings that were blocking the image scan.

This binary is built from upstream prometheus-operator source, so its
dependency versions are upstream's rather than this repository's, and
the build carries go get overrides for the ones upstream has not caught
up on. Those overrides name exact versions, so each goes stale as new
advisories land against the version it names. That had already
happened: the override named x/crypto v0.53.0, which has since had
three advisories filed against it, so the line written to clear
findings had become the reason for them.

Upgrading lets two of the three surviving overrides go. Upstream now
ships x/net v0.57.0 and x/text v0.40.0, both ahead of what the old pins
asked for, so keeping those would have downgraded them. Only x/crypto
still needs raising.

No etcd override is added. The image scan reports an etcd advisory, but
that dependency reaches the image through the bundled Alloy binary
rather than this one, so an override here cannot affect it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@evan-cz
evan-cz merged commit 871ac69 into CP-47350-go-1267 Sep 4, 2026
19 checks passed
@evan-cz
evan-cz deleted the CP-47362-grype-output branch September 4, 2026 21:38
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.

2 participants