Skip to content

chore(workflows): move the five image pins alongside the tool bumps - #82

Merged
garymike merged 1 commit into
mainfrom
chore/refresh-workflow-image-digests
Oct 19, 2026
Merged

garymike merged 1 commit into
mainfrom
chore/refresh-workflow-image-digests

Conversation

@garymike

Copy link
Copy Markdown
Owner

The gap

#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 their images. Neither touched these five lines. #81 was mine, so half of this is my omission.

Measured by running the pinned images, not inferred from the diff:

workflow pin what it actually ships tools.lock says
skill-audit.yml → 6f5f4c48 SkillSpector v2.3.11 2.13.0
security-scan.yml → 5bfad328 betterleaks 1.8.1 1.9.0

Every caller of these reusable workflows has been scanning with the Oct-1 toolchain while tools.lock claimed otherwise. The digest pin was doing its job — holding the line — against a tools.lock that had moved without it.

The change

All five now point at the digests the b0d54d4 build published:

security-toolbox-base   5bfad3287049 -> 277509734f39
gha-toolbox             e6dbea9b2383 -> 11a57ab006ec
sast-toolbox            99efabd29e94 -> 0a6a072f8b81
iac-toolbox             e2da68281d64 -> 5e11ff268f53
skill-audit-toolbox     6f5f4c48e1d3 -> 37ee2e494596

Each confirmed present in that build's own output (run 39298358613), not read off a local pull. That distinction mattered: podman inspect reports the platform manifest digest, which differs from the registry index digest for the two images whose latest index carries attestations. build-push-action's outputs.digest is the convention #73 used, and all five match it.

Ordering, which matters here

security-agents#22 and skills#32 refresh their reusable-workflow pin from 4f31e642 (2026-09-09, pre-#73) to 0fd7cac9. Those repos are currently on the tag-based workflows, so they get :latest images and are accidentally current.

Merging them before this would be a silent downgrade — off :latest and onto the stale digests this PR fixes. They should land after, and re-pointed at this commit rather than 0fd7cac9, which is itself three commits stale and now conflicting with the Dependabot action bumps in #21/#31.

The control I did not add

I built a drift check for this and took 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 same reasoning that kept skillspector advisory for too long, pointed the other way.

The right home is build-toolbox.yml, which already has both the digest it just built and the pin sitting in the repo, so the comparison needs no registry archaeology. But that is the publish path, and #73 deliberately kept a stale pin from being able to block shipping. That is a design call, so this PR leaves it as one rather than shipping a half-gate.

Worth noting this is the third instance of the same shape: the weekly tool-bump PR that nobody opened for three weeks, the skillspector drift warning that could not fail, and now a pin that moves only by hand with nothing to remind you.

🤖 Generated with Claude Code

#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
garymike merged commit 9e6425a into main Oct 19, 2026
9 checks passed
@garymike
garymike deleted the chore/refresh-workflow-image-digests branch October 19, 2026 19:46
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]>
garymike added a commit that referenced this pull request Oct 21, 2026
…hed (#89)

The first refresh prompted by the check rather than by remembering. #88 added
a `pins` job to build-toolbox.yml; its own merge triggered a rebuild, the job
ran, and it went red naming all five stale pins with the digest each should
move to. A true positive on first firing, because #86 and #87 had already left
them behind.

  security-toolbox-base   d2f1d6b33d9c -> 9be060794ecb
  gha-toolbox             7e6558f3b46c -> 4cef3443acbd
  sast-toolbox            6bf6d9aafd5a -> edfd4db8752a
  iac-toolbox             bc4198b93fcc -> 08e1338df20c
  skill-audit-toolbox     c10bc17412a2 -> f5f99b96668f

Digests taken from the job's own annotations, which report
steps.build.outputs.digest from the run that published them. No local pull and
no registry lookup, so neither the index-vs-manifest ambiguity from #82 nor a
hand-copied digest can get in.

Verified behind the new pins: base ships trufflehog 3.99.3, betterleaks 1.9.0,
osv-scanner 2.7.0 and syft 1.55.0, with pip 26.2.2 vendoring certifi
2026.10.19, so #87's CVE fix is actually in what callers now get.
skill-audit ships SkillSpector v2.13.0.

One thing the check cannot currently survive: #86's build failed on a
cosign/Rekor 409, "an equivalent entry already exists in the transparency
log", because toolbox/gha was unchanged so gha-toolbox rebuilt to a byte
identical digest that was already signed. A failed domain arm skips the pins
job rather than running it. Benign cause, but it means a reproducible rebuild
can silence the check. Noted, not fixed here.

Co-authored-by: Claude Opus 5 <[email protected]>
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