secure-github-actions
Skill15 starsChanged 9 months agoMITView on GitHub
Secure GitHub Actions workflows against supply-chain, privilege, and shell-injection risks. Use when creating, scaffolding, editing, or reviewing `.github/workflows/*.yml`, reusable workflows, `action.yml`, or Dependabot config for GitHub Actions. Also use for full repository security audits ("audit my workflows", "harden this repo", "security scan", "pin actions to SHA"), secrets scanning with gitleaks and trufflehog, and pre-public-release security reviews. Enforce full 40-character commit SHA pinning, avoid `pull_request_target` on untrusted code, pass GitHub context into `run:` steps via `env:`, and set least-privilege permissions.
- Installs packages
In this repository17 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- auto-voting-relayersSkill
- create-vechain-dappSkill
- frontendSkill
- grill-meSkill
- indexer-coreSkill
- monkeySkill
- smart-contract-developmentSkill
- stargateSkill
- thorSkill
- translateSkill
- vebetterdao-navigatorsSkill
- vebetterdaoSkill
- vechain-coreSkill
- vechain-kitSkill
- vechain-react-native-devSkill
- x-2-earn-appsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Create, review, and audit GitHub Actions workflows with supply-chain-safe defaults.
- Distinctive: line 18
Read the relevant reference files first: When the user's request involves any topic in the reference table below, read those files before …
- Very specific: line 23
Set explicit least-privilege
permissions:: Default to read-only and grant write scopes only to the specific job that needs them. - Distinctive: line 24
Always run the full audit checklist: when asked to "audit", "harden", or "security scan" a repository.
- Distinctive: line 25
Never silently skip a check: If a tool is missing (gitleaks, trufflehog, zizmor), report it and suggest installation.
- Distinctive: line 33
Read references/workflows.md and references/secure-patterns.md.
- Very specific: line 39
Prefer pull_request over pull_request_target.
- Distinctive: line 41
Avoid exposing secrets or write tokens to untrusted code paths.
- Distinctive: line 45
Prefer simple shell over adding a new third-party action when either works.
- Distinctive: line 46
Add or update maintenance guardrails:
- Very specific: line 47
Ensure Dependabot updates the github-actions ecosystem.
- Distinctive: line 48
Call out transitive risk: pinned actions can still reference mutable actions internally.
- Distinctive: line 52
When asked to "audit", "harden", or "security scan" a repository:
≈ “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
Secure GitHub Actions
Create, review, and audit GitHub Actions workflows with supply-chain-safe defaults.
CRITICAL RULES
- Read the relevant reference files first. When the user's request involves any topic in the reference table below, read those files before doing anything else. Briefly mention which files you are reading so the user can confirm the skill is active.
- Pin every non-local
uses:reference to a full 40-character commit SHA. Treat@v*,@main,@master, branch names, and short SHAs as security debt. - Never invent SHAs. Resolve them from GitHub or ask the user; if you cannot verify the right SHA, say so explicitly instead of fabricating one.
- Do not introduce
pull_request_targetunless the user explicitly requires it and the workflow never executes untrusted code with secrets or write permissions. - Never splice untrusted context directly into shell. Move
${{ github.* }},${{ inputs.* }}, and similar values intoenv:and quote the shell variable. - Set explicit least-privilege
permissions:. Default to read-only and grant write scopes only to the specific job that needs them. - Always run the full audit checklist when asked to "audit", "harden", or "security scan" a repository.
- Never silently skip a check. If a tool is missing (gitleaks, trufflehog, zizmor), report it and suggest installation.
- After compaction or context loss, re-read this SKILL and the reference files before continuing.
Operating procedure
For writing or editing workflows
- Classify the task: new workflow, workflow edit, reusable workflow, or security review.
- Read references/workflows.md and references/secure-patterns.md.
- Audit every
uses:reference:- Local actions like
./.github/actions/fooare fine. - Step-level actions and job-level reusable workflows must use full SHAs.
- Preserve the human release label in a comment (e.g.,
# v4.3.1).
- Local actions like
- Audit the trust boundary:
- Prefer
pull_requestoverpull_request_target. - Assume forked PR data is untrusted.
- Avoid exposing secrets or write tokens to untrusted code paths.
- Prefer
- Audit every
run:step:- Pass dynamic values through
env:. - Quote shell variables.
- Prefer simple shell over adding a new third-party action when either works.
- Pass dynamic values through
- Add or update maintenance guardrails:
- Ensure Dependabot updates the
github-actionsecosystem. - Call out transitive risk: pinned actions can still reference mutable actions internally.
- Ensure Dependabot updates the
For full security audits
When asked to "audit", "harden", or "security scan" a repository:
- Read references/audit-checklist.md.
- Execute all checks, using subagents to parallelize where possible.
- Present findings grouped by severity: CRITICAL, HIGH, MEDIUM, LOW.
- End with a summary table and prioritized action list.
Reference files
| Topic | File | Read when... |
| Workflow hardening patterns | references/workflows.md | Creating, editing, or reviewing workflows |
| Secure workflow templates | references/secure-patterns.md | Writing new workflows from scratch |
| Full audit procedure | references/audit-checklist.md | Running a security audit on a repository |
| SHA pinning automation | references/sha-pinning.md | Pinning actions to commit SHAs |
Tools
The audit checks for these tools and reports missing ones:
| Tool | Purpose | Install |
gitleaks | Scan git history for secrets | brew install gitleaks |
trufflehog | Deep secrets scanning with verification | brew install trufflehog |
zizmor | Static analysis for GH Actions | brew install woodruffw/tap/zizmor |
gh | GitHub CLI for API calls | brew install gh |
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.

