gha-supply-chain-hardening
Skill0 starsChanged 24 days agoMITView on GitHub
Use to harden GitHub Actions and CMake dependencies across many repos: pin actions to commit SHAs, default read-only token, pin FetchContent to commits, verify with scans, optional attestations.
- Reads credentials
- Commits and pushes
In this repository69 other files it gives its agents.
- ableton-liveSkill
- ableton-push-expertSkill
- ardourSkill
- arduino-electronics-solderingSkill
- audacitySkill
- audio-driver-stacksSkill
- audio-interface-digital-ioSkill
- av-receiver-specialistSkill
- bazzite-kde-linuxSkill
- bitwig-studioSkill
- color-palette-expertSkill
- couch-pc-cec-gaming-modeSkill
- cubaseSkill
- daw-hubSkill
- denon-prime-sc5000-x1800Skill
- design-software-guideSkill
- dj-gig-guideSkill
- dj-specialistSkill
- drawing-tabletsSkill
- dsp-references-and-licencesSkill
- electronic-music-producerSkill
- fl-studioSkill
- fx-plugin-designSkill
- github-for-beginnersSkill
- github-repo-lockdownSkill
- grapheneosSkill
- graphic-design-expertSkill
- hard-dance-productionSkill
- hardstyle-sound-design-notesSkill
- hardware-protocol-captureSkill
- home-network-specialistSkill
- js-to-cpp-dsp-portSkill
- juce-audio-thread-handoffSkill
- juce-expertSkill
- juce-headless-test-snapshotSkill
- knulli-handhelds-m8Skill
- korg-logue-sdk-expertSkill
- linux-audio-productionSkill
- linux-expertSkill
- linux-security-hardeningSkill
- linux-terminal-expertSkill
- logic-proSkill
- loudness-and-lowend-deliverySkill
- man-page-expertSkill
- max-for-live-expertSkill
- mockup-is-the-pluginSkill
- mockup-to-juce-layoutSkill
- nextcloud-specialistSkill
- photo-editing-color-gradingSkill
- pihole-raspberry-piSkill
- plugin-dsp-qualitySkill
- plugin-fleet-auditSkill
- plugin-performance-profilingSkill
- plugin-security-fuzzingSkill
- plugin-ship-checklistSkill
- pro-toolsSkill
- reaperSkill
- rog-ally-x-bazziteSkill
- sound-engineer-acousticsSkill
- sound-forgeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Check workflows for write needs first: grep for gh release, action-gh-release, git push, GITHUB_TOKEN, secrets..
- Very specific: line 23
Verify at the end: no uses: line without a 40 hex SHA, no workflow without top-level permissions:, no GIT_TAG main.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Actions and CMake supply chain hardening
Companion to plugin-ship-checklist and github-repo-lockdown. Labels: MEASURED (done across 46 plugin repos), VERIFIED (source page), UNVERIFIED.
The four changes, in order of value
- Pin every action to a full commit SHA and keep the version in a comment:
uses: actions/checkout@<sha> # v4. SHA pinning is the mainstream defence after the tj-actions compromise. VERIFIED (Semgrep blog, 2026). A SHA can still point at a commit in a malicious fork, so pinning is not a full answer. VERIFIED (platformengineering.org). - Top level
permissions: contents: readin every workflow, widen per job only (release upload needscontents: write). Never usepull_request_targetwith a checkout of fork code. Background knowledge, UNVERIFIED. - Pin CMake
FetchContent_Declare(... GIT_TAG <full commit sha>). A branch name likemainmeans any push to that repo changes your builds. CMake 3.28 accepted a commit SHA together withGIT_SHALLOW ON. MEASURED. - Publish SHA256SUMS with every release. UNVERIFIED as practice, cheap.
Getting the SHA
git ls-remote https://github.com/actions/checkout refs/tags/v4 refs/tags/v4^{}. For a lightweight tag only one line prints and that SHA is the commit. For an annotated tag use the ^{} line. MEASURED for checkout, upload-artifact, download-artifact, cache, setup-python.
Rewriting many repos safely
- Script the edit with
sed -Eanchored on@v4followed by space or end of line, so@v4.1is not touched. Insert the permissions block before the first^jobs:only when no top-levelpermissions:exists. Parse every workflow with a YAML loader after editing. MEASURED. - Work from a fresh
git fetch --depth=1plusreset --hard FETCH_HEADfor each repo, never a stale clone: another session may have pushed. A stale clone gave a non-fast-forward rejection. MEASURED. - Check workflows for write needs first: grep for
gh release,action-gh-release,git push,GITHUB_TOKEN,secrets.. Only those need a wider job-level block. MEASURED. - Verify at the end: no
uses:line without a 40 hex SHA, no workflow without top-levelpermissions:, noGIT_TAG main. MEASURED.
After pinning
- Dependabot security alerts do not see SHA pins, so keep the
# vXcomment and enable Dependabot version updates for thegithub-actionsecosystem, which rewrites pins. The version updates part is UNVERIFIED. - Build provenance:
actions/attest-build-provenanceneedsid-token: writeandattestations: write; users check withgh attestation verify FILE -R owner/repo. Attestations alone give SLSA build level 2. VERIFIED (GitHub docs). - GitHub org policy can block unpinned actions. VERIFIED (GitHub changelog 2025-08-15). Not available to personal accounts: UNVERIFIED.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

