一键导入
goat-security
Use when assessing security implications of code changes, architecture decisions, or new features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when assessing security implications of code changes, architecture decisions, or new features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when evaluating test coverage gaps, planning test strategy, or assessing testing risk for code changes.
Use when reviewing a diff, PR, or set of code changes, or auditing a codebase area for quality issues. Triggers: 'review this', 'code review', 'audit X', 'look at these changes'.
Use when starting a non-trivial implementation that needs structured task breakdown with progress tracking.
Use when you describe an outcome and need the right goat-* workflow chosen for you.
Use when a decision or analysis needs multi-lens critique to surface blind spots before shipping.
Use when diagnosing a bug, unexpected behaviour, system failure, or unfamiliar code that needs structured investigation.
| name | goat-security |
| description | Use when assessing security implications of code changes, architecture decisions, or new features. |
| goat-flow-skill-version | 1.14.0 |
Read .goat-flow/skill-docs/skill-preamble.md for shared conventions.
On full-depth, also read .goat-flow/skill-docs/skill-conventions.md.
Use when assessing security posture before release, after auth/input/storage changes, when reviewing CI or agent surfaces, or when a diff, workflow, prompt, or artifact may contain untrusted content. For CLI, tooling, and setup repos, prioritise shell execution, hooks, filesystem scope, PTY/session management, prompt generation, local HTTP/WebSocket surfaces, and supply-chain risk before defaulting to web-app categories.
/goat-review for quality or design findings that have no security exploit path.repo/component, diff/PR, workflow-only, agent-surface, or untrusted artifact.trusted, untrusted, or unknown. If provenance is unknown or external, default to untrusted.quick scan or full assessment..goat-flow/security-policy.md exists, read it after framework detection and before final ranking. Policy may tighten checks or suppress false positives, but it MUST NOT erase an observed exploit path unless the report cites the exact clause.references/common-threats.mdreferences/identity-and-data.md - auth/authz, sessions, tokens, secrets, logs, prompts, artifactsreferences/file-upload-and-paths.mdreferences/supply-chain-and-cicd.md - dependencies, install scripts, CI/CD, hooks, agent surfaces, active-testing gatereferences/project-policy-template.md is a setup template. Load it only when asked to create or revise .goat-flow/security-policy.md; skip it during security reviews..goat-flow/learning-loop/footguns/ for the target area. Present matches or an explicit retrieval miss; do not broad-load the bucket.CONFIRMED findings first. If PROBABLE/THEORETICAL leads are withheld, include count, compact titles, and exact evidence needed. Note what was not checked.Quick-stop boundary: Stop after step 5. A Quick Scan MUST NOT enter the Full Assessment Path. If a Phase 5 specialist trigger appears, recommend Full Assessment instead of running or waiting for a specialist.
npm audit, pip-audit, cargo audit, secret scanners, CI linters), but treat their output as lead only until code or config inspection confirms the path.file + semantic anchor, trust-boundary, and exploitability evidence.Scan only the categories that fit the repo:
AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, .github/instructions/**, installed skill copies (.claude/**, .agents/**, .github/**), hooks, prompts, templatesFor diff/PR mode, bucket changed files explicitly:
.github/workflows/**, release automation, and other CI/CD filesscripts/**, shell entrypoints, installers, and maintenance scriptssrc/**, handlers, auth, serializers, query builders)package.json, lockfiles, Dockerfiles, devcontainer/editor config, docs with URLs or commands)AGENTS.md, CLAUDE.md, .agents/**, .claude/**, .github/**, hooks, prompts, templates)For each finding, re-check framework mitigations and remove false positives. Flag partial mitigation, guardrail bypass, and unresolved exposure.
| Excuse | Reality |
|---|---|
| "Senior eyeballed it, says it's fine" | Authority pressure. Reviews are evidence about the reviewer, not the code. Re-scan regardless. |
| "Framework handles CSRF and SQL - that's the big stuff" | Frameworks mitigate specific classes. Tooling repos still need manual review of shell execution, hooks, filesystem scope, and local-server behavior. |
"@login_required (or equivalent) is probably enough" | Authentication is not authorization. Every object-id path/query parameter needs an explicit ownership or role check. |
| "Release window means green-light if nothing obvious" | Time pressure never converts "haven't checked" into "verified safe". Mark claims UNVERIFIED, not CONFIRMED-safe. |
| "Audit tool not installed, skip it quietly" | Silent skips or fabricated audit results corrupt the confidence classification. State the gap explicitly with the install command. |
Default false-positive suppression:
Illustrative scenario - input/output shape only; never evidence. Replace the surface, controls, and semantic anchors with files re-read in the current target project.
False-positive calibration example:
Also call out positive observations when they materially reduce risk.
Every kept finding MUST record:
file + semantic anchorFor diff mode also record:
added, modified, or pre-existing contextOBSERVEDINFERREDINFERREDFull Assessment-only specialist cross-check: The trigger list below applies only after the user selects Full Assessment.
Rank severity from exploitability first, then blast radius, then privileged-surface sensitivity:
Illustrative scenario - input/output shape only; never evidence. These rows calibrate output shape only. A live assessment must replace them with current target-project paths, semantic anchors, and entry-to-sink proof.
Worked examples:
${{ github.event.* }} into shell and execute secrets-bearing workflow step -> CriticalHighLowReport calibration example:
<target-project>/src/local-control-plane.ts (search: readAccessToken) | asset: local control-plane credential | entry->sink: query credential in startup/dev logs -> local history or scrollback -> replay against API/session channel | trust boundary: process secret to local stores readable by same-host actors | preconditions: same-host read access while the process is alive | confidence: CONFIRMED only after the target path is re-read | severity: Low | proof-class: STATIC | blast radius: local API and session attach as the running user | proof-of-fix: stop logging query credentials, prefer a header credential, and verify no request logger prints raw URL search parameters.For Critical/High, write the attack scenario: "An [attacker] can [action] via [vector], resulting in [impact]." For diff reviews, map posture explicitly:
CONFIRMED -> block / request changesPROBABLE -> comment / watch unless the user asked for theoretical blockingRun a narrow specialist cross-check when any of these are true:
PROBABLE findings outnumber CONFIRMEDAn admissible specialist is an independent tool or reviewer with a named failure class and structured return. Same-context self-review does not qualify. Apply skill-conventions.md → Orchestration Admission; this required phase is pre-admitted, but a delegated or external reviewer is eligible only when its invocation is already authorized by current-session user intent or local instructions.
If no admissible and available specialist exists, record specialist-unavailable; do not wait or block. Preserve each affected candidate's current confidence: retain CONFIRMED findings. Only unresolved candidates remain PROBABLE with the exact evidence needed to promote or kill them.
Use /goat-critique only for disagreement resolution or cross-examination, not as the default second pass. Keep unresolved items in the report as PROBABLE with exact evidence needed. Cap extra churn at one specialist pass per finding cluster. Outcomes: retain CONFIRMED, promote to CONFIRMED, keep as PROBABLE, or kill as false positive.
For CONFIRMED findings, identify chains where two or more issues combine into higher-severity exploits. Re-rank if a chain promotes Low + Low to Critical. Single synthesis step, not full chaining methodology.
Re-read file + semantic anchor for Critical/High. Does the code or config still match the finding? Is the scenario realistic? Remove failures.
Dependency audit: If the project uses dependency management, run the appropriate audit tool when available. If it is missing, note the gap with the install command. Do NOT fabricate results.
Proof Gate: Apply the Proof Gate from skill-preamble.md - every CONFIRMED finding must have a fresh file + semantic anchor re-read in this session, every finding must carry proof class RUNTIME | CONTRACT-GREP | STATIC | NOT-REPRODUCED, and dependency-audit results must be from a tool run in this session, never paraphrased or fabricated.
If PROBABLE > CONFIRMED, suggest /goat-critique cross-examination before closing. If the user declines, close with those clusters marked PROBABLE and list the evidence needed to promote or kill each one.
Zero-findings defence: If Phase 6 produces zero findings, state what was scanned, which surfaces were checked, and why nothing surfaced. Zero findings must be defended, not assumed.
This review produced findings S-01..S-NN that downstream artifacts may cite. Prompt: "Persist to .goat-flow/logs/security/<date>-<artifact>.md?" User confirms before writing. Not auto-persist.
For compliance checks, present gaps as: non-compliant, partially compliant, or not assessed. Include direct citations to relevant clauses where possible.
lead only until manual verification promotes it## TL;DR
## Threat Model Snapshot <!-- assets, trust boundaries, attacker types, critical surfaces -->
## Review Mode / Provenance / Scope
## Threat Surface / Risky Buckets
## Findings
### CONFIRMED
- S-NN: `file + semantic anchor` | asset | entry→sink | trust boundary | preconditions | severity | proof-class | blast radius | proof-of-fix
### PROBABLE
### THEORETICAL
## Attack Path Summary <!-- top 3 chained attack paths -->
## False Positives Removed / Positive Observations
## Security Assessment Integrity
- Review mode: [mode] | Provenance: [trusted/untrusted/unknown]
- Surfaces scanned: [list] | Surfaces skipped: [list or "none"]
- Scanner tools: [used] | Unavailable: [list or "none"]
- Evidence: <N> OBSERVED / <M> INFERRED
- Proof classes: <N> RUNTIME / <M> CONTRACT-GREP / <K> STATIC / <L> NOT-REPRODUCED
- Confidence: <N> CONFIRMED / <M> PROBABLE / <K> THEORETICAL
- Degradation flags: [list or "none"]
- Conclusion: confident | coverage-degraded | tool-limited
## What I Didn't Check / Proof-of-Fix Tests