/security-agent-skills:hunting-cicd-workflow-injectionfrom security-agent-skills
Audits CI/CD workflows for injection attacks where attacker-controlled repository data reaches privileged execution contexts. Covers untrusted event fields, pull_request_target, mutable action pins, cache poisoning, self-hosted runners, and over-scoped tokens.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A CI/CD pipeline turns dangerous where data an outside contributor controls, an issue title, a branch name, a pull-request body, the contents of a fork, reaches a step that runs with the repository's secrets and write token. The two headline shapes are an expression that interpolates an untrusted event field straight into a shell command, and a privileged trigger that checks out and builds the untrusted pull-request head. You hunt it by resolving, per workflow, what triggers it (and therefore whether secrets and a write token are in scope) and then following each untrusted field to the run step or checkout it reaches. The discipline is separating an untrusted value interpolated into a shell from one passed safely through an environment variable, and a privileged trigger that runs untrusted code from one that only reads metadata. The OIDC trust boundary is the CI OIDC skill's; this skill owns data reaching execution.
Audit only pipelines in repositories you own or are authorized to assess, and trigger a workflow only against a repository in scope, a proof-of-concept run executes with real secrets and a real token. Adjudicate on the workflow and its trigger. If you can't name the authorization, stop.
Resolve the trigger and the token scope first. For each workflow, read the trigger and determine whether it runs with secrets and a write-scoped token in scope. A plain pull-request trigger runs a fork's job without secrets and with a read-only token; a pull_request_target, a workflow_run, or a push or issue trigger runs in the base repository's context with secrets. The trigger decides whether an injected value has anything worth reaching, so settle it before flagging.
Check untrusted expression interpolation. Look for an event field an outsider controls (an issue or pull-request title or body, a branch or label name, a commit message, an author name) interpolated directly into a run-step shell command, so the field's shell metacharacters execute.
Check the privileged-checkout shape. Look for a pull_request_target or workflow_run job that checks out the pull-request head ref and then builds, tests, or runs a script from it, executing untrusted code with the base repository's write token and secrets available.
Check action pinning and cache trust. Look for a third-party action referenced by a mutable tag or a branch rather than a full commit digest, so an upstream tag move injects new code, and for a cache a low-trust job writes with a key a privileged job restores and executes.
Check runner and token blast radius. Look for a self-hosted runner reachable from fork pull requests (non-ephemeral, carrying persistent state) and for a token scoped wider than the workflow needs (a broad write-all permission) that widens the damage any of the above can do.
Confirm and record. Confirm by setting the untrusted field to a payload (or opening a fork pull request) and showing the injected command runs, or the untrusted head executes, with secrets or the write token in scope. Kill the lead if the untrusted expression is assigned to an environment variable first and the step references the quoted variable (the canonical safe pattern) rather than interpolating it into the command string, if the trigger is a plain pull request so the fork job runs without secrets and a read-only token (and no self-hosted runner or explicit secret is present), if a pull_request_target job never checks out the head ref and only reads metadata (a labeler), if the action is pinned to a full commit digest even with a version comment, if the untrusted field is structurally constrained (a numeric identifier) and cannot become a shell token, or if repository or organization policy blocks fork workflows from running without approval and the runner is ephemeral. Record the workflow, the trigger, the untrusted field, and the privileged step it reaches.
Confirm. A workflow triggered on new issues has a run step
echo "Issue: ${{ github.event.issue.title }}". An attacker opens an issue titled with a shell payload; the pipeline interpolates it into the command and executes it in a context that has repository secrets. Confirmed command injection through an untrusted event field interpolated into a run step with secrets in scope,highrising tocriticalwith a write token, remediation = pass the title through a quoted environment variable and never interpolate untrusted event data into a run command.Kill. The same title flows through
env: TITLE: ${{ github.event.issue.title }}and the step runsecho "Issue: $TITLE", referencing the quoted variable. The value is data to the shell, not command text, and the workflow uses the default read-only token. Killed,kill_reason= "the untrusted value is passed through a quoted environment variable rather than interpolated into the command string, so it cannot become shell syntax."
${{ }}? Then the title's
metacharacters run; only a quoted environment variable makes it inert data.You need each workflow, its trigger and whether that trigger carries secrets and a write token, every place an untrusted event field is interpolated into a run step, every privileged-trigger job and whether it checks out the head ref, the action references and whether they are digest-pinned, the cache keys crossed between jobs, the runner type, and the token permissions. For each untrusted field, decide whether it reaches a privileged step as command text or untrusted code. Reading the workflow tells you the path; triggering it tells you whether the injection runs.
auditing-cicd-oidc-trust - owns the pipeline's OIDC trust boundary (which cloud identities the workflow
can assume); this skill owns attacker-controlled data reaching execution, an orthogonal source and sink.hunting-supply-chain-risks - the broader dependency and artifact-integrity audit; the mutable-action-tag
shape here is the pipeline-local edge of that supply-chain surface, cross-referenced rather than duplicated.hunting-non-human-identity-and-secret-reachability - the secrets a compromised pipeline step can reach;
a confirmed injection here is the execution primitive that makes those secrets reachable.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive./auditing-account-abstraction-and-paymaster-trustAudit an ERC-4337 account-abstraction deployment for trust misplaced in the user-operation lifecycle: a smart account whose validation accepts a signature or nonce it should reject, a paymaster that agrees to sponsor gas for operations it should not so an attacker drains its deposit, a bundler or entry-point assumption that lets a user operation be replayed or reordered for gain, and validation logic that reads mutable state or reaches outside its allowed scope. Covers smart-contract wallets, paymasters, bundlers, and the entry point in an account-abstraction stack where a user operation is validated and sponsored before it executes. Use when a user operation is validated, paid for, and executed by separate parties and that trust split is the boundary. The crafted user operation is the source, the drained paymaster or unauthorized execution is the sink, and the over-permissive validation or sponsorship rule is the bug./auditing-account-recovery-and-reset-trustAudit password reset and account recovery flows for the trust that lets an attacker take over an account: a reset token that is guessable, long-lived, reusable, or not bound to the account it was issued for, a recovery path that verifies a weaker factor than login and bypasses multi-factor, a reset link whose host comes from an attacker-controllable header so the token leaks, and a recovery that trusts an unverified email or phone change to redirect the reset. Covers the recovery surface of authentication systems, where resetting a credential or recovering access is the alternate door into an account. Use when an application offers password reset or account recovery and that flow is a path to authentication. The attacker-driven recovery request is the source, the account it takes over is the sink, and the weak token, bypassed factor, or leaked reset link that grants it is the bug./auditing-admission-control-policy-gapsAudit cluster admission control for gaps that let a non-compliant or hostile workload through: a validating webhook that fails open when its backend is unreachable, a policy that scopes by namespace or label and misses the namespaces that matter, a mutating webhook whose changes are trusted downstream, and an ordering or exemption that lets a privileged pod bypass the checks meant to stop it. Covers Kubernetes admission webhooks and policy engines that are supposed to enforce workload security at create and update time. Use when admission policies are the control that keeps privileged, unsigned, or over-permissioned workloads out of the cluster. The workload submitted for admission is the source, the admitted resource is the sink, and the policy gap that let it through is the bug./auditing-ai-agent-permissionsAudit what an AI agent is actually allowed to do versus what its task needs. Covers excessive agency (tools, scopes, and autonomy beyond the job), missing human-in-the-loop gates on irreversible actions, over-broad credentials and their blast radius, sandbox and code-interpreter escape, unfiltered egress, and unbounded resource or spend (denial-of-wallet). Use when granting an agent a tool or scope, reviewing an agent's permission posture, or deciding which actions need approval. The model's restraint is not a control; permissions are.Other plugins' skills for the same job