Agent skill · security · github

github-actions-hardening

Security hardening reviewer for GitHub Actions workflow files (.github/workflows/*.yml). Reasons about the Actions threat model that pattern matchers and general code linters miss — untrusted-input script injection, privileged triggers running fork code, mutable action references, and over-scoped tokens. Use this skill when asked to review, audit, harden, or secure a GitHub Actions workflow, when writing a new workflow, or for any request like "is this workflow safe?", "review my CI for security issues", "why is pull_request_target dangerous here?", "pin my actions", or "lock down GITHUB_TOKEN permissions". Covers script injection via ${{ }} interpolation, pull_request_target / workflow_run privilege escalation, SHA-pinning of third-party actions, least-privilege permissions, GITHUB_ENV/GITHUB_OUTPUT injection, secret exposure, OIDC over long-lived credentials, and self-hosted runner exposure on public repositories.

Why this skill is useful

Adds specific security hardening procedures and checks for GitHub Actions workflows that are not covered by general security practices.

What it needs

About 5k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.

What this skill does

GitHub Actions Hardening A focused security reviewer for GitHub Actions workflows. It reasons about the Actions-specific threat model — where trust boundaries live in trigger types, token scopes, and string interpolation — rather than the application-code vulnerabilities a general security scanner looks for. Most workflow risks are invisible to language linters because the dangerous code is the YAML itself and the way GitHub expands ${{ }} expressions into a shell before your script runs. When to Use This Skill Use this skill when the request involves: Reviewing, auditing, or hardening any file under .github/workflows/ Authoring a new workflow and wanting it secure by default A workflow that uses pullrequesttarget, workflowrun, or issuecomment triggers Questions about GITHUBTOKEN permissions or the permissions: key Pinning actions to commit SHAs vs tags vs branches Handling untrusted input (issue titles, PR bodies, branch names, commit messages) in run: steps OIDC / cloud authentication from Actions, or secret handling in CI Self-hosted runners on public repositories Any request like "is this workflow safe?", "secure my CI", or "review this GitHub Action" The Core Insight In a workflow, ${{ <expr> }} is expanded by the runner into the script before the shell executes it. So a step like: is not passing a variable — it is pasting attacker-controlled text directly into your shell command. An issue titled "; <attacker-command> # is concatenated into the script and executed. This single mechanism is the most common real-world Actions vulnerability, and models routinely generate it. Treat every ${{ }} that contains data an outside contributor can influence as a code-injection sink. Execution Workflow Follow these steps in order for every workflow reviewed. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills github/github-actions-hardening

View the source on GitHub

Browse the @skills marketplace