pale-knight/redteam-skill / skills/cicd
cicd
VerifiedCI/CD pipeline and software-supply-chain exploitation: Jenkins, GitHub Actions, GitLab CI/CD, Azure DevOps, Gitea/Forgejo, self-hosted runners/agents, poisoned pipeline execution, artifact/cache abuse, dependency confusion, third-party Action trust, GitOps/registry poisoning, workload identity/OIDC, and emerging agentic CI/CD. Use this skill when the operator has access to a CI/CD system, source repository, build/deploy configuration, runner/agent, artifact/package/registry path, or software delivery trust chain.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.3 KB |
| references/agentic-cicd.md | markdown | 2.8 KB |
| references/artifact-supply-chain.md | markdown | 3.1 KB |
| references/automation-audit.md | markdown | 3.2 KB |
| references/cicd-attacks.md | markdown | 2.3 KB |
| references/dependency-supply-chain.md | markdown | 2.5 KB |
| references/github-actions.md | markdown | 7.1 KB |
| references/gitlab-azuredevops.md | markdown | 3.5 KB |
| references/gitops-registry.md | markdown | 1.9 KB |
| references/jenkins.md | markdown | 2.7 KB |
| references/runner-agent.md | markdown | 4.2 KB |
| references/vulnerability-intelligence.md | markdown | 487 B |
| references/workload-identity.md | markdown | 3.5 KB |
references/automation-audit.md
View on GitHub# CI/CD 自动化审计与人工验证
> 目标:工具负责提高发现率,**结果必须回到人工判断**。不要把“scanner finding”直接当成 exploitable。
---
## 1. 工具定位
| 工具 | 2026定位 | 适用 |
|---|---|---|
| Poutine | 跨平台CI workflow静态扫描 | GitHub/GitLab/Azure DevOps/Tekton |
| Trajan | 多平台检测 + GitHub授权验证 + Graph | GitHub/GitLab/Azure DevOps |
| Octoscan | GitHub Actions专项攻击面静态扫描 | GitHub Actions |
| zizmor | 高精度GitHub Actions/Dependabot/pre-commit审计 | GitHub Actions |
| Harden-Runner | Runtime observation / egress/process/file telemetry | 自有/授权Runner验证 |
**2026状态:** Gato 已归档并由 Trajan 接替;旧笔记里的 Gato 命令只保留历史兼容,不作为新流程主工具。
---
## 2. 推荐顺序
```text
local repo / API read access
↓
Poutine / Trajan broad scan
↓
GitHub? → Octoscan + zizmor deep scan
↓
人工把finding映射到:Trigger → Untrusted Input → Privileged Sink
↓
先 marker / dry-run
↓
确认 exploitability
```
### Poutine
```bash
poutine analyze_local . --format json > poutine.json
poutine analyze_repo ORG/REPO --token "$GH_TOKEN" --format sarif
```
重点不是 finding 数量,而是组合:
```text
external trigger
+ attacker-controlled data/code
+ self-hosted runner / write token / secrets / OIDC
= 高价值候选
```
### Trajan
```bash
trajan github run ORG/REPO
trajan github report --format html
trajan github graph
```
GitHub Attack Plan:
```bash
trajan github attack plan list
trajan github attack plan validate github/pwn-request
```
- 默认 dry-run;
- `--execute` 前检查 scope/identity/cleanup;
- 内置计划当前包括 pwn-request、comment-injection、cache-poison、stale-approval 等;
- GitLab/Azure DevOps 当前以 detection 为主,不假设已有等价 attack automation。
### Octoscan
```bash
./octoscan dl --token "$GH_TOKEN" --org ORG --repo REPO --default-branch
./octoscan scan octoscan-output --disable-rules shellcheck,local-action --filter-triggers external
./octoscan scan --list-rules
```
高价值规则:`dangerous-checkout`、`dangerous-action`、`dangerous-write`、`expression-injection`、`runner-label`、`repo-jacking`、`bot-check`、`known-vulnerability`、`dangerous-artefact`、`debug-oidc-action`。
### zizmor
```bash
zizmor --collect=workflows,actions .
GH_TOKEN="$(gh auth token)" zizmor ORG/REPO
```
优先看:template injection、cache poisoning、unpinned/ambiguous refs、excessive permissions、credential persistence/artipacked、impostor commits。
---
## 3. Runtime验证:Harden-Runner
Harden-Runner 是观察/限制工具,不是“漏洞扫描器”。在自有测试 workflow 中可以观察:
```text
哪个step访问了外网?
哪个process读取了敏感文件/runner进程?
是否存在非预期package registry / cloud endpoint?
```
它适合确认 build dependency、第三方 Action、agentic workflow 的真实运行行为。
---
## 4. Finding人工判定模板
```text
Finding:
Trigger:
Attacker-controlled source:
Privileged sink:
Token/Secret permissions:
Runner type:
Artifact/cache boundary:
Cloud/K8s deployment identity:
最小验证方法:
成功证据:
Cleanup:
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |