agentleFS
d-oitd-oit/rust-2026-template/.agents/skills/verify-actions/SKILL.md

verify-actions

Skill15 starsChanged 5 months agoMITView on GitHub

Verify GitHub Actions / GitLab CI action versions against actual releases before pinning. Never trust version comments — always resolve the real SHA from the upstream repository. Use when editing CI workflows, adding new actions, auditing pinned versions, or fixing version mismatches.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When you encounter a uses: owner/action@SHA # vX line, verify the SHA:

    line 33
  2. Distinctive:

    Before committing workflow changes, verify ALL action references across the workspace are version-consistent:

    line 65
  3. Distinctive:

    Verify no other workflow uses a different version of the same action

    line 85
  4. Distinctive:

    Update ALL files that reference this action to the same SHA

    line 92
  5. Distinctive:

    Run the consistency check from step 2

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verify Actions

Why This Matters

  • Comments like # v4 can be wrong — a SHA may actually point to v3 or a branch
  • Version mismatches across workflows cause subtle bugs (e.g., upload-artifact v4 can't download v7 artifacts)
  • Supply-chain attacks target CI — pinning a wrong SHA from main instead of a tag defeats the purpose

Agent Workflow

1. Before Changing Any Action Reference

When you encounter a uses: owner/action@SHA # vX line, verify the SHA:

For GitHub Actions:

# Look up what tag a SHA belongs to
gh api repos/{owner}/{repo}/git/ref/tags/{tag} --jq '.object.sha'

# Or list recent tags to find the right one
gh api repos/{owner}/{repo}/tags --jq '.[].name' | head -20

# Verify a specific SHA matches a tag
gh api repos/{owner}/{repo}/git/ref/tags/v4 --jq '.object.sha'

For GitLab Actions (CI/CD):

# Check the registry or project for the correct image tag
# Use the project API or container registry
glab api projects/{id}/repository/tags

Fallback — web fetch:

WebFetch: https://github.com/{owner}/{repo}/releases/tag/{tag}
Confirm the release exists and note the commit SHA.

2. Version Consistency Check

Before committing workflow changes, verify ALL action references across the workspace are version-consistent:

# Find all action references and group by action name
grep -rn 'uses:' .github/workflows/ .github/actions/ \
  | sed 's/.*uses: \([^@]*\)@.*/\1/' \
  | sort | uniq -c | sort -rn

# For each unique action, verify all SHAs match
grep -rn 'uses: actions/upload-artifact@' .github/workflows/
grep -rn 'uses: actions/checkout@' .github/workflows/
grep -rn 'uses: actions/download-artifact@' .github/workflows/

3. When Adding a New Action

  1. Find the latest release tag from the upstream repo
  2. Resolve the SHA for that tag using gh api
  3. Pin the SHA with a version comment
  4. Verify no other workflow uses a different version of the same action

4. When Updating an Action

  1. Identify the current SHA and version in use
  2. Find the latest release tag
  3. Resolve the new SHA
  4. Update ALL files that reference this action to the same SHA
  5. Run the consistency check from step 2

Canonical SHA Reference

These are verified SHAs for commonly used actions. Always cross-check before using — upstream may have released newer versions.

ActionVerified SHAVersionLast Verified
actions/checkout3d3c42e5aac5ba805825da76410c181273ba90b1v7.0.12026-11-05
actions/upload-artifactcf430e030ddbb5b0abf93d22962f4752f3646cd9v7.0.22026-11-05
actions/download-artifact9000827ccba6bdab643e8b6fd33ac0654aef8333v8.0.22026-11-05
actions/github-script3a2844b7e9c422d3c10d287c895573f7108da1b3v9.0.02026-11-05
actions/labelerbf12e9b00b37c5c0ca2b87b79b2daf7891dbda13v7.0.02026-11-05
actions/setup-node949feb2413d6458794dcd2491c4babbbce0c15c1v7.1.02026-11-05
actions/setup-python6d4fd22b20465ccc0f7354476588e8df7c9ca0e0v7.1.02026-11-05
actions/attest-build-provenancee8998f949152b193b063cb0ec769d69d929409bev2.4.02026-11-05
codecov/codecov-action303a32d7a59b442fa8d48b6a1cc6825c09c847a5v7.1.12026-11-05
dependabot/fetch-metadata25dd0e34f4fe68f24cc83900b1fe3fe149efef98v3.1.02026-11-05
dorny/paths-filterceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9dv4.0.32026-11-05
dtolnay/rust-toolchainb725eda525362e7cf34af9a7243cac1e3f01a7ecstable2026-11-05
mozilla-actions/sccache-action9e7fa8a12102821edf02ca5dbea1acd0f89a2696v0.0.102026-11-05
peter-evans/create-pull-request5f6978faf089d4d20b00c7766989d076bb2fc7f1v8.1.12026-11-05
Swatinem/rust-cached1527c8f67ef9af357290475d4af4b0fab8f12e0v2.9.32026-11-05
taiki-e/install-action86f7a0ffb25f40114606501a311ebcfaf882ea32v2.88.02026-11-05
wagoid/commitlint-github-actionb948419dd99f3fd78a6548d48f94e3df7f6bf3edv6.2.12026-11-05

Rule: Before using a SHA from this table, verify it still matches the claimed version. Run gh api to confirm. This table drifts: the previous revision listed actions/checkout v6, actions/github-script v7, and Swatinem/rust-cache v2 SHAs that were two major versions behind, and every one of them ran on the deprecated Node.js 20 runtime.

Checking for runtime deprecations

An action major version can be pinned correctly and still be unusable because GitHub retired its Node runtime. Check the declared runtime directly:

gh api "repos/{owner}/{repo}/contents/action.yml?ref={tag}" \
  --jq '.content' | base64 -d | grep -m1 'using:'

A node20 result produces this warning in every job that uses it:

Node.js 20 is deprecated. The following actions target Node.js 20 but are being
forced to run on Node.js 24: ...

Fixing it requires a major version bump, because the Node 24 runtime landed in a new major line for nearly every action. Enumerate them all at once:

grep -rhoE "uses: [a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+@[a-f0-9]{40}" .github/ \
  | sed 's/uses: //' | sort -u \
  | while IFS=@ read -r repo sha; do
      printf '%-45s %s\n' "$repo@${sha:0:7}" \
        "$(gh api "repos/$repo/contents/action.yml?ref=$sha" --jq '.content' \
            | base64 -d | grep -m1 'using:')"
    done

## Red Flags

- [ ] Action pinned from a branch (`# main`, `# master`) instead of a tag
- [ ] Version comment says one thing but SHA resolves to another
- [ ] Same action used with different SHAs across workflow files
- [ ] `download-artifact` version doesn't match `upload-artifact` version
- [ ] No version comment on a SHA-pinned reference
- [ ] SHA not resolvable via `gh api` (may be from a fork or deleted tag)

## Common Mismatches to Watch

| Action Pair | Must Match |
|-------------|-----------|
| `upload-artifact` + `download-artifact` | Same major version |
| `actions/checkout` across all workflows | Same SHA |
| `actions/upload-artifact` across all workflows | Same SHA |
| Composite action internal pins | Match consuming workflow versions |

## Rationalizations

| Rationalization | Reality |
|-----------------|---------|
| "The version comment already tells me which version this is" | The comment is a claim, not a fact. Resolve the SHA against the upstream tag before trusting it. |
| "I'll just bump the SHA to the latest commit on main" | Pinning `main` defeats the purpose of SHA pinning — the supply chain is unpinned again. |
| "Only one workflow uses this action, so no consistency check needed" | Version skew usually appears later, when a second workflow is added or a matrix job runs. Check on every change. |

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.