Skip to main content

ActionScope

Map the AWS blast radius of your GitHub Actions workflows. One command. No AWS credentials required. Instant plain-English results.

PyPI version PyPI downloads CI codecov License: MIT GitHub Marketplace Docs

๐Ÿ“– Full documentation: https://r12habh.github.io/ActionScope/ ย ยทย  ๐Ÿ›ก๏ธ Compromised Actions Database: https://r12habh.github.io/ActionScope/compromised-actions-database/

Your GitHub Actions workflows hold AWS credentials. Do you know what they can do?

ActionScope reads your .github/workflows/ files, Terraform IAM resources, and JSON IAM policies, then tells you in plain English what your CI/CD pipeline can do in AWS if it is compromised.

It also detects:

  • ๐Ÿšจ Known-compromised actions (actions-cool, tj-actions, trivy-action)
  • ๐Ÿ”“ OIDC trust policy misconfigurations (wildcards, missing claims, unsafe set operators)
  • ๐Ÿ’‰ Script injection (PR titles, issue bodies in run: blocks)
  • ๐ŸŽญ Artifact poisoning (workflow_run + untrusted artifact execution)
  • ๐Ÿค– AI agent prompt injection surfaces (Claude Code, Copilot in CI)
  • ๐Ÿ“Œ Unpinned actions with SHA resolution
  • ๐Ÿ” Reusable workflow inspection (local recursion and authenticated external fetches)
  • ๐Ÿ”— Correlated exposure paths (risky action โ†’ AWS role โ†’ reachable IAM)

ActionScope mapping a workflow's AWS blast radius

The workflow only says it assumes a role. ActionScope joins it to the IAM behind it and shows what that role can actually do if CI is compromised โ€” here: pass any IAM role (privilege escalation), wipe S3, and terminate EC2. Reproduce this scan yourself ยป

Try it on your repo in 30 seconds

pip install actionscope
cd /path/to/your/repo-with-github-actions
actionscope scan .

That's it. No AWS credentials needed, no telemetry, no sign-up. Static analysis runs in under a second on a typical repo. If you have nothing relevant, you get Overall Risk: โ„น๏ธ INFO. If you have something, you'll see exactly what and why.

Want a guided first-scan walkthrough? See Your First Scan โ€” 5 minutes from install to understanding the output.

Common flags

actionscope scan . --aws-verify        # fetch live IAM policies (read-only)
actionscope scan . --resolve-pins      # suggest full-SHA pins for unpinned actions
actionscope scan . --github-token "$GITHUB_TOKEN"  # inspect external reusable workflows
actionscope scan . --fail-on high      # exit 1 if any finding is HIGH or above
actionscope scan . --output-format sarif --output-file results.sarif
actionscope scan . --save-state        # save state for PR delta comparison

Example Output

ActionScope โ€” Blast Radius Report
Path: /my-repo  |  Workflows: 2  |  Overall Risk: ๐Ÿ”ด CRITICAL

โ›” KNOWN COMPROMISED ACTIONS (1 found)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ›” CRITICAL: actions-cool/issues-helper@v3 (issue-triage.yml)
   Compromised 2026-05-18 โ€” mutable tags may run credential-stealing code
   Fix: Remove this action or pin to a verified pre-compromise SHA

Correlated Exposure Paths (1 found)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ”ด CRITICAL: mutable action โ†’ AWS credentials
   Workflow: deploy.yml โ†’ deploy
   Action: third-party/deploy-helper@v1
   Credential: arn:aws:iam::123456789012:role/github-deploy-role
   Reachable IAM: iam:PassRole, ec2:TerminateInstances, s3:PutObject

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

deploy.yml โ†’ deploy โ†’ Configure AWS credentials
  AWS Role: arn:aws:iam::123456789012:role/github-deploy-role
  Auth: OIDC โœ“

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ iam:PassRole                โ”‚ Permissions mgmt   โ”‚ ๐Ÿ”ด CRIT  โ”‚
  โ”‚ ec2:TerminateInstances      โ”‚ Write              โ”‚ ๐ŸŸ  HIGH  โ”‚
  โ”‚ s3:GetObject                โ”‚ Read               โ”‚ ๐ŸŸข LOW   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  ๐Ÿ”ด Privilege Escalation Path: iam:PassRole on * โ€” can escalate to any role

Use as a GitHub Action

name: ActionScope Security Scan
on: [push, pull_request]

permissions:
  contents: read
  security-events: write   # for SARIF upload
  pull-requests: write     # for PR comments

jobs:
  actionscope:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: r12habh/ActionScope@v0
        with:
          fail-on: high          # fail CI if HIGH or above
          comment-pr: true       # post findings as PR comment
          upload-sarif: true     # show in GitHub Security tab
          resolve-pins: true     # suggest SHA pins for unpinned actions

What Makes ActionScope Different

ActionScope answers a question no other tool answers:

"This workflow assumes this IAM role. If the workflow is compromised, what can an attacker actually do in your AWS account?"

