Skip to content

Add pin-github-actions skill - #3

Merged
caseymanos merged 1 commit into
mainfrom
public/pin-github-actions
Nov 6, 2026
Merged

caseymanos merged 1 commit into
mainfrom
public/pin-github-actions

Conversation

@caseymanos

Copy link
Copy Markdown
Collaborator

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 a releases/v4 branch isn't picked up, SHAs resolved only from the action's own repository, composite action.yml files, Dependabot coverage with a cooldown, and naming runtime downloads that pinning doesn't cover.

Changes

  • skills/pin-github-actions/: SKILL.md, MIT LICENSE.txt, and scripts/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 # v6 comments now name the exact releases (v6.1.0, v6.5.0), checked with git ls-remote; the SHAs are unchanged.

Testing

  • Installation: skills@1.7.6 add . --skill '*' --agent claude-code --agent codex in a clean directory installs both skills, and each installed bundle matches its source (diff -r).
  • Checker: on the example fixture it fails on the four pinnable references, skips ./, reads the quoted composite reference, and passes after pinning. It passes on this repository.
  • Behavior, 5–6 November 2026, the example task with and without the skill:
    • Claude Code (Opus 5.5) in fresh subagent sessions that read SKILL.md by path.
    • Codex CLI 0.166 in fresh codex exec sessions, invoking the skill by name.
    • All four sessions pinned the same SHAs, including the annotated tag's commit. With the skill, both agents recorded exact versions, used the bundled checker, and reported the missing updater and the setup-node runtime download. The results table is in the example.

Limits

  • The checker matches uses: lines rather than parsing YAML, so flow-style mappings are missed; the skill says to rewrite those as block steps.
  • Docker images are pinned to a digest only when a registry tool is available.
  • Not yet verified: automatic discovery without naming the skill, and the public npx skills add adapt/skills --skill pin-github-actions install after merge.

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.
@caseymanos
caseymanos merged commit 92d2f48 into main Nov 6, 2026
2 checks passed
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