Repository navigation
feat(ci): give tool drift its own gate instead of a buried warning - #63
Merged
Merged
Conversation
The toolbox pins eleven tools by download URL and commit SHA, not by a package manifest, so Dependabot cannot see a single one of them. check-tool-updates.sh is the only thing that watches them, and it was already running weekly. It just could not fail. It ran inside build-toolbox.yml as `... || true`, against a script whose own header called it "non-blocking" and which used `set -uo pipefail` with no `-e`. Belt and braces, both saying the same thing: advice. Nine of eleven pins drifted unnoticed until CVE-2026-56854 in a vendored Go binary broke the build. A warning on a green job reads exactly like no warning at all, which is the failure this repo's own README describes for everyone else's scanners. So drift now gets a status of its own. tool-drift.yml runs weekly at 08:00, after build (06:00) and dogfood (07:00), and runs the script with a new --fail-on-drift flag that exits 3. It is a separate workflow on purpose: drift is deliberately kept off the release path, so a stale pin turns one badge red without ever blocking an image from shipping. The script keeps its advisory default for local use. Also in the script: - A tool listed once per image that ships it (semgrep appears under both skill-audit and sast) made `pinned` return two lines, which is why the output read "pinned at 1.168.0\n1.168.0". Values are deduplicated, and two DIFFERENT versions for one tool is now reported as an error rather than silently resolved by taking the first. - An unresolvable upstream used to print a quiet "(skipped)" that looked like a pass. It now says the check was NOT verified, so a network blip cannot read as "up to date". - Writes a table to $GITHUB_STEP_SUMMARY, so the state is legible without opening a log. Unrelated one-liner found while pinning the new workflow: ai-review.yml pinned checkout to the same SHA as everywhere else but commented it # v4, where that SHA is v7.0.1. Corrected, since a version comment that misstates the pin is worse than none in a repo built on pin hygiene. Validated with the repo's own gha-toolbox: actionlint silent, zizmor reports no findings.
4 tasks done
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.
The toolbox pins eleven tools by download URL and commit SHA, not by a package manifest, so Dependabot cannot see a single one of them.
check-tool-updates.shis the only thing that watches them, and it was already running weekly. It just could not fail.Why it never caught anything
It ran inside
build-toolbox.ymlasbash scripts/check-tool-updates.sh || true, against a script whose own header called it "non-blocking" and which usedset -uo pipefailwith no-e. Belt and braces, both saying the same thing: advice.Nine of eleven pins drifted unnoticed until CVE-2026-56854 in a vendored Go binary broke the build (#62). A warning on a green job reads exactly like no warning at all — which is the failure this repo's own README describes for everyone else's scanners.
What this changes
tool-drift.ymlruns weekly at 08:00, after build (06:00) and dogfood (07:00), invoking the script with a new--fail-on-driftflag that exits 3.It is a separate workflow on purpose. Drift is deliberately kept off the release path, so a stale pin turns one badge red without ever blocking an image from shipping. The script keeps its advisory default (exit 0) for local use.
Expect it to be red on first run — eight pins are currently behind. That is the true state, and the point.
Three script fixes along the way
semgrepappears under both skill-audit and sast) madepinnedreturn two lines, which is why the earlier output readpinned at 1.168.0\n1.168.0. Values are now deduplicated, and two different versions for one tool is reported as an error rather than silently resolved by taking the first.(skipped)that looked like a pass. It now says the check was NOT verified, so a network blip cannot read as "up to date".$GITHUB_STEP_SUMMARY, so state is legible without opening a log.Unrelated one-liner
ai-review.ymlpinned checkout to the same SHA as everywhere else but commented it# v4; that SHA is v7.0.1 (verified against the tag refs). Corrected, since a version comment that misstates the pin is worse than none in a repo built on pin hygiene.Verification
--fail-on-driftexit 3 against current driftsemgrepnow reports cleanly as1.168.0 → 1.176.1, andsyftcorrectly shows current after fix(toolbox): unbreak main on CVE-2026-56854, fix syft, VEX the rest #62gha-toolbox: actionlint silent, zizmorNo findings to reportactions/checkouttag refs rather than copied from memoryMG <[email protected]>