Capability actionlint zizmor Scorecard ActionScope
Workflow syntax validation โœ… Partial โŒ Partial
Security pattern detection โŒ โœ… โœ… โœ…
GITHUB_TOKEN permission review โŒ โœ… โœ… โœ…
Unpinned action detection โŒ โœ… โœ… โœ…
Known-compromised action detection โŒ โŒ โŒ โœ…
AWS credential source detection โŒ โŒ โŒ โœ…
Workflow โ†’ IAM role correlation โŒ โŒ โŒ โœ…
Action โ†’ AWS exposure-path correlation โŒ โŒ โŒ โœ…
Live AWS IAM policy verification โŒ โŒ โŒ โœ…
Blast radius in plain English โŒ โŒ โŒ โœ…
OIDC trust policy analysis โŒ โŒ โŒ โœ…
Script injection detection โŒ Partial โŒ โœ…
Reusable workflow inspection โŒ Partial โŒ โœ…
SARIF / GitHub Security tab โŒ โœ… โœ… โœ…

How It Works

ActionScope performs static analysis only by default. It never sends your code to an external service and does not require AWS credentials unless you explicitly enable live AWS verification. When a GitHub token is supplied, it can fetch referenced external reusable workflow YAML from GitHub for analysis.

.github/workflows/*.yml
terraform/**/*.tf          โ†’  ActionScope  โ†’  Blast Radius Report
policies/**/*.json                              + PR Comment
                                                + SARIF โ†’ GitHub Security Tab
  1. Find aws-actions/configure-aws-credentials in workflows
  2. Follow local reusable workflows and optionally inspect external calls
  3. Extract role ARNs and credential patterns
  4. Match roles to IAM policies in Terraform or JSON files
  5. Classify IAM actions using the policy-sentry action database
  6. Correlate risky actions with AWS credentials in the same job
  7. Detect privilege escalation paths
  8. Check for known-compromised actions in the bundled database
  9. Output a plain-English blast radius report

Live AWS Verification (--aws-verify)

pip install actionscope[aws]
actionscope scan . --aws-verify

Requires read-only IAM permissions: iam:GetRole, iam:ListAttachedRolePolicies, iam:GetPolicy, iam:GetPolicyVersion, iam:ListRolePolicies, iam:GetRolePolicy.

See docs/aws-verify-permissions.md for the minimal required policy.

Security Detectors

๐Ÿšจ Known-Compromised Actions

Checks workflows against a curated database of GitHub Actions with documented supply chain compromises. Updated with each ActionScope release.

Current entries: actions-cool/issues-helper (2026-05-18), actions-cool/maintain-one-comment (2026-05-18), tj-actions/changed-files (2025-03-19), and aquasecurity/trivy-action (2026-03-19).

๐Ÿ”“ OIDC Trust Policy Analysis

Detects wildcard subjects, missing sub/aud conditions, unsafe ForAllValues use, and insufficient branch/environment scoping in GitHub OIDC trust policies.

๐Ÿ’‰ Script Injection Detection

Finds direct interpolation of attacker-controlled GitHub context values (github.event.pull_request.title, github.event.issue.body, etc.) into run: shell blocks: the "Pwn Request" attack class.

๐ŸŽญ Artifact Poisoning Detection

Identifies workflow_run workflows that download and execute artifacts from potentially untrusted fork PR workflows with secret access.

๐Ÿค– AI Agent Prompt Injection Surface

Detects Claude Code, GitHub Copilot Agent, Gemini CLI and similar AI coding agents configured with write permissions in untrusted PR contexts.

๐Ÿ“Œ Action Pinning + SHA Resolution

Detects unpinned actions and resolves tags to current SHAs via the GitHub API. Distinguishes full SHAs (safe) from short SHAs (still mutable) and tags.

๐Ÿ” Reusable Workflow Inspection

Detects job-level uses: calls, reports mutable reusable-workflow refs, and recursively inspects local workflows. Supply --github-token (or GITHUB_TOKEN) to fetch external reusable workflow YAML through GitHub's API; without a token, ActionScope reports the delegated workflow as uninspected instead of treating it as clean. Traversal is cycle-safe and follows GitHub's 10-level and 50-workflow limits.

Reusable workflow inspection guide

๐Ÿ”— Correlated Exposure Paths

Connects mutable or known-compromised actions to AWS credentials configured in the same workflow job. When IAM policy context is available, the path includes the highest-risk permissions that action could reach; otherwise it explicitly marks the blast radius as unknown.

Correlated exposure paths guide

โšก IAM Privilege Escalation Paths

Detects documented escalation paths including PassRole, CreatePolicyVersion, AttachRolePolicy, CreateAccessKey, Lambda+PassRole, EC2+PassRole, CloudFormation+PassRole, and more.

Research

ActionScope is backed by an empirical study of 493 public GitHub repositories and 3,981 GitHub Actions workflow files using AWS.

