Skip to content

chore(ci): SPDX headers on line 1 and Actions lockfile minted - #112

Merged
hyperpolymath merged 4 commits into
mainfrom
chore/ci-hygiene-lockfile-spdx
Aug 7, 2026
Merged

chore(ci): SPDX headers on line 1 and Actions lockfile minted#112
hyperpolymath merged 4 commits into
mainfrom
chore/ci-hygiene-lockfile-spdx

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Two estate gates, one change.

SPDX — the linter checks head -1 only, so workflows carrying their identifier below a managed-by comment report as missing one. Each file's own identifier is moved to line 1; nothing is imposed (repos here are variously MPL-2.0, PMPL-1.0-or-later, AGPL-3.0-or-later). Licences in this repo: MPL-2.0.

Lockfile (minted)gh actions-lock resolves each symbolic ref to a verified commit plus owner_id, repo_id and the transitive dependencies of composite actions. That is what Scorecard's Pinned-Dependencies check wants, and what an inline SHA cannot express.

⚠ Do not additionally SHA-pin inline — the mechanisms are mutually exclusive, and inline pinning removes actions from the lockfile (measured on hypatia: 14 startup_failures).

Verified: all workflows parse · no duplicate SPDX identifiers · gh actions-lock --verify-local: Run without --verify-local to resolve and pin missing actions.

🤖 Generated with Claude Code

Two estate gates, one change.

**SPDX.** `governance / Workflow security linter` checks `head -1 | grep`, so a
workflow carrying its identifier below a managed-by comment reports as missing
one. Each file's OWN identifier is moved to line 1 — nothing is imposed, because
repositories here are variously MPL-2.0, PMPL-1.0-or-later and AGPL-3.0-or-later
and a default would mis-declare the minority. Licences seen here: MPL-2.0.

**Lockfile.** `gh actions-lock` resolves each symbolic ref to a verified commit
plus owner_id, repo_id and the transitive dependencies of composite actions —
which is what OSSF Scorecard's Pinned-Dependencies check is asking for, and what
an inline SHA cannot express.

⚠ Do NOT additionally SHA-pin inline. The mechanisms are mutually exclusive:
`gh actions-lock` refuses a ref no tag or branch contains, so inline pinning
REMOVES actions from the lockfile. Measured on hypatia 2026-08-07 — 40 inline
pins caused 14 startup_failures and dropped 7 lockfile entries.

Verified: all workflows parse, no duplicate identifiers, lockfile verify says
"Run without --verify-local to resolve and pin missing actions.".
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
gitar-bot[bot]

This comment was marked as resolved.

@gitar-bot

gitar-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

Note

Automatic reviews are paused because your trial's included automatic processing has been used for this period. Upgrade now, or comment "Gitar review" to run a review anytime.
Learn more

Code Review ✅ Approved 2 resolved / 2 findings

Adds SPDX headers to line 1 of CI workflows and mints an Actions lockfile, but replaces immutable SHA-pinned actions with mutable tag references and introduces silent major-version jumps.

✅ 2 resolved
Security: SHA-pinned actions replaced with mutable tag/branch refs

📄 .github/workflows/release.yml:61 📄 .github/workflows/release.yml:64 📄 .github/workflows/release.yml:73 📄 .github/workflows/release.yml:127 📄 .github/workflows/release.yml:143 📄 .github/workflows/release.yml:146 📄 .github/workflows/release.yml:160 📄 .github/workflows/release.yml:198 📄 .github/workflows/release.yml:214 📄 .github/workflows/release.yml:217 📄 .github/workflows/release.yml:223 📄 .github/workflows/release.yml:241 📄 .github/workflows/release.yml:244 📄 .github/workflows/zig-ffi.yml:44 📄 .github/workflows/zig-ffi.yml:47 📄 .github/workflows/zig-ffi.yml:52 📄 .github/workflows/zig-ffi.yml:57 📄 .github/workflows/zig-ffi.yml:79 📄 .github/workflows/zig-ffi.yml:94 📄 .github/workflows/zig-ffi.yml:97 📄 .github/workflows/zig-ffi.yml:100 📄 .github/workflows/zig-ffi.yml:122 📄 .github/workflows/zig-ffi.yml:125 📄 .github/workflows/zig-ffi.yml:128 📄 .github/workflows/zig-ffi.yml:133 📄 .github/workflows/dogfood-gate.yml:30 📄 .github/workflows/dogfood-gate.yml:43 📄 .github/workflows/dogfood-gate.yml:75 📄 .github/workflows/dogfood-gate.yml:92 📄 .github/workflows/dogfood-gate.yml:125 📄 .github/workflows/dogfood-gate.yml:190 📄 .github/workflows/dogfood-gate.yml:249 📄 .github/workflows/dogfood-gate.yml:315 📄 .github/workflows/publish-container.yml:24 📄 .github/workflows/publish-container.yml:27 📄 .github/workflows/publish-container.yml:35 📄 .github/workflows/publish-container.yml:46 📄 .github/workflows/publish-container.yml:55
This PR unpins every third-party action from an immutable commit SHA back to a mutable reference (@master, @main, @v1, @v6.0.1, etc.). The GitHub Actions runner resolves the ref in uses: at run time and does not consume the new actions.lock file, so branch refs like dtolnay/rust-toolchain@master and hyperpolymath/*@main, and floating tags like google/clusterfuzzlite@v1, can be re-pointed by the upstream owner to arbitrary code — a supply-chain exposure that SHA pinning specifically prevents (and that Scorecard's Pinned-Dependencies check actually measures against the workflow files, not a lockfile). If the intent is to rely on gh actions-lock, verify that the resolution mechanism is enforced at run time before removing the inline SHAs; otherwise retain the @<sha> # <tag> pins.

Bug: Silent major-version jumps introduced while unpinning

📄 .github/workflows/release.yml:61 📄 .github/workflows/release.yml:143 📄 .github/workflows/release.yml:214 📄 .github/workflows/release.yml:241 📄 .github/workflows/release.yml:244 📄 .github/workflows/dogfood-gate.yml:30
Several uses: refs change major/minor versions, not just format: actions/checkout goes from the v4.2.2 SHA to @v6.0.1 (a two-major-version jump with different Node runtime and behavior requirements), actions/setup-node moves from the v4.1.0 SHA to @v4.0.2 (a downgrade), and actions/checkout in dogfood-gate goes from a # v4 SHA to @v4.3.1. These behavioral changes are unrelated to the SPDX/lockfile hygiene goal and can break jobs (e.g. checkout v6 runtime requirements). Confirm each resolved version is intentional and matches the previously pinned SHA's version.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Important

Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

`gh actions-lock` inserts `# This workflow is managed by gh actions-lock.` at
line 1, which displaced the SPDX identifier moved there earlier in this branch.
The linter greps `head -1` only, so the header read as missing again.

Each file's OWN identifier is moved back to line 1 — nothing imposed. Files
already correct are untouched, and any file carrying two identifiers aborts the
change rather than guessing.
@gitar-bot
gitar-bot Bot dismissed their stale review August 7, 2026 14:41

✅ All code review findings resolved.

Configure merge blocking

@hyperpolymath
hyperpolymath merged commit c8dbf10 into main Aug 7, 2026
14 of 20 checks passed
@hyperpolymath
hyperpolymath deleted the chore/ci-hygiene-lockfile-spdx branch August 7, 2026 15:08
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