Skip to content

feat(ci): give tool drift its own gate instead of a buried warning - #63

Merged
garymike merged 1 commit into
mainfrom
feat/tool-drift-gate
Sep 8, 2026
Merged

garymike merged 1 commit into
mainfrom
feat/tool-drift-gate

Conversation

@garymike

@garymike garymike commented Sep 8, 2026

Copy link
Copy Markdown
Owner

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.

Why it never caught anything

It ran inside build-toolbox.yml as bash scripts/check-tool-updates.sh || 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 (#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.yml runs weekly at 08:00, after build (06:00) and dogfood (07:00), invoking 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 (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

  • Duplicate pins. 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 earlier output read pinned 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.
  • Unresolvable upstream printed 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".
  • Job summary. Writes a markdown table to $GITHUB_STEP_SUMMARY, so state is legible without opening a log.

Unrelated one-liner

ai-review.yml pinned 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

  • Both exit modes confirmed locally: default exit 0, --fail-on-drift exit 3 against current drift
  • Summary table renders; semgrep now reports cleanly as 1.168.0 → 1.176.1, and syft correctly shows current after fix(toolbox): unbreak main on CVE-2026-56854, fix syft, VEX the rest #62
  • Linted with the repo's own gha-toolbox: actionlint silent, zizmor No findings to report
  • Checkout pin verified against actions/checkout tag refs rather than copied from memory
  • All three touched workflows still parse as valid YAML
  • Every added line em-dash and en-dash free; commit signed as MG <[email protected]>

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.
@garymike
garymike merged commit d7cb0de into main Sep 8, 2026
9 checks passed
@garymike
garymike deleted the feat/tool-drift-gate branch September 8, 2026 00:16
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.

1 participant