Repository navigation
ci: scan the release binary, docker image and main build with trivy - #26
Merged
Merged
Conversation
…dependabot monthly and grouped
katbyte
force-pushed
the
kt/binary-sec-checks
branch
from
September 23, 2026 17:06
f3ad986 to
9a004ea
Compare
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.
Scan the last released binary, the published docker image and a fresh build of main with trivy, on every push to main and weekly. Dependabot moves to monthly grouped PRs. Same setup as katbyte/tctest#146, #149 and katbyte/terrafmt#129, plus an image job since this repo ships one.
Why: govulncheck only reports advisories whose code is actually reachable, so it is green while the shipped v0.3.2 binary and image carry a High x/text advisory that version-based scanners flag. Nothing today turns main red for "what users are running has a known vulnerability".
Three jobs, so the red X says what to do. Each is its own check on the main commit.
release binarydownloads the latest release's linux_amd64 tarball and scans it. Red means cut a release.release imagescansghcr.io/katbyte/ghp-sync:latest, which covers the go binary plus the alpine packages and the gh binary around it. Red means cut a release to rebuild on current alpine.build of mainbuilds the commit and scans that. Red means bump a dependency.Release red with main green means the fix is merged and a tag is all that is left.
A release reruns the failed scan in place. A last job in the release workflow finds every binary scan run on main's head that failed and reruns its failed jobs, so the red check runs are replaced rather than joined by a new green one. It waits for both the tarball and the image to publish.
The image upgrades alpine packages when built. Without this, a release rebuild keeps whatever openssl the base image tag was last built with, and the image job could stay red with no way to clear it. Checked locally: on
alpine:3.24the upgrade moves libcrypto3 from 3.5.7-r0, which trivy flags, to 3.5.8-r0.x/text is bumped so main starts green. The v0.3.2 binary and image both flag CVE-2026-56852 (x/text 0.28.0, fixed in 0.39.0). ghp-sync never calls the affected code, but the binary scans clean at 0.42.0. Verified locally with the same trivy flags: the v0.3.2 tarball reports the finding, a build of this branch reports none.
Dependabot runs monthly with one PR per ecosystem. The codeql-only group is subsumed by the catch-all, which still keeps init and analyze on the same version.
Things that are fine as they are
release binaryandrelease imagejobs to be red until the next release. That is the workflow working. The image job will also flag openssl in the current image until a rebuild..github/trivyignorewith a reason. It is empty.alpine:3.24container instead.