fix-finding
它能做什么
这项技能用最小化的改动修复代码中的特定安全发现,并检查修复是否有效。适合希望进行有针对性、经过审查的修复,而不是大范围重写的开发人员。
适用场景
- ✓当你要求修复并验证一个已验证或可能成立的安全漏洞时。
- ✓当你希望进行最小化改动,既堵住安全边界,又保持正常功能时。
- ✓当你怀疑代码已经安全,并希望用证据加以证明的时候。
技能链接
https://github.com/openai/codex-security/blob/main/plugins/codex-security/skills/fix-finding/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请修复文件上传处理程序中的路径遍历漏洞,并运行检查以确认该漏洞已被堵住。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会先阅读受影响的代码、调用方和测试,并判断当前状态。然后它会做出最小的、适合该代码仓库的改动,并运行所选验证模式所要求的检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Fix Finding
Before choosing paths or saving retained output, read ../../references/artifact-storage.md and follow its storage policy.
Objective
Turn a current security finding into a minimal, validated code change. If the code is already safe, prove that and report that no change was needed.
Classify the current state from evidence, close the broken security boundary, preserve legitimate behavior, and pass the checks required by the selected verification mode. Prefer the smallest repository-native change that meets those requirements.
Verification Mode
Use standard verification unless the caller explicitly selects verificationMode: static. The selected mode applies throughout this skill, including delegated reviews and workbench stages; pass it to every delegated agent.
In static mode, assess source and diff evidence only. Do not install dependencies or run builds, tests, reproducers, or the application, including when validation instructions request them. Repository-reading tools remain available. State that runtime checks were not performed; do not count them as passed or require them for this assessment. Missing runtime tooling alone is not a blocker, but a material gap in the source evidence still requires blocked.
Patch Contract
Before editing, inspect the affected implementation, its direct callers, nearby helpers, and relevant existing tests. Establish from repository evidence:
- the attacker-controlled input and concrete source-to-sink path or broken control
- the security invariant and narrowest shared enforcement boundary
- legitimate behavior, APIs, error semantics, and compatibility constraints that must remain
- the closest existing implementation, validation, and error-handling precedents
Treat the finding as a data-flow and boundary problem, not merely the named input example. Check equivalent encodings, parser forms, aliases, callers, sinks, and every representation or copy of security-sensitive state that could bypass the proposed change. Handle unsafe state explicitly; do not silently accept, truncate, or reinterpret it into another reachable form.
Implementation Workflow
- Trace the reported path and inspect only the context needed to identify the real shared boundary. Return
no_changewhen repository evidence shows that the reported path is already safe; do not make a speculative change. - In standard mode, when feasible, run the smallest high-signal reproduction through that boundary and one legitimate control through the same path.
- Implement the smallest repository-native fix at the shared boundary. Prefer nearby helpers and established APIs. Do not broaden into unrelated redesign, cleanup, or sibling findings.
- Before verification, challenge the patch rather than defending it: inspect every direct caller of each changed helper and both outcomes of each changed condition. Look for one sibling path, representation, or copy that still reaches the vulnerable sink and one ordinary or default input that the patch newly rejects or reinterprets; revise the implementation if either exists.
- In standard mode, verify the resulting change:
- inspect the final diff and run the narrowest syntax, import, build, or type check relevant to it
- rerun the security trigger or strongest focused substitute and review one alternate malicious input class
- rerun the legitimate control, nearest existing tests, and the owning package's applicable required checks
In static mode, use these verification gates instead: inspect the final diff; trace the original exploit path and relevant alternate inputs through the changed control; then inspect callers and existing tests as source to establish that legitimate behavior and compatibility remain intact. Cite the source evidence for each gate and identify anything it cannot establish.
Return blocked if the vulnerability may be real, but essential evidence, tooling, access, or a product or compatibility decision is missing, so a safe fix cannot be responsibly completed or verified.
Review the fix
Challenge the patch for surviving bypasses and regressions in legitimate behavior. Use independent investigation or review when the complexity, uncertainty, or security impact warrants it. Give a fresh read-only reviewer the finding, repository root, authorized scope, repository policy, verification mode, and candidate diff so they can assess it from source without the author's rationale or claimed test results. If delegati
常见问题
它也会修复普通的缺陷吗?
不会。它只针对安全漏洞,不处理一般的缺陷修复或设计审查问题。
它可以不运行代码就检查修复吗?
可以。静态模式只根据源代码和差异证据进行评估,不安装依赖,也不运行测试。
如果代码本来就是安全的怎么办?
该技能会根据证据加以证明,并报告无需做任何改动。
详情
作者的原始描述
Use only when the user explicitly asks to fix and verify a validated or plausible security vulnerability. Do not use for ordinary bug fixes, correctness or design review findings, general validation, or full PR, commit, branch, patch, or repository scans.
repo: openai/codex-security
热度
- GitHub 星标
- 11k
- 排名
- #11752
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
assess-patch-risk
11k帮你的智能体在合并之前评估代码补丁的风险,包括它影响什么、哪些测试覆盖它,以及它是否可以回滚。
attack-path-analysis
11k帮你的智能体追踪一项安全发现,从入口点到目标,然后判断其真实影响,以及是否应当报告。
cloud-findings
11k让你的智能体从已连接的账户中读取已有的 Codex Security Cloud 发现、报告和扫描状态,且不做任何更改。
deep-security-scan
11k帮你的智能体对代码仓库或文件夹进行深入、多轮的安全扫描,通过重复独立的检查,并汇总经过验证的发现。