GitHub Actions Security Review
Report concrete, externally exploitable workflow risks. Do not inflate the report with theoretical patterns that cannot reach an impact.
When to Use
Use when reviewing:
.github/workflows/*.yml or .yaml
- local composite or JavaScript actions
- workflow-related shell or repository scripts
- token permissions and secret exposure
- fork PR, issue comment, or other untrusted event handling
- reusable workflow trust boundaries
- third-party action pinning and supply-chain risk
- self-hosted runners, caches, artifacts, and environments
Threat Model
By default, model an external attacker without repository write access who can create fork pull requests, issues, comments, branch names in their fork, and other public GitHub content.
Expand the threat model only when the user requests insider, compromised-maintainer, or runner-host scenarios.
Workflow
1. Inventory the attack surface
For each workflow record:
- triggers and filters
- token
permissions
- secrets and environments
- checkout refs
run steps and interpolated expressions
- third-party actions and pinning
- local actions and referenced scripts
- artifacts, caches, and self-hosted runners
- deployment or release capabilities
2. Trace attacker-controlled data
Follow untrusted values such as:
- PR titles, bodies, branch names, and labels
- issue and comment bodies
- fork-controlled files and scripts
- workflow inputs callable by less-trusted repositories
- artifact or cache contents from untrusted jobs
Trace the value from entry point to execution, credential access, write permission, or deployment impact.
3. Check high-risk classes
Review for:
pull_request_target combined with fork checkout or execution
- attacker-controlled expressions interpolated into shell
run blocks
- comment-triggered commands without authorization checks
- privileged tokens or long-lived credentials exposed to untrusted code
- local actions or configuration loaded from a PR checkout
- overbroad workflow or job permissions
- unpinned or compromised third-party actions
- artifact or cache poisoning across trust boundaries
- persistent compromise of self-hosted runners
- unsafe reusable workflow callers or secret inheritance
4. Confirm mitigations
Before reporting, check:
- event and branch filters
if authorization conditions
- safe use of expressions through
env or typed action inputs
- read-only token context
- environment approvals
- immutable action SHAs
- separate privileged and untrusted jobs
- sandboxing and runner cleanup
5. Grade confidence
Report only findings with a plausible attack path.
- High: complete entry-to-impact path confirmed
- Medium: material risk with one unresolved environmental dependency
- Low: theoretical or already mitigated, omit from findings and optionally note as hardening
6. Write each finding
Include:
- severity and confidence
- workflow and exact location
- attacker entry point
- payload or controlled value
- execution path
- impact and token or secret scope
- concrete remediation
- verification step
If the attack path cannot be explained, do not report it as a vulnerability.
Safe Patterns That Need Context
Do not automatically flag:
pull_request_target without fork checkout or untrusted execution
- expressions used in
if or action with fields
- numeric PR identifiers
- schedule or manual inputs restricted to trusted writers
- GitHub-hosted runner use by itself
- secrets references that never reach untrusted jobs
Completion
Return:
- reviewed workflow set
- findings ordered by severity
- needs-verification items
- reviewed-and-cleared high-risk areas
- hardening suggestions separated from exploitable findings
- limitations in repository or organization visibility
1---2name: security-review3description: 'Review GitHub Actions workflows and local actions for exploitable security weaknesses involving untrusted triggers, token permissions, secrets, expression injection, privileged checkouts, third-party actions, artifacts, caches, and runners. Use when asked for a GitHub Actions security review or workflow hardening assessment.'4compatibility: 'Read-only by default. Requires access to workflow files, local actions, and referenced scripts. Applying fixes requires repository write access.'5metadata:6 category: github7 type: actions-security-review8 source: https://skillmd.com/skills/revrebel/security-review9 upstream: consolidated10---1112# GitHub Actions Security Review1314Report concrete, externally exploitable workflow risks. Do not inflate the report with theoretical patterns that cannot reach an impact.1516## When to Use1718Use when reviewing:1920- `.github/workflows/*.yml` or `.yaml`21- local composite or JavaScript actions22- workflow-related shell or repository scripts23- token permissions and secret exposure24- fork PR, issue comment, or other untrusted event handling25- reusable workflow trust boundaries26- third-party action pinning and supply-chain risk27- self-hosted runners, caches, artifacts, and environments2829## Threat Model3031By default, model an external attacker without repository write access who can create fork pull requests, issues, comments, branch names in their fork, and other public GitHub content.3233Expand the threat model only when the user requests insider, compromised-maintainer, or runner-host scenarios.3435## Workflow3637### 1. Inventory the attack surface3839For each workflow record:4041- triggers and filters42- token `permissions`43- secrets and environments44- checkout refs45- `run` steps and interpolated expressions46- third-party actions and pinning47- local actions and referenced scripts48- artifacts, caches, and self-hosted runners49- deployment or release capabilities5051### 2. Trace attacker-controlled data5253Follow untrusted values such as:5455- PR titles, bodies, branch names, and labels56- issue and comment bodies57- fork-controlled files and scripts58- workflow inputs callable by less-trusted repositories59- artifact or cache contents from untrusted jobs6061Trace the value from entry point to execution, credential access, write permission, or deployment impact.6263### 3. Check high-risk classes6465Review for:6667- `pull_request_target` combined with fork checkout or execution68- attacker-controlled expressions interpolated into shell `run` blocks69- comment-triggered commands without authorization checks70- privileged tokens or long-lived credentials exposed to untrusted code71- local actions or configuration loaded from a PR checkout72- overbroad workflow or job permissions73- unpinned or compromised third-party actions74- artifact or cache poisoning across trust boundaries75- persistent compromise of self-hosted runners76- unsafe reusable workflow callers or secret inheritance7778### 4. Confirm mitigations7980Before reporting, check:8182- event and branch filters83- `if` authorization conditions84- safe use of expressions through `env` or typed action inputs85- read-only token context86- environment approvals87- immutable action SHAs88- separate privileged and untrusted jobs89- sandboxing and runner cleanup9091### 5. Grade confidence9293Report only findings with a plausible attack path.9495- **High:** complete entry-to-impact path confirmed96- **Medium:** material risk with one unresolved environmental dependency97- **Low:** theoretical or already mitigated, omit from findings and optionally note as hardening9899### 6. Write each finding100101Include:102103- severity and confidence104- workflow and exact location105- attacker entry point106- payload or controlled value107- execution path108- impact and token or secret scope109- concrete remediation110- verification step111112If the attack path cannot be explained, do not report it as a vulnerability.113114## Safe Patterns That Need Context115116Do not automatically flag:117118- `pull_request_target` without fork checkout or untrusted execution119- expressions used in `if` or action `with` fields120- numeric PR identifiers121- schedule or manual inputs restricted to trusted writers122- GitHub-hosted runner use by itself123- secrets references that never reach untrusted jobs124125## Completion126127Return:128129- reviewed workflow set130- findings ordered by severity131- needs-verification items132- reviewed-and-cleared high-risk areas133- hardening suggestions separated from exploitable findings134- limitations in repository or organization visibility