GitHub Actions Under Active Exploitation: Audit Your Org for High-Risk Workflow Patterns
%20(2).png)
Recent public analysis has highlighted an active effort to compromise GitHub Actions workflows by exploiting repeatable workflow misconfigurations. The most common patterns include unsafe use of pull_request_target, comment-triggered automation without strong authorization controls, and command injection risk created when attacker-controlled event fields are embedded into shell steps. This post also reflects review feedback from Aaron Lippold that helped improve clarity and technical precision.
RapidFort reviewed our open-source repositories and container images against these publicly documented workflow risk patterns and found no indicators of impact.
This post summarizes the workflow patterns worth auditing and shares an open-source, organization-wide audit tool RapidFort published so maintainers can quickly assess exposure across many repositories.
The Workflow Patterns to Audit
The pull_request_target event runs in the context of the base repository. Risk increases when a workflow checks out pull request-controlled code and then executes it in that privileged context. The issue is the combination of elevated context with untrusted code execution.
Review any workflow triggered by pull_request_target and confirm whether it checks out the pull request head ref, including from forks, and runs scripts, build steps, or actions sourced from that checkout. Treat any workflow that does so as a high-priority hardening candidate, especially if secrets or elevated token permissions are available in the same job.
Workflows triggered by issue_comment can be useful for maintainers, but they require strong authorization checks to avoid turning public comments into an execution mechanism. Risk arises when a workflow reacts to a comment string and performs meaningful actions without confirming that the commenter is trusted.
Review comment-triggered workflows and ensure privileged behavior is gated to trusted actors through clear, enforceable checks. This is particularly important for workflows that publish artifacts, create releases, modify repository state, access protected environments, or use secrets.
Many GitHub Actions context fields can be influenced by pull request authors, including branch names, pull request titles, commit messages, and file paths. If these values are inserted into shell commands without safe handling, they can alter command behavior and, in some cases, enable command injection.
Review run: steps for direct usage of ${{ github.event.* }} and related context values inside shell commands, especially in scripts that perform parsing, loops, string concatenation, or dynamic command construction. Pay close attention to unquoted variables, ad hoc string manipulation, and any command built from event fields.
Workflows frequently enumerate changed files using diff output, git commands, or filesystem discovery, then process those filenames in shell loops. When filenames originate from pull request content, treat them as untrusted input. Risk increases when filenames are expanded without strict quoting or used to construct commands.
Identify workflows that consume pull request-derived filenames and confirm that variables are consistently quoted, that scripts avoid unsafe word splitting, and that filenames do not influence command execution paths.
As organizations add automation agents, including AI-assisted workflows, a newer class of risk is emerging: instruction or configuration poisoning. If an automated workflow reads instructions, configuration, or directives from pull request-controlled content while running with elevated permissions or secrets access, a contributor can attempt to influence what the automation executes.
Review any workflow that consumes pull request-provided instruction or configuration files and confirm that privileged operations are isolated from untrusted inputs. Ensure pull request content cannot change what privileged steps execute.
RapidFort’s Open-Source Organization-Wide Audit Tool
To make this audit practical at scale, RapidFort published an open-source tool that scans GitHub Actions workflows across an entire organization and generates a report focused on high-signal findings:
https://github.com/rapidfort/gh-action-security-audit
The tool helps identify workflows that lack explicit permissions: blocks, usage of pull_request_target with higher-risk characteristics, comment-triggered workflows that may be missing guardrails, and secret names referenced in workflow files (not secret values). It also supports organization-level review of default workflow token posture and the relationship between secret visibility and actual workflow usage, so access can be reduced where appropriate.
How to Triage Findings
When prioritizing remediation, start with workflows that can execute pull request-controlled code in a privileged context. Next, focus on comment-triggered workflows that can reach privileged actions without strict authorization gates. Then address workflows where event fields are embedded into shell commands, followed by workflows that rely on broad defaults instead of explicit permissions. Finally, tighten secrets visibility so secrets are accessible only where they are required.
Subscribe to receive the latest blog posts to your inbox every week.
Latest posts
%20(2).png)
GitHub Actions Under Active Exploitation: Audit Your Org for High-Risk Workflow Patterns

.png)
What Is an RBOM (Runtime Bill of Materials)? Clearing Unused Code

.png)
How the EU Cyber Resilience Act Reshapes Open Source Risk for Commercial Software

Address
440 North Wolfe Road, Sunnyvale, CA 94085
© 2025 RapidFort. All rights reserved.