Repository navigation
Add pin-github-actions skill - #3
Merged
Merged
Conversation
Pins a repository's action references to the commits they run today and adds a check that keeps new ones pinned. This repository's own workflow now runs that check, and its version comments name exact releases.
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.
Adds
pin-github-actions, the second skill in the collection. It pins each action a repository uses to the commit its tag points to today, without upgrading anything, and adds a check that fails on any new unpinned reference. A retagged or hijacked action then can't change what CI runs.What the skill covers that a quick fix tends to miss: annotated tags (pin the peeled commit, not the tag object), full
refs/tags/lookups so areleases/v4branch isn't picked up, SHAs resolved only from the action's own repository, compositeaction.ymlfiles, Dependabot coverage with a cooldown, and naming runtime downloads that pinning doesn't cover.Changes
skills/pin-github-actions/:SKILL.md, MITLICENSE.txt, andscripts/check_pins.py, a standard-library checker that agents copy into a repository when it has no linter that enforces hash pins.examples/pin-a-workflow.md: a two-file fixture with the expected result and a replay record.README.md: catalog row..github/workflows/checks.yml: runs the checker on this repository. The# v6comments now name the exact releases (v6.1.0,v6.5.0), checked withgit ls-remote; the SHAs are unchanged.Testing
skills@1.7.6 add . --skill '*' --agent claude-code --agent codexin a clean directory installs both skills, and each installed bundle matches its source (diff -r)../, reads the quoted composite reference, and passes after pinning. It passes on this repository.SKILL.mdby path.codex execsessions, invoking the skill by name.setup-noderuntime download. The results table is in the example.Limits
uses:lines rather than parsing YAML, so flow-style mappings are missed; the skill says to rewrite those as block steps.npx skills add adapt/skills --skill pin-github-actionsinstall after merge.