pinned-tag
Skill2 starsChanged 4 months agoMITView on GitHub
Manage pinned tags and commit SHAs for GitHub Actions security, resolving mutable tags to immutable commit references. Use when the task involves `Unpinned tag for a non-immutable Action`, `pin GitHub Action to commit SHA`, `resolve git tag to SHA`, or `GitHub Actions security hardening`.
In this repository43 other files it gives its agents.
- accessibilitySkill
- best-practicesSkill
- brainstormingSkill
- core-web-vitalsSkill
- cypress-e2eSkill
- docker-expertSkill
- drizzle-ormSkill
- elixir-developmentSkill
- eslint-configSkill
- express-apiSkill
- frontend-designSkill
- github-actionsSkill
- go-developmentSkill
- grafana-dashboardsSkill
- grpc-apiSkill
- helm-chartsSkill
- jest-testingSkill
- kubernetes-orchestrationSkill
- makefileSkill
- markdown-a11ySkill
- nothing-designSkill
- performanceSkill
- php-developmentSkill
- postgresql-developmentSkill
- pr-creatorSkill
- prettier-formattingSkill
- pydanticSkill
- qwik-developmentSkill
- rails-developmentSkill
- ruby-developmentSkill
- rust-async-patternsSkill
- seoSkill
- skill-creatorSkill
- solidjs-developmentSkill
- sqlalchemySkill
- sql-optimization-patternsSkill
- swift-ios-developmentSkill
- tensorflow-mlSkill
- testing-librarySkill
- trpc-type-safetySkill
- webapp-testingSkill
- web-quality-auditSkill
- zig-developmentSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 40
Selection Logic: When resolving, always sort the results and take the last one to ensure ^{} is preferred over the tag object SHA.
- Distinctive: line 42
Verification: Always verify the resolved SHA belongs to the expected tag before applying changes.
- Very specific: line 71
Resolve SHA: Run git ls-remote --tags https://github.com/owner/repo.git filtered by the tag.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Pinned Tag Management Skill
Skill for managing "pinned tags" and commit SHAs, primarily for GitHub Actions security.
Overview
This skill helps locate and validate tags in remote repositories using git ls-remote --tags,
resolving the specific commit SHA for a tag (including annotated tags), and providing patches to pin
dependencies. It specifically targets GitHub Actions security best practices by encouraging the
use of full commit SHAs instead of mutable tags.
When to Use
- You need to fix "Unpinned tag for a non-immutable Action in workflow" security alerts.
- You want to ensure reproducibility by pinning a GitHub Action or dependency to a specific commit SHA.
- You need to verify if a tag exists before updating a manifest or CI workflow.
Critical Patterns
- Immutability for Actions: For GitHub Actions, always prefer the full 40-character commit SHA over a tag name. Tags are mutable and can be moved, leading to security risks or broken builds.
- Annotated vs Lightweight Tags:
- Annotated Tags:
git ls-remotereturns two entries. The one ending in^{}is the " peeled" reference pointing directly to the commit object. ALWAYS use this one. - Lightweight Tags: Return only one entry, which is the commit SHA.
- Selection Logic: When resolving, always sort the results and take the last one to ensure
^{}is preferred over the tag object SHA.
- Annotated Tags:
- Verification: Always verify the resolved SHA belongs to the expected tag before applying changes.
Commands
Resolve Tag to SHA (GitHub Actions Friendly):
# Example: Resolve 'v2' tag for actions/checkout # This command ensures that for annotated tags, the commit SHA (peeled tag ^{}) is selected # by sorting and taking the last entry (where ^{} alphabetically follows the base tag). git ls-remote --tags https://github.com/actions/checkout.git | rg "refs/tags/v2(\^\{\})?$" | sort | tail -n 1 | awk '{print $1}'List all remote tags:
git ls-remote --tags https://github.com/owner/repo.gitCheck for specific tag existence:
git ls-remote --tags https://github.com/owner/repo.git | rg "refs/tags/v1.2.3"
Workflow for GitHub Actions
- Identify the Action: Find the
uses: owner/repo@tagline in the workflow YAML. - Resolve SHA: Run
git ls-remote --tags https://github.com/owner/repo.gitfiltered by the tag. - Apply Patch: Replace the tag with the SHA and add the tag name as a comment for readability.
- Before:
uses: actions/checkout@v3 - After:
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
Limitations
- Cannot access private repositories without proper credentials (SSH/Token).
- Some actions may not use standard semver tags; always double-check the remote refs.
Commit Policy
- This skill does NOT create commits automatically without explicit permission.
- Suggested commit message:
sec(ci): pin <action-name> to commit SHA for immutability
Resources
- GitHub Security Best Practices for Actions
- Tools:
git,rg,awk
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.

