Repository navigation
CodeWitness 1.0.22
CodeWitness 1.0.22 brings the CI workflow's action pins to the releases their own comments name, and stops the
repository from being able to acquire a mutable tag pin — or two versions of one action — without the fast suite
failing.
What changed
-
Four pins were behind the release recorded beside them, and one of them was behind in three files at once.
Sixteenuses:lines across three workflow files pin twelve distinct actions to a commit SHA; a SHA never moves
on its own, which is the point of it, so each was resolved deliberately from upstream's tag to its commit:Action Was Now actions/setup-javav6.1.0 v6.2.0 actions/setup-pythonv7.0.0 v7.1.0 actions/setup-dotnetv6.0.0 v6.1.0 ruby/setup-rubyv1.329.0 v1.338.0 setup-javais pinned inci.yml,codeql.ymlandrelease.yml. All three moved together, because a pipeline
that builds on v6.1.0 in its CodeQL job and v6.2.0 in its test job is running two versions of one action, and the
one nobody looked at is the one that did not get reviewed.Each tag was resolved to a commit with the GitHub API rather than copied from a report — the same API that a
dependency scanner read when it offeredshivammathur/setup-phpan "update" toverbose, which is a tag on that
repository and not a version of anything. -
CiActionPinsTestnow holds the invariantci.ymlstated only in prose. The workflow's comment block claims
every action is pinned to a full-length commit SHA rather than a movable tag; that claim had no test behind it,
anduses: actions/checkout@v4is exactly the line a hurried "fix the CI" commit writes. The test checks three
things across every workflow file:- every
uses:names a 40-character commit SHA — no tag, no branch, no short SHA; - every SHA carries a
# <release>comment, because.github/dependabot.ymlreads that comment to know which
release a SHA is, and a pin without one quietly stops being tracked; - the same action is pinned to one SHA across the whole pipeline.
- every
-
The reactor-root walk-up was extracted rather than copied.
PackagingNativeAccessTestalready walked up from
the working directory to find the aggregator POM, because Surefire's working directory is the module directory
and differs between a full reactor build and./mvnw -pl codewitness-cli test. The new test needs the same
walk-up and the same subtle rule that distinguishes the reactor root from a module POM that merely names
codewitness-parent, so it moved intoReactorRootand both tests call it. -
Left alone on purpose.
dtolnay/rust-toolchainis a commit at the tip of a movingstablebranch with no
release tag;dependabot.ymlsays it must be refreshed deliberately, and refreshing it here would move the Rust
fixture's compiler as a side effect of a housekeeping release. The twogithub/codeql-actionpins were also
left untouched — see the correction at the end of these notes for why that was wrong.
What this does not fix
-
It does not keep the pins current; it keeps them well-formed. The test asserts the form of a pin, not its
currency. A pin can be a valid full-length SHA with a correct version comment and still be a year old, and
noticing that needs the network — which is why it stays Dependabot's job. The mechanism is imperfect in a way
worth recording: the one open Dependabot pull request covers two of these four actions, and by the time it was
read itsruby/setup-rubypin proposed v1.336.0 when v1.338.0 was current. A grouped PR is only as fresh as the
day it opened. -
It cannot tell whether a SHA belongs to the repository named beside it, or whether the comment is the release
that SHA came from. Both need upstream, and both are what a bad manual edit gets wrong. The test catches a
missing comment and a disagreeing pair of pins; it would not have caught a comment readingv6.2.0beside
v6.1.0's commit, which is why the four bumps here were resolved from the API rather than hand-typed. -
A dependency scanner cannot track the two
github/codeql-actionpins, though Dependabot can. A scanner that
splits an action reference on its final/readsgithub/codeql-action/initas a repository named
codeql-action/init, gets a 404, and drops bothinitandanalyzefrom its results entirely. That is the
scanner's defect and not a gap in this repository's coverage:.github/dependabot.ymlcovers every workflow file
in/with pattern*, and Dependabot resolves a subpath reference to its repository, so these pins are tracked
like the rest. The test added here covers their form — well-formed, and one version across the pipeline — but
it cannot tell whether either pin is current, which is why the pins then went two releases stale. See the
correction at the end. -
No behaviour changes. No adapter, phase, verdict rule, report field, budget or exit code is touched. The one
user-visible difference is the version string in reports.
Verified for this release
- Full reactor suite: 1,763 tests, 0 failures, 0 errors, 0 skipped across the 22 test modules (up from 1,762;
CiActionPinsTestis the only addition).PackagingNativeAccessTeststill passes after its helper was
extracted, which is what makes the extraction safe rather than a rewrite. - All three assertions were proved to fire, each against a backup of the file and each restored afterwards:
- Pinning
actions/setup-go@v7in place of its SHA fails withsetup-go@v7 is not pinned to a 40-character commit SHA. A tag or branch can be re-pointed at different code after review…. - Stripping the comment from
ruby/setup-ruby@b3aacea…fails with…carries no # <release> comment. Dependabot reads that comment to know which release the SHA is…. - Leaving
codeql.ymlat v6.1.0 whileci.ymlandrelease.ymlmoved to v6.2.0 fails withcodeql.yml:51: actions/setup-java is pinned to b843ebf9… here but to 77dd5b2c… elsewhere in .github/workflows. One pipeline, two versions of one action….
- Pinning
- All sixteen pins in the three workflow files now resolve to a 40-character SHA with a version comment, and
actions/setup-javaresolves to a single SHA across all three. ./codewitness versionandjava -jar codewitness-cli/target/codewitness.jar versionboth print
codewitness 1.0.22.- Self-check against the built jar (
./codewitness verify . --requirements selfcheck/requirements.yaml --config selfcheck/codewitness.yaml --no-mutation --max-duration 30m): all seven ground rulesVERIFIED,
1,763 tests executed and passed, 0 findings — five suppressed with their reasons — coverage 71.2% line
(25563/35919) and 59.4% branch, 30 resolved dependencies with 0 advisories from OSV, and exit0in
1 m 45 s. RunCW-2026-11-08-EHFGG.selfcheck/README.mdquotes this run.
Process note
This release was found by pointing a dependency-scanner MCP server (depmcp 0.11.0) at the repository rather than
by a human noticing, and the way it went wrong is the useful part. The scanner has no Maven support, so of the
project's 23 POMs it read none: its 21 "dependencies" were the workflow pins, one setuptools constraint, and four
entries that are not dependencies at all — requires-python looked up on PyPI as a package, and the fixtures'
own version = "0.1.0" field matched against a 2014 PyPI package literally named version, which it then
proposed bumping to 0.1.1. That is why the pins here were resolved from the GitHub API by hand and no update plan
was applied: the plan contained two entries that would have broken the repository, and applying it applies every
group at once.
The near-miss is worth recording because the new test caught it: the first pass at this change bumped
actions/setup-java in ci.yml only. The version-comment and SHA assertions both passed, and the pipeline would
have run v6.2.0 for tests and v6.1.0 for CodeQL — a difference invisible in review, in a green build, and in the
report. The third assertion exists because of that mistake.
Compatibility
- No CLI command, flag, exit code, report key, SARIF profile, configuration key or adapter-SPI change. A project
verified by 1.0.21 is verified identically by 1.0.22; onlyversionin the report differs. - The two new test-visible files are
ReactorRootandCiActionPinsTest, both incodewitness-cli's test tree;
neither is part of any published artifact.
Correction (added in 1.0.23)
Two statements in this note about github/codeql-action were false, and the pins they excused were two patch
releases out of date at the time of writing. Both are corrected above; the original wording is recorded here so
the record cannot quietly improve.
- Claimed: "their tags are
codeql-bundle-v*rather than semver." Wrong. The action's own tags are
ordinary semver —v4.39.0,v4.39.1,v4.39.2,v4.39.3. Only the bundle releases usecodeql-bundle-v*,
which is whyreleases/latestanswerscodeql-bundle-v2.27.4; that is a reason for a naive resolver to
stumble, not a reason to stop tracking the pins. - Claimed: "
github/codeql-actionstill gets no update proposal from anything." Wrong. Dependabot covers
every action in every workflow under/, and resolvesgithub/codeql-action/initto its repository. It had
simply not proposed either release yet. - And the pins were stale. Both sat at
v4.39.1(2026-10-21) whilev4.39.2(2026-11-03) andv4.39.3
(2026-11-04) had shipped.v4.39.3fixes diff-informed alert filtering incorrectly removing alerts in
changed files whose paths contain spaces, special characters or non-ASCII characters — for a scanning workflow
that is not housekeeping.
The mechanism behind the mistake is worth keeping: the dependency scanner returned both pins with an "error"
and no candidate, and the reasoning that filled the gap was written from assumption rather than from
/tags. 1.0.23 moves the pins and re-keys the consistency assertion on the repository, so that a half-applied
CodeQL bump — init moved and analyze not — now fails the fast suite instead of passing it.