本文へスキップ
Skillpedia
セキュリティ11k · #11752

fix-finding

できること

このスキルは、コード内の特定のセキュリティ上の発見事項を、最小限の変更で修正し、その修正が機能することを確認します。広範な書き直しではなく、確認済みの的を絞った修正がほしい開発者向けです。

使う場面

  • ✓検証済み、またはもっともらしいセキュリティの脆弱性を、修正して検証するよう依頼するとき。
  • ✓通常の動作を保ちつつ、セキュリティの境界を閉じる最小限の変更がほしいとき。
  • ✓コードがすでに安全だと疑い、それを証拠で確認したいとき。

スキルのリンク

https://github.com/openai/codex-security/blob/main/plugins/codex-security/skills/fix-finding/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/openai/codex-security/blob/main/plugins/codex-security/skills/fix-finding/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

  1. Trace the reported path and inspect only the context needed to identify the real shared boundary. Return no_change when repository evidence shows that the reported path is already safe; do not make a speculative change.
  2. In standard mode, when feasible, run the smallest high-signal reproduction through that boundary and one legitimate control through the same path.
  3. 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.
  4. 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.
  5. 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

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル