attack-path-analysis
它能做什么
这项技能检查一个疑似安全问题是否存在真实的攻击路径,以及其严重程度如何。适合希望将真实风险与误报区分开的安全审查人员。
适用场景
- ✓当安全扫描标记了一个问题,你需要确定它是否真实时。
- ✓当你想从攻击者可以控制的位置,一直追踪到敏感操作时。
- ✓当你需要明确判断某项发现是否应当报告的时候。
技能链接
https://github.com/openai/codex-security/blob/main/plugins/codex-security/skills/attack-path-analysis/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请从登录表单一直追踪这个 SQL 注入发现到数据库,并告诉我它是否应当报告。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会利用代码中的证据,梳理攻击者、入口点、安全边界和敏感操作。它会考虑现有的防护措施,对影响进行评级,并为每项发现给出明确的结论。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Security Attack Path Analysis
Determine whether each supplied finding has a supported attacker path, what impact it has, and whether it is reportable. Before creating or retaining files, read ../../references/artifact-storage.md.
Establish the attack path
For a scan phase, use its per-scan threat model and candidate set from ../../references/scan-artifacts.md. Preserve supplied input paths. If a required scan artifact is unavailable, report the missing input.
For standalone analysis, use the supplied finding, repository, threat model or security policy, and context. A per-scan artifact is not required. State material assumptions and ask for missing context only when it prevents a meaningful assessment.
- Establish the in-scope attacker, affected product surface, entry point, controlled input, security boundary, and sensitive operation. Trace the path from repository evidence.
- Identify relevant controls and the strongest counterevidence. Explain what they establish, which prerequisites remain, and whether the exact claimed boundary is crossed.
- Assess impact and likelihood from those facts, then apply references/severity-policy.md. Keep facts, severity calibration, and the final policy decision distinguishable in the result.
- Return an explicit decision for every eligible candidate, including ignored or deferred candidates. Do not replace a supported instance with a neighboring finding or lose its root-control location.
Use repository evidence and explicitly supplied context. Access the network only when the user has expressly authorized it; an offline scan never accesses the network. Do not invent unsupported attack chains. Missing deployment or public-ingress evidence can limit confidence without defeating an otherwise supported finding.
Scan integration
Standard scans and Deep Scan workers assess attack paths within their ordinary Standard scan workflow; neither invokes this separate phase skill.
Compact Workbench Diff
When a workbench-backed $security-diff-scan has a scanId:
- Load the per-scan threat model and all validated candidates with
list_codex_security_candidates({ scanId, cursor?, limit? }). - Analyze every
reportableordeferredvalidation candidate. Preserve candidate identity and existing discovery and validation fields. - Submit every decision together with
record_candidate_attack_paths({ scanId, attackPaths: [{ candidateId, attackPath }] }). SubmitattackPaths: []when no candidate enters this phase. The tool preserves the stored candidate order. - These nested decisions are the complete phase output. Do not create duplicate reports, receipts, or manual ledgers.
Other phase-based scans
Use the active workflow's report and receipt paths in ../../references/scan-artifacts.md. Every candidate entering this phase must have an explicit decision and a receipt with its ID, facts or exact proof gap, and report reference. Record ignored candidates before excluding them from the surviving finding set.
For repository-wide or scoped-path scans, include validation closure rows marked reportable or survives: yes, even if discovery did not assign a polished finding number. Preserve affected entrypoint/wrapper, root-control, sink, and concrete-implementation locations supplied by validation.
Output
For standalone analysis, follow the caller's format or return a concise assessment per finding. Scan phases use their output contract above. Include:
- title and supplied candidate, instance, and ledger identities;
- precise affected locations and attacker-to-impact steps;
- relevant facts from references/attack-path-facts.md;
- controls, counterevidence, prerequisites, and material proof gaps;
- impact, likelihood, calibrated severity, and final policy decision with their reasons.
Retain enough evidence to explain both surviving and suppressed findings. Apply the severity policy to the established facts rather than reopening discovery or substituting a different attack story.
常见问题
它只看发现本身吗?
不是。它还会寻找可能阻断攻击路径的控制措施和反证。
每个候选项都会得到结论吗?
会。每个符合条件的候选项都会得到明确的结论,包括被忽略或被推迟的项目。
需要先进行完整扫描吗?
不需要。它可以针对单项发现和代码仓库背景进行工作,有扫描结果时也会加以利用。
详情
作者的原始描述
Use when Codex is already in the attack-path-analysis phase of a security scan or the user explicitly asks to trace a security finding from source to sink and calibrate severity. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
repo: openai/codex-security
热度
- GitHub 星标
- 11k
- 排名
- #11747
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
assess-patch-risk
11k帮你的智能体在合并之前评估代码补丁的风险,包括它影响什么、哪些测试覆盖它,以及它是否可以回滚。
cloud-findings
11k让你的智能体从已连接的账户中读取已有的 Codex Security Cloud 发现、报告和扫描状态,且不做任何更改。
deep-security-scan
11k帮你的智能体对代码仓库或文件夹进行深入、多轮的安全扫描,通过重复独立的检查,并汇总经过验证的发现。
define-security-policy
11k帮你的智能体撰写或更新 SECURITY.md 指南,告诉安全审查哪些内容重要、哪些不在范围之内,以及哪些内容必须保持安全。