惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
V
Visual Studio Blog
罗磊的独立博客
GbyAI
GbyAI
V
V2EX
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
博客园 - 司徒正美
WordPress大学
WordPress大学
B
Blog RSS Feed

RapidFort Blog

How to Use RapidFort’s Curated Distroless Language Images Introducing a Bazel Ruleset for RapidFort’s deb-based Images RapidFort Joins Akrites: A Coordinated Response to the Open-Source Vulnerability Crisis DORA Is Not About Compliance. It Is About Resilience. Risk Over Compliance: What CISA RapidFort Test Blog Blog 4 Test Test Blog 3 Test 2 Mythos Vulnerability Assessment: Eliminate Real Risk, Not Just CVEs Securing Modern AI Workloads for National Security RBOM vs SBOM: The Critical Difference Between Software Inventory and Runtime Reality The Remediation Gap: When AI-Powered Discovery Outpaces Human Defense You Only Control 15% of Your Software. Here's How to Secure the Rest. Free ATO Readiness Cohort: Shorten Your Path to Federal Market US Cyber Strategy & Software Supply Chain Security EU CRA for Containers & Kubernetes: Scope, Deadlines & Steps PyPI, npm, and the New Frontline of Software Supply Chain Attacks What Is RBOM™? Runtime Bill of Materials vs SBOM Explained EU Cyber Resilience Act & Open Source Risk RapidFort Raises $42M Series A for Software Supply Chain Security Fintech Container Security 2026: SASM & RBOM™ RF Analyzer: Precision Container CVE Intelligence Kimia: Secure Kaniko Alternative for Kubernetes Builds AI-Powered Cyberattacks: How Defenders Must Adapt RapidFort Pioneered DoD Container Hardening | Industry Standard Turn Scanner Output into Verified CVE Elimination RapidFort's Giant Washing Machine: Cleaning Open Source at Scale Why SBOMs Fail: RBOM™ & Near-Zero CVE Images Fix the Gap Defeat NPM Supply Chain Worms: Near-Zero CVE Defense
GitHub Actions Security Audit: CI/CD Risk & Shell Injection
Kamran Shirazi · 2026-03-02 · via RapidFort Blog

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.

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.

1) pull_request_target combined with untrusted checkout and execution

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.

2) Comment-triggered workflows without strict authorization gates (issue_comment)

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.

3) Shell injection via unsafe use of GitHub event fields in run steps

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.

4) Filename injection in shell processing of pull request changes

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.

5) Automation and instruction poisoning in privileged workflows

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.

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.

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.