- Home
- Skills
- DevOps & Cloud
- GitHub Actions Hardening: pins, permissions, no injection
More screenshots
Works with the AI Agents you already use
GitHub Actions Hardening: pins, permissions, no injection
Scan and fix GitHub Actions workflows: SHA pins, least-privilege tokens, no script injection, safe triggers, zizmor and Dependabot.
Free
GitHub Actions Hardening: pins, permissions, no injection
Example session with this skill installed
Harden the workflows in .github/workflows and tell me what you changed.
- Read your context and instructions
- Compiled the github actions hardening
$ scan_workflows.py samples/bad --quiet
ci-unsafe.yml:8 ERROR missing-permissions
ci-unsafe.yml:11 ERROR unpinned-action actions/checkout@v4
ci-unsafe.yml:11 ERROR prt-checkout (pull_request_target + PR head)
ci-unsafe.yml:14 ERROR unpinned-action actions/setup-node@main
ci-unsafe.yml:17 ERROR expression-injection pull_request.title
ci-unsafe.yml:20 ERROR expression-injection github.head_ref
ci-unsafe.yml:24 ERROR unpinned-action docker://alpine:3.20
release-wide.yml:7 ERROR broad-permissions write-all
release-wide.yml:17 ERROR expression-injection inputs.tag
2 files, 10 errors, 8 warnings (exit 1)
$ scan_workflows.py samples/good
1 files, 0 errors, 0 warnings (exit 0)
$ test_scan_workflows.py
Ran 16 tests in 1.877s OK
Connects securely to your tools. The creator never sees your data.
About this skill
Most workflows fail the same four ways: an action pinned to a tag its owner can move, a token with write access it never uses, a PR title pasted straight into a shell script, and a privileged trigger that checks out the pull request's code. This skill finds them, fixes them in a safe order, and keeps them fixed.
What it does
Your agent scans .github/workflows with a standard-library Python script, then rewrites what it finds: pins every uses: to a full commit SHA with the tag in a comment, adds a read-only permissions: block, moves untrusted ${{ }} text into env:, removes pull_request_target traps, sets persist-credentials: false, and scopes secrets to the step that needs them. It also covers zizmor (which checks belong on every PR and which only on main, and the red-main surprise that follows), Dependabot for SHA pins, and how to check run history before calling a test flaky.
What you get
| Path | Holds |
|---|---|
| SKILL.md | rules, finding-to-fix table, order of operations |
| scripts/scan_workflows.py | nine-rule scanner, text or JSON, exit codes |
| scripts/test_scan_workflows.py | 16 unit tests |
| samples/ | one clean and two deliberately broken workflows |
| templates/hardened-workflow.yml | fixed-workflow template |
| templates/dependabot.yml | weekly grouped bumps for pinned actions |
| references/ | injection and triggers, pinning, zizmor gates, CI history |
Who it's for
Maintainers and developers who own a workflows directory, and agents asked to review or fix one.
Scope
Covered: GitHub Actions workflow files, token permissions, script injection, dangerous triggers, SHA pinning, Dependabot, zizmor gating, CI failure history.
Not covered: organization settings, secret scanning, self-hosted runner hardening beyond a note, other CI systems. The scanner is a line-based heuristic for block-style YAML, so pair it with zizmor. A review aid, not a security guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.
Line-based heuristic for block-style YAML; misses flow style, anchors and multi-step taint. Tested offline only. The gh, zizmor and Dependabot snippets were not executed during packaging and the template carries placeholder SHAs. Pinning does not review the pinned code.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 1 day ago
- Free with an Agensi account
- Software
Python 3.9+A repo with GitHub workflows
Gitzizmor
- Optional
GitHub CLI
uv (Python tool runner)
Scripts use the standard library only. GitHub CLI and uv are needed only for the CI-history and zizmor snippets.
Permissions
The scanner reads local workflow files only and makes no network calls. The agent edits workflow files in your repo; the optional gh commands in references/ci-history.md read run logs with your own gh login.