Repository navigation
chore(workflows): pin every toolbox image by digest - #73
Merged
Merged
Conversation
garymike
force-pushed
the
chore/pin-toolbox-digests
branch
from
September 30, 2026 02:52
c2fff03 to
017366b
Compare
sast, iac-security, gha-security and skill-audit pulled their domain image by :latest, so a toolbox rebuild silently changed what every caller scanned with -- the failure mode the digest pin in security-scan.yml exists to prevent (betterleaks 1.6.1 -> 1.8.1 in #64 turned green repos red overnight). All four now pin by digest, with the same rationale comment. security-scan.yml's own pin is bumped in the same commit. It still referenced 5614f8b9, the base image built before the #67 and #70 tool bumps, so it had drifted from tools.lock -- exactly what its comment says not to let happen. Every digest here comes from build 36661628989, the rebuild after #75, which is the first run in which all six images published: the Trivy publish gate had been rejecting sast and skill-audit over CVE-2026-102268 until PyJWT was fixed. These five now move deliberately, alongside toolbox/tools.lock. dogfood-scan is untouched -- it builds from source at :ci tags and never pulls from the registry.
The image input advised pinning by digest while defaulting to :latest. Keeping the mutable default is deliberate, and is the one place this repo should not follow the digest rule: this is a public action, and pinning its default would freeze external callers on a digest they never chose and silently stop their scanner updates. The reusable workflows pin because their images are bumped here, deliberately, alongside tools.lock; a third party has no such cadence. So the description now says what the default actually does and offers pinning as the opt-in, rather than advising one thing and doing another.
garymike
added a commit
that referenced
this pull request
Oct 19, 2026
) #73 made these digest pins deliberate on purpose: a rebuild must not silently change what every caller scans with, after betterleaks 1.6.1 -> 1.8.1 in #64 turned green repos red overnight. Its commit message says they "move deliberately, alongside toolbox/tools.lock". They did not move. #80 bumped eight tools and #81 bumped SkillSpector v2.3.11 -> v2.13.0, both rebuilt and published, and neither touched these five lines. My #81 is half of that omission. Measured, not inferred: skill-audit.yml pinned 6f5f4c48 -> SkillSpector v2.3.11 (tools.lock: 2.13.0) security-scan.yml pinned 5bfad328 -> betterleaks 1.8.1 (tools.lock: 1.9.0) So every caller of these reusable workflows was scanning with the Oct-1 toolchain while tools.lock claimed otherwise. All five now point at the digests the b0d54d4 build published, each one confirmed present in that build's output (run 39298358613) rather than read off a local pull: podman inspect reports the platform manifest digest, which differs from the registry index digest for the images whose latest index carries attestations, and build-push-action's own output digest is the convention #73 used. Ordering note for the sibling repos: security-agents#22 and skills#32 refresh their reusable-workflow pin to 0fd7cac. Those must land AFTER this, or they move both repos off :latest and onto the stale digests this fixes. I tried adding a drift check for this and pulled it back out. Comparing the pin against the registry's :latest index digest false-reds on exactly the two attestation-bearing images, and a gate that cries wolf is worse than the manual step it replaces. The right home is build-toolbox.yml, which already holds both the digest it just built and the pin, but that is the publish path and #73 deliberately kept it clean. Left as a decision, not a half-gate. Co-authored-by: Claude Opus 5 <[email protected]>
garymike
added a commit
that referenced
this pull request
Oct 19, 2026
Applied with the repo's own tooling rather than by hand, so the lock and the Dockerfile ARG move together by construction: bash scripts/check-tool-updates.sh --emit-drift drift.tsv python3 scripts/apply-tool-bumps.py drift.tsv . Verified before opening: v3.99.3 is upstream's latest, published today, not a prerelease, and both assets the Dockerfile fetches exist. Built toolbox/base locally at the new pin -- the build verifies the published sha256 under `set -eux`, so it passing is the checksum passing -- and the image reports trufflehog 3.99.3 with betterleaks 1.9.0, osv-scanner 2.7.0 and syft 1.54.1 unchanged. syft 1.54.1 -> 1.55.0 also drifted while this was being prepared. Left alone deliberately: it was not part of the request, and a bump nobody asked for is how an unreviewed version reaches six images. Follow-up, per #73 and #82: merging this publishes new images, which leaves the five reusable-workflow digest pins behind again. They have to move in a second PR once the build has published, because the digest does not exist until then. That two-step is the loop that lapsed twice already. Co-authored-by: Claude Opus 5 <[email protected]>
garymike
added a commit
that referenced
this pull request
Oct 19, 2026
…yft bumps (#85) The second half of #83 and #84, done once for both rather than twice. Per #73 these pins move deliberately alongside toolbox/tools.lock; the new digest does not exist until the merge has published, so it is always a follow-up commit. Digests taken from the 6c5e9c5 build's own cosign step (run 39321887780), which is steps.build.outputs.digest -- the convention #73 used. Deliberately NOT from `podman inspect`: that reports the platform manifest digest, which differs from the registry index digest for images whose latest index carries attestations, and in #82 three of five happened to agree and two did not. Each of the five pins is asserted equal to the digest that build emitted for that image. Verified the images behind the new pins actually carry the bumps: security-toolbox-base ships trufflehog 3.99.3 and syft 1.55.0 (betterleaks 1.9.0 and osv-scanner 2.7.0 unchanged), and skill-audit-toolbox still ships SkillSpector v2.13.0. Third time this step has been needed and the second time it was remembered. The control for it still does not exist; see the note in #82 about build-toolbox.yml being the right home, since it already holds both the digest it just built and the pin sitting in the tree. Co-authored-by: Claude Opus 5 <[email protected]>
garymike
added a commit
that referenced
this pull request
Oct 21, 2026
…ublished (#88) Fourth time today the five reusable-workflow digest pins went stale, so the manual step gets a control. #73 made those pins deliberate on purpose: a rebuild must not silently change what every caller scans with, after betterleaks 1.6.1 -> 1.8.1 in #64 turned green repos red overnight. The cost of "deliberate" is that nothing moves them for you, and nothing reminded anyone either. #80 bumped eight tools and #81 bumped SkillSpector, both published, neither moved the pins, and callers kept getting the previous toolchain while tools.lock said otherwise. #82 was the cleanup. Every toolbox/** change since has put them behind again, including #87 and #86. Each build job now records the digest it published, and a new `pins` job compares those against the pin in the matching reusable workflow. Two design points that are the whole reason this works: It is a SEPARATE job, after base and domain, so publishing is never blocked. It cannot be blocked: the digest to pin does not exist until the publish has happened, so failing the publish on a stale pin would be circular. The images ship, and the run still goes red, so the follow-up is not optional. Same contract as tool-drift.yml: red means a pin is behind, not that anything is broken. It reads steps.build.outputs.digest rather than the registry. Comparing against the `latest` index digest false-reds on images whose index carries attestations, which is exactly why I pulled the equivalent check back out of check-tool-updates.sh in #82 rather than ship a flaky gate. The build already holds both halves, so no lookup and no ambiguity. mcp-review-toolbox is built here but no reusable workflow pins it, so it is reported as unpinned rather than counted as a mismatch. Verified by running the comparison standalone against three scenarios: all pins matching exits 0; two behind exits 1 with both named in ::error:: and marked in the job summary; and no digest files at all exits 1 saying the pins were NOT verified, rather than passing quietly, which is the failure mode that let this go unnoticed in the first place. actionlint clean, zizmor clean. Co-authored-by: Claude Opus 5 <[email protected]>
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.
Rebuilt on current
mainafter #74, #75 and #76. The earlier version of this branch pinned pre-bump digests and was stale; it has been reset and replaced.Four reusable workflows pulled their domain image by
:latestwhilesecurity-scan.ymlpinned the base by digest. That pin exists for a documented reason — betterleaks 1.6.1 → 1.8.1 (#64) added rules and turned green repos red overnight with no caller changing a line — and semgrep, checkov, zizmor/actionlint and SkillSpector were all still exposed to exactly that.Every image now pinned
sast.yml99efabd29e94iac-security.ymle2da68281d64gha-security.ymle6dbea9b2383skill-audit.yml6f5f4c48e1d3security-scan.yml5bfad3287049security-scan.ymlis included because its own pin had drifted: it still referenced5614f8b9, the base image built before the #67 and #70 tool bumps, which is precisely what its comment says not to allow. That correction rides along here rather than in a separate commit.Every digest comes from build 36661628989 — the rebuild after #75, and the first run in which all six images published. The Trivy publish gate had been rejecting sast and skill-audit over CVE-2026-102268 until PyJWT was fixed, so before #75 there were no digests to pin for those two.
Left on :latest, deliberately
actions/toolbox-scan/action.ymlkeeps its mutable default. This is the one place the digest rule should not apply: it is a public action, and pinning its default would freeze external callers on a digest they never chose and silently stop their scanner updates. The reusable workflows pin because their images are bumped here, deliberately, alongsidetools.lock— a third party has no such cadence. Its description contradicted its default, so the description changed, not the default.dogfood-scan.ymlis untouched — it builds images from source at:citags and never pulls from the registry.Consequence worth naming
These five pins now have to move deliberately, alongside
toolbox/tools.lock. That is the intended trade, but it makes the follow-up repin a standing obligation after every toolbox rebuild rather than an optional tidy-up — the same gap that leftsecurity-scan.yml19 days stale. Worth havingbuild-toolboxopen a repin PR automatically so the bump stays a human decision without depending on someone remembering.