finding-discovery
它能做什么
这项技能在代码中查找可能的安全弱点,并将其列为候选项。适合希望获得可以之后再核查的初步线索的安全团队。
适用场景
- ✓当安全扫描处于发现阶段,需要候选问题时。
- ✓当你想在代码改动中查找可能的漏洞时。
- ✓当你想获得代码仓库中疑似弱点的清单,并附上每项的证据的时候。
技能链接
https://github.com/openai/codex-security/blob/main/plugins/codex-security/skills/finding-discovery/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查这个分支中的改动,查找可能的安全弱点,并列出每个候选项及其证据。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会根据威胁模型和项目的安全指引,审查获得授权的源代码以及每个改动的文件。它会记录每个候选项及其证据,但不会决定最终的严重程度。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Security Finding Discovery
Identify technically plausible security vulnerabilities in the authorized source, using the threat model and applicable security policy. Discovery preserves evidence for later validation; it does not decide final severity.
Read ../../references/artifact-storage.md before saving output and ../../references/security-guidance.md before source review. Resolve applicable policy for each reviewed path, including delegated assignments. Honor explicit input and output paths; ask for an explicitly required input only when its absence prevents the requested analysis.
Select the Workflow
Standard and Deep workers use their coordinator's self-contained prompts rather than this phase skill.
- Running compact diff: read the supplied inventory through
list_codex_security_review_items, review every assigned changed file, and record all candidates once withrecord_codex_security_discovery_candidates. Do not create ranked worklists, per-finding ledgers, receipts, or discovery reports. - Standalone diff without a compact inventory: use
../security-scan/references/scan-artifacts-and-ledger.mdfor the changed-file worklist and retained phase artifacts. - Standalone repository discovery: apply the evidence criteria below to the authorized source and return the candidates and coverage limitations. Do not start a scan or run the diff worklist pipeline.
For a diff, inspect the actual changed behavior, including deleted files at the baseline revision. Follow supporting code far enough to understand the affected boundary; expand to sibling callers when a changed shared control affects them. Do not broaden into an unrelated repository audit.
Evidence Criteria
- Trace attacker-controlled input or a privileged operation through the closest relevant control to the sink and security impact. Explain why the control is absent, bypassable, or applied to the wrong value or boundary.
- Check runtime reachability and deployment assumptions. Record effective guards and containment as counterevidence; a safe sibling implementation does not establish that the candidate path is safe.
- Preserve the root-control location as well as entrypoints, wrappers, concrete implementations, and sinks needed to understand the claim. When the claim covers several implementations, inspect those implementations rather than asserting that all are affected.
- Keep independently reachable vulnerable instances addressable. Merge duplicate observations of the same source/control/sink/impact instead of splitting cosmetic variants; retain all affected locations and original candidate IDs when merging.
- Follow explicit user or advisory seeds to their exact source and control. Record the evidence that supports, disproves, or leaves the seed unresolved; a nearby issue in the same family does not close it. Use only authorized source material and do not fetch advisory links without permission.
- Distinguish concrete security impact from maintainability or robustness concerns. A crash, dangerous API, optional feature, or missing check is a lead, not a finding by itself. Carry plausible candidates with explicit proof gaps to validation rather than inventing evidence or discarding them for lack of a runnable reproduction.
Divide independent review assignments among available workers when useful, with the target, scope, relevant policy/model, and required result fields. The parent reviews unassigned work and reconciles duplicates. Do not repeat validation or attack-path phases inside discovery.
Candidate Output
For each candidate, retain:
- Stable candidate ID and title; preserve supplied seed or ledger IDs and advisory references.
- Affected file/line locations, labeling
entrypoint/wrapper,root_control,sink, andconcrete_implementationwhere useful. - Attacker-controlled source, closest control, sink or broken control, plausible impact, and the source evidence connecting them.
- Counterevidence, deployment preconditions, unresolved questions, and what validation needs to establish.
- CWE IDs when known, otherwise an empty list.
- For repository or scoped-path instances, an instance key
<family>:<file>:<line>when required by the caller. - For diff findings,
relevant_linesonly where relevant buggy behavior overlaps the diff.
Use the caller's structured candidate contract. For a legacy diff, save the discovery report and discovery receipts at the paths in ../../references/scan-artifacts.md; subsequent
常见问题
发现阶段会决定哪些问题是真实的吗?
不会。发现阶段只收集带有证据的候选项,之后的验证阶段才决定严重程度。
它遵循什么指引?
它会将项目的安全策略应用于每一条被审查的路径,包括嵌套的指引文件。
它会覆盖整个代码仓库吗?
它覆盖提供给它的源代码,并会报告任何覆盖范围的限制,使缺口保持可见。
详情
作者的原始描述
Use when Codex is already in the finding-discovery phase of a security scan or the user explicitly asks to discover candidate security findings in a repository or code change. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
repo: openai/codex-security
热度
- GitHub 星标
- 11k
- 排名
- #11751
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
assess-patch-risk
11k帮你的智能体在合并之前评估代码补丁的风险,包括它影响什么、哪些测试覆盖它,以及它是否可以回滚。
attack-path-analysis
11k帮你的智能体追踪一项安全发现,从入口点到目标,然后判断其真实影响,以及是否应当报告。
cloud-findings
11k让你的智能体从已连接的账户中读取已有的 Codex Security Cloud 发现、报告和扫描状态,且不做任何更改。
deep-security-scan
11k帮你的智能体对代码仓库或文件夹进行深入、多轮的安全扫描,通过重复独立的检查,并汇总经过验证的发现。