cicd
Skill này làm gì
Danh mục này trỏ đến các hướng dẫn về tấn công vào pipeline build và triển khai. Danh mục dành cho các đội bảo mật rà soát cách pipeline xử lý mã bên ngoài và bí mật.
Khi nào nên dùng
- ✓Khi pipeline build của một công ty chạy mã từ người đóng góp bên ngoài và cần được rà soát.
- ✓Khi bạn muốn kiểm tra xem các máy build tự host có bị phơi bày không.
- ✓Khi bạn cần tìm điểm yếu pipeline nào áp dụng cho một nhà cung cấp CI cụ thể.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/cicd/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
“Pipeline CI của chúng tôi build các pull request từ người đóng góp bên ngoài. Bạn có thể kiểm tra xem điều đó có an toàn không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xác định nhà cung cấp CI và cách thiết lập workflow, rồi tải hướng dẫn phù hợp với loại điểm yếu pipeline đó.
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.
CI/CD Pipeline Exploitation — Category Overview
Routing skill for attacks against build / deployment pipelines. Pipelines run attacker-influenced code (PRs, dependencies, build scripts) with privileged tokens, cloud OIDC, and write access to artifacts that downstream consumers trust. Compromise of a single pipeline often equals compromise of every release built by it.
Sub-Skills
| Sub-Skill | Covers | When to Load |
|---|---|---|
| poisoned-pipeline-execution | Direct + Indirect PPE: injecting commands via attacker-controllable build files (Makefile, package.json scripts, build.gradle, Dangerfile, .pre-commit-config.yaml), pull_request_target abuse, fork-PR build triggers, dependency/test-script execution. |
Target builds untrusted PR code; you can land a malicious file or dependency. |
| github-actions-injection | ${{ }} template injection via untrusted context (issue/PR title, body, branch name, commit message) into run: steps, pull_request_target + PR-head checkout, GITHUB_TOKEN permission abuse, artifact/cache poisoning, action pinning (tag vs SHA). |
Target uses GitHub Actions and accepts external contributors. |
| self-hosted-runner-abuse | Non-ephemeral runner persistence, fork-PR job execution on self-hosted, runner-label targeting, secret theft from runner env, lateral movement into internal network / cloud metadata. | Target advertises self-hosted runners (workflow runs-on: label or public job logs). |
| cicd-secrets-exfil | Extracting CI secrets / OIDC tokens: echo / printenv exfil, masking bypass (base64, char-split), OIDC -> cloud role assumption, GITHUB_TOKEN / CI_JOB_TOKEN scope abuse, cache / artifact secret leakage. |
You already have code execution in a CI job; need to convert it into durable cloud / registry access. |
Provider fingerprinting
# GitHub Actions
ls -la <REPO>/.github/workflows/ 2>/dev/null
gh api "repos/<OWNER>/<REPO>/actions/workflows" --jq '.workflows[] | {name,path,state}'
# GitLab CI
test -f <REPO>/.gitlab-ci.yml && echo "GitLab CI"
ls <REPO>/.gitlab/ci/ 2>/dev/null
# Jenkins
test -f <REPO>/Jenkinsfile && echo "Jenkins"; find <REPO> -name 'Jenkinsfile*' -type f
# CircleCI / Buildkite / Drone / Azure / Travis
for f in .circleci/config.yml .buildkite/pipeline.yml .drone.yml azure-pipelines.yml .travis.yml; do
test -f "<REPO>/$f" && echo "$f"
done
# Provider hints in README / badges
grep -RhoE 'github\.com/[^/]+/[^/]+/actions|gitlab\.com/[^/]+/[^/]+/-/pipelines|circleci\.com/gh/|app\.travis-ci\.com' <REPO> 2>/dev/null | sort -u
Workflow file recon (GitHub Actions example)
# Local checkout
find <REPO>/.github/workflows -type f \( -name '*.yml' -o -name '*.yaml' \) -print
# Remote, no clone needed
gh api "repos/<OWNER>/<REPO>/contents/.github/workflows" --jq '.[].name'
# Pull every workflow at HEAD
for wf in $(gh api "repos/<OWNER>/<REPO>/contents/.github/workflows" --jq '.[].path'); do
echo "=== $wf ==="
gh api "repos/<OWNER>/<REPO>/contents/$wf" --jq '.content' | base64 -d
done
Risky-surface triage
| Signal | Why it matters | Grep |
|---|---|---|
pull_request_target: trigger |
Runs with write GITHUB_TOKEN + secrets while checking out attacker code |
grep -rE '^\s*pull_request_target\s*:' .github/workflows/ |
actions/checkout with ref: ${{ github.event.pull_request.head.sha }} under pull_request_target |
Pulls attacker code with privileged context | grep -rE 'pull_request\.head' .github/workflows/ |
${{ github.event.* }} interpolated into a run: block |
Expression injection sink (issue/PR body, title, branch name, commit msg) | grep -rE '\$\{\{\s*github\.event\.(issue|pull_request|comment|head_commit)' .github/workflows/ |
runs-on: [self-hosted, ...] on public repo |
Self-hosted runner reachable from fork PRs | grep -rE 'runs-on:\s*(\[\s*self-hosted|self-hosted)' .github/workflows/ |
Third-party action pinned by tag (@v3) instead of SHA |
Action repo / tag retargeting → silent supply-chain | grep -rE 'uses:\s*[^/]+/[^@]+@v?[0-9]' .github/workflows/ |
permissions: block missing or write-all |
Token over-scoped; abuse |
Câu hỏi thường gặp
Vì sao pipeline là mục tiêu giá trị?
Danh mục nói chúng giữ token có đặc quyền và tạo artifact mà người dùng phía sau tin tưởng.
Những điểm yếu pipeline nào được bao phủ?
Tệp build không đáng tin, injection biểu thức workflow, lạm dụng runner tự host và lộ bí mật.
Có bao gồm GitHub Actions không?
Có. Danh mục có một hướng dẫn cho injection biểu thức trong GitHub Actions.
Chi tiết
Mô tả gốc của tác giả
CI/CD pipeline attack category — poisoned pipeline execution, GitHub Actions expression injection, self-hosted runner abuse, secrets/OIDC exfil. Routing skill: fingerprint the CI provider + workflow surface, then load the matching leaf.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14028
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
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.