Repository navigation
feat(scripts): move the pin mover into the repo, refusing to run when the check is green - #99
Merged
Merged
Conversation
… the check is green The mover had been a throwaway script outside the repo, so the one rule that makes it safe to use lived only in whoever last ran it. It moved the pins correctly twice today, and would have churned them a third time an hour later for no benefit. The two scripts answer different questions and routinely disagree: check-image-pins.py was the pinned image built from the current inputs? -> current move-image-pins.py does the pin name one specific build? -> would move Every rebuild publishes a new digest, because the Dockerfiles apt-get install current packages, so "names the newest build" goes false within a week of every pin move while "built from current inputs" stays true. Measured right after #98, whose commit touched no image input: all five digests changed and all five pins stayed current. Running the mover on that state would have repointed every caller at a functionally identical build. So it refuses while the check is green. --force covers the one case the check is blind to on purpose: the weekly rebuild exists to pick up BASE-IMAGE patches, which change what callers run without changing any input this repo tracks, so the check stays green while the pinned image ages. Pulling those through to callers is a real reason to move a pin, and it now has to be stated rather than inferred. Resolves the per-commit sha- tag rather than latest, and verifies every digest's build-inputs label against the repo's own fingerprint before writing, so a wrong digest cannot land even under --force. Both paths were exercised before this commit: refusal wrote nothing and exited 1, --force dry-run listed all five and wrote nothing. check-image-pins.py's failure messages now name the script that fixes them, so a red run says what to do rather than only what is wrong.
This was referenced Oct 30, 2026
garymike
added a commit
to garymike/security-agents
that referenced
this pull request
Oct 30, 2026
Was bee631e, four commits behind. No toolchain change comes with this: those four were garymike/security-workflows#99 (scripts and changelog), #100 (dropped the redundant PyJWT override) and #101 (moved the image pins onto the images built without it). Both affected images resolve PyJWT 2.15.1 with or without that override, which is what made it safe to drop, so callers get the same tool versions either way. What it does deliver is a smaller surface to reason about: the pinned images no longer carry a --no-deps install defeating a constraint semgrep has since relaxed. Keeping the pin current also means the next upstream change that DOES matter is a one-line diff rather than a catch-up.
garymike
added a commit
to garymike/skills
that referenced
this pull request
Oct 30, 2026
Was bee631e, four commits behind. No toolchain change comes with this: those four were garymike/security-workflows#99 (scripts and changelog), #100 (dropped the redundant PyJWT override) and #101 (moved the image pins onto the images built without it). The skill-audit gate this repo depends on resolves PyJWT 2.15.1 with or without that override, which is what made it safe to drop, so the gate behaves identically. What it does deliver is a smaller surface to reason about: the pinned skill-audit image no longer carries a --no-deps install defeating a constraint semgrep has since relaxed. Keeping the pin current also means the next upstream change that DOES matter, such as whichever SkillSpector release first carries NVIDIA/SkillSpector#893, is a one-line diff rather than a catch-up.
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 pin mover had been a throwaway script living outside the repo. It moved the pins correctly in #95 and #97, and an hour later it would have churned all five again for no benefit, because the one rule that makes it safe to use lived only in whoever last ran it.
The two scripts disagree, on purpose
check-image-pins.pymove-image-pins.pyMeasured right after #98, a commit that touched no image input at all:
Five new digests, five valid pins. Every rebuild does this, because the Dockerfiles
apt-get installcurrent packages. Running the mover on that state would repoint every caller at a functionally identical build, in files whose whole point is that they change only deliberately.So it refuses while the check is green.
--force, and why it has to existThe weekly rebuild exists to pick up base-image patches. Those change what callers run without changing any input this repo tracks, so the check stays green while the pinned image ages. Pulling them through to callers is a legitimate reason to move a pin, and refusing outright would block it.
--forcemakes that intent explicit instead of inferred, and the refusal message names it rather than leaving you to find it:Safety kept from the throwaway version
sha-<commit12>tag, neverlatest. Before fix(ci): serialize toolbox publishing; two builds could pushlatestat once #98's concurrency guard, two builds 25 seconds apart both pushedlatestand the earlier run's push landed last foriac-toolbox. The guard makes that unlikely rather than impossible; the per-commit tag cannot race at all.--force.check-image-pins.pyfor the registry chain rather than duplicating it, so the mover and the check cannot disagree about how a pin resolves.Both paths were exercised before committing: the refusal wrote nothing and exited 1, and the
--forcedry run listed all five and wrote nothing.Also
check-image-pins.py's failure messages now name the script that fixes them, so a red run says what to do rather than only what is wrong. Logic untouched; it still reports all five current.