Name the release the CodeQL pin carries, so the audit can read it [#19] - #162
Merged
Conversation
Two steps pinned a commit with `# v4` beside it. A major line is not a version
anybody can compare a pin against, and the workflow audit has started refusing
that shape: upstream moved the `v4` tag off the pinned commit, so the comment
now names a different commit from the one the step runs, and every pull request
on this repository reds on it.
The pin does not move. `5595ccaf912efad79be6eef63a5619ff05969be3` is what both
steps ran before and after, and only the comment changes, from the line to the
release that points at that commit:
gh api repos/github/codeql-action/git/ref/tags/v4.37.6 --jq '.object.sha'
9e3211c9a3b9311dfe05da2ed48eea3386f042dd
gh api repos/github/codeql-action/git/tags/9e3211c9a3b9311dfe05da2ed48eea3386f042dd --jq '.object.sha'
5595ccaf912efad79be6eef63a5619ff05969be3
The failure this prevents is not the red run, which is a symptom. It is that a
pin whose comment names a moving reference cannot be read: the next person
comparing the pin against what it claims to be has nothing to compare it with,
and an update that silently replaced the commit would look the same as one that
did not.
Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
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.
Part of #19, and it does not meet that issue's done condition. The last section
says what is still owed there.
What was wrong
Two steps pinned a commit and named a major line beside it rather than a
release. #19 already recorded that shape and said what it would cost. It has now
cost it: the
v4tag moved off the pinned commit, and the workflow audit refusesthe mismatch on every pull request opened against this repository.
Run 2026-08-13. The same audit passed on
mainearlier today against the sametwo lines, so nothing in this tree changed:
Run 2026-08-13. What moved is upstream.
What the change does
Only the comment. Both steps ran
5595ccaf912efad79be6eef63a5619ff05969be3before this change and run it after, and the whole diff is two comments:
The release that points at the pinned commit, dereferenced through the annotated
tag rather than read off the ref:
and the line the comment used to name, which is now a different commit:
All run 2026-08-13. The other three pins of the same action already name a
release and the audit does not report them:
What failure this prevents
Not the red run, which is the symptom. A pin whose comment names a moving
reference cannot be read against what it claims to be, so an update that
replaced the commit and one that did not look identical to the next reader. That
is the property #19 asks the updater to preserve, stated from the other end.
The gate
Both run 2026-08-13 at
7b9c94b. No leg of the gate reads a workflow file forthis property; the audit that does runs on the server, and its verdict on this
branch is what stands behind the change.
The means
YAML, because the file is a workflow and the comment beside a pin is what the
audit reads. Nothing else was available and nothing was added.
What is not covered
#19's done condition asks for an observed update pull request with the SHA pin
and the version comment preserved. This is not that: it is a comment corrected by
hand because the audit went red, and no updater has opened anything here yet.
That clause stays owed.
Reader
This change carries no second reader. Every claim above is a command, and the
one that matters is the pinned sha being unchanged, which the diff shows in full.