Finding Result
Using static AWS keys (not OIDC) 58.2% of repos
Using unpinned external actions 95.5% of repos
pull_request_target + write permissions 8.1% of repos
Exposing role ARNs directly in workflows 44.0% of repos

โ†’ Full research findings | Scanner and anonymized dataset

Output Formats

actionscope scan . --output-format terminal   # default: colored Rich output
actionscope scan . --output-format json       # for CI integration
actionscope scan . --output-format markdown   # for PR comments
actionscope scan . --output-format sarif      # for GitHub Security tab

FAQ

How do I detect compromised GitHub Actions like tj-actions or actions-cool?

ActionScope ships a curated database of known-compromised actions (tj-actions, actions-cool/issues-helper, actions-cool/maintain-one-comment, trivy-action) and scans every uses: reference in your workflows against it. Run actionscope scan . and any compromised reference appears as a CRITICAL finding with the advisory URL.

What can my GitHub Actions workflow do in my AWS account?

ActionScope extracts every aws-actions/configure-aws-credentials step from your workflows, follows the role ARN, and correlates it with Terraform or JSON IAM policy files in the same repo. The output is a plain-English blast-radius report โ€” every IAM action the workflow can perform, classified by risk. Add --aws-verify to fetch the live policies from AWS using read-only IAM calls.

How do I scan a GitHub Actions workflow for security issues without AWS credentials?

actionscope scan . runs as pure static analysis by default. It needs no AWS credentials and no GitHub token. A token is optional for --resolve-pins and for inspecting external reusable workflows; local workflow analysis never needs one.

How do I find script injection or pull_request_target risks?

ActionScope detects direct injection of attacker-controlled GitHub event fields (PR titles, issue bodies, branch names) into run: blocks, and flags pull_request_target jobs that combine untrusted event data with write-capable GITHUB_TOKEN permissions โ€” the pattern behind the April 2026 prt-scan attack.

How do I get GitHub Code Scanning alerts for my workflows?

Run actionscope scan . --output-format sarif --output-file results.sarif and upload results.sarif to the GitHub Security tab via the github/codeql-action/upload-sarif action. ActionScope emits SARIF rules AS001โ€“AS016 covering AWS exposure, OIDC trust, unpinned actions, compromised actions, script injection, environment hardening, and correlated action-to-AWS exposure paths.

How do I pin GitHub Actions to a full commit SHA?

actionscope scan . --resolve-pins uses the GitHub API to look up the current full-SHA tip for every mutable uses: owner/repo@vX reference in your workflows and prints a suggested pinned version with the tag preserved as a comment.

What's the difference between ActionScope and actionlint, zizmor, or Checkov?

actionlint validates workflow YAML syntax. zizmor and Scorecard detect workflow security patterns. Checkov scans IAM policies independently. ActionScope is the only tool that crosses the boundary โ€” it ties a specific workflow to a specific IAM role to a specific blast radius.

Does ActionScope require AWS credentials?

Only if you opt in to --aws-verify, which makes read-only IAM API calls to fetch live attached policies. See docs/aws-verify-permissions.md for the exact permission set required.

Documentation

๐Ÿ“– Full docs site: https://r12habh.github.io/ActionScope/

Contributing

See CONTRIBUTING.md for setup instructions.

New to the codebase? Start with a good first issue.

The most impactful contributions right now:

  1. Add IAM actions to the risk database
  2. Add compromised action entries when a new supply-chain attack happens
  3. Add test fixtures from real-world workflows, anonymized
  4. Improve error messages when policies are missing

Built By

Rishabh Singh.

GitHub


ActionScope performs static analysis by default. It does not transmit your code or credentials to any external service.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

actionscope-0.4.0.tar.gz (326.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

actionscope-0.4.0-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file actionscope-0.4.0.tar.gz.

File metadata

  • Download URL: actionscope-0.4.0.tar.gz
  • Upload date:
  • Size: 326.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for actionscope-0.4.0.tar.gz
Algorithm Hash digest
SHA256 55f0a7229992c388874fb7eb7562e04271bfb868e0bec7e0fe596fe792525d20
MD5 c72b0d1f7eb9ed28bd94c0a9bf31bdfa
BLAKE2b-256 e831c9104d7de16c4e2b3db0bde1642120c540dd0c9c04d0730f2119824d872b

See more details on using hashes here.

Provenance

The following attestation bundles were made for actionscope-0.4.0.tar.gz:

Publisher: release.yml on r12habh/ActionScope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file actionscope-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: actionscope-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 100.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for actionscope-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 153f69ca05c690de0083a01fa767df78c6124f584c5d22dbcca2f59a4e741f39
MD5 2931b2a622474e5f335381d4ba8f4c93
BLAKE2b-256 d5ed08b64527a9d9d11612c48fcbe2fea669c534992463d1d10462c2db7968b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for actionscope-0.4.0-py3-none-any.whl:

Publisher: release.yml on r12habh/ActionScope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page