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

reproduce-bug

できること

元のコードと計画した入力を使って、ローカルのプロジェクトで既知のバグを再現し、生の出力を保存します。修正する前に報告されたバグを確認する開発者とレビュー担当者向けです。

使う場面

  • ✓開発者が、ローカルのプロジェクトで名前付きのバグを再現する必要があるとき。
  • ✓レビュー担当者が、報告されたコンパイラや実行時のバグが本当に起きるかを確認したいとき。
  • ✓チームが、修正を書く前に再現の証拠を必要とするとき。

スキルのリンク

https://github.com/trailofbits/skills/blob/main/plugins/patching-bugs/skills/reproduce-bug/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“報告されたこのクラッシュを、私のローカルプロジェクトの元のコードで再現して、出力を保存してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、プロジェクト自身のコマンドで現在のコードをビルドし、対照ケースを含む計画された入力を実行します。stdout、stderr、終了ステータス、時間を保存し、バグが再現された、再現されなかった、または実行できなかったのいずれかを報告します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Reproduce Bug

When to Use

Use for the reproduction step of patching-bugs with one finding.json and a local baseline checkout. Read the record contract. Before target commands, follow its project guidance.

When NOT to Use

Do not use for bug discovery, patching, or a claim that cannot be exercised locally. Report a blocker when the build or environment cannot exercise the claim.

Procedure

  1. Select failure_type from the record contract. Build the current baseline with the project's own command. Exercise the planned scoped inputs before any edit and retain their observations, including valid controls. Save raw stdout, stderr, exit status, and timing. If the behavior is absent with trustworthy evidence, report not_reproduced; if setup or observations are unreliable, report blocked.

  2. Runtime: exercise the built target_artifact with a PoC that records PATCH_LOADED as defined in the contract, then prints PATCH_REACHED immediately before the assertion. Exit nonzero for the bug, zero otherwise; a setup crash is inconclusive. Compile: record the target expected_diagnostic from the failed compiler invocation; use empty poc_argv and null target_artifact.

  3. Save any unchanged PoC source under reproduce/poc/ and raw receipts under reproduce/receipts/. Write reproduce.json with the baseline commit, command argument arrays, artifact path, observed result, outcome, and your agent identity. Set finding.status to reproduced or not_reproduced from the result. If reproduction is blocked, leave finding.status as hypothesis.

    Reproduce record schema:

{
  "schema_version": 1,
  "failure_type": "runtime",
  "outcome": "reproduced",
  "baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "build_argv": ["python", "build.py"],
  "poc_argv": ["python", "poc.py"],
  "target_artifact": "dist/app.py",
  "observed": "The PoC wrote outside uploads after PATCH_REACHED.",
  "blocker": null,
  "agent": "reproducer-1"
}
  1. Manifest the complete reproduce/ directory, including the PoC and record, using the record helper: run uv run --no-project <script> manifest <reproduce-step-dir>. Then check the record before handoff. State blocked with the actual failure when build or setup prevents a valid run.

Rationalizations to Reject

Shortcut Required action
A unit test imitates the bug. Exercise the target compiler or built runtime artifact.
A nonzero exit proves reproduction. Require the target diagnostic, or runtime marker and assertion.
よくある質問

バグが起きなかったらどうなりますか?

その振る舞いがないという信頼できる証拠があれば、再現されなかったと報告します。

ビルドが失敗したら?

信頼できないセットアップでは、バグがないことを示せないため、ブロックされたと報告します。

バグを直しますか?

いいえ。再現だけを行います。パッチは別の工程です。

詳細

作者による元の説明

Use when a named runtime or compiler bug in a local repository needs independent reproduction.

repo: trailofbits/skills

人気

GitHubのスター
8.0k
ランキング
#12691
ライセンス
CC-BY-SA-4.0
更新日
2026/11/2

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

0

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

コメント

  • …

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

似ているスキル