You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
FZ2000
committed
ci: fix a pin that could not resolve, and aim CodeQL at the real attack surface
Acting on the CI-hardening research. Four changes, one of which is a bug
I shipped two commits ago.
dependency-review-action@v4 does not exist. That action publishes no
floating `v4` major tag — only v4.7.3 ... v4.9.0 specifics and v5.0.0 —
so the reference could never resolve. It never surfaced because the job
is gated off while the repo is private, which is exactly how a broken pin
survives until the moment you need it. Now @v5.
The other actions were three majors behind: checkout, setup-python and
upload-artifact are all on v7. Bumped, and CI is what verifies that —
the upload-artifact step is already continue-on-error, so the riskiest
of the three cannot redden a build.
CodeQL now analyses `actions` as well as `python`, one job per language.
This is the change with the most value per line. The runtime here is
stdlib-only with a single outbound API; the CI is where a public repo is
actually attacked, and CodeQL's actions queries cover exactly that —
workflow script injection, checkout of untrusted code in a privileged
context, cache and artifact poisoning, unpinned action tags. Autobuild is
skipped for `actions`, which analyses YAML and has nothing to build.
Also switched the suite from security-and-quality to security-extended.
security-and-quality adds roughly 122 Python code-quality queries that
ruff already enforces, and it disables CodeQL's autofix validation; the
redundancy was not buying anything.
The `category` is now per-language, which CodeQL requires once a repo
uploads more than one SARIF result. I got this wrong on the first attempt
— referenced `matrix.language` with no matrix defined — and actionlint
did not catch it, because an undefined matrix context is a runtime
failure rather than a syntax error.
Renovate gains `helpers:pinGitHubActionDigests` rather than me pinning
SHAs by hand, deliberately. A pin needs its `# vX.Y.Z` comment to keep
being updated: since 2026-04-07 Renovate disables bare-SHA pins by
default because it cannot tell what branch or tag the SHA belongs to, so
a hand-written bare pin goes stale silently and forever. Renovate writes
the comment and maintains it. Worth knowing the tradeoff it buys into:
Dependabot does not raise vulnerability alerts for SHA-pinned actions,
only for semver ones, so the pins have to be kept current by Renovate
rather than by alerting.
Also worth recording what SHA pinning does NOT fix, since it is easy to
over-trust: it locks the outer reference only. A composite action that
internally does `uses: some/action@v1` still resolves a mutable tag the
caller cannot reach — that is how the reviewdog compromise propagated to
consumers "regardless of version or pinning method". It is a further
argument for the existing pattern of curling a pinned CLI (gitleaks,
trufflehog, lychee, markdownlint) instead of adopting third-party
actions: a binary has no transitive action graph.
CITATION.cff: `authors: [{alias: FZ2000}]` is schema-legal but produces no
printable author, so GitHub's "Cite this repository" panel rendered an
entry with nobody in it. Added a `name`. Also removed
`date-released: 2026-04-26`, which asserted a release that has never
existed — `git tag` is empty, and CHANGELOG.md and PUBLISHING.md both
already say so.
0 commit comments