本文へ移動
cccskills
無料GitHub で公開日本語紹介

threat-model

コードベースや開発者への聞き取りから、攻撃者や脅威、対策の優先度を整理した `THREAT_MODEL.md` を作成します。

原文原文の説明を見る

Build a threat model for a target codebase. Three modes: "interview" walks an application owner through the four-question framework and produces a threat model from their answers; "bootstrap" derives a threat model from the code plus past vulnerabilities (CVEs, git history, pentest reports) when no owner is available; "bootstrap-then-interview" chains the two when both owner and codebase are present. All write THREAT_MODEL.md in a shared schema. Use when asked to "threat model", "build a threat model", "map the attack surface", or "what should we be worried about in this codebase".

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • コードベースの攻撃対象と脅威を整理したいとき
  • 新しいシステムの設計リスクを確認したいとき
  • 担当者不在の既存コードを評価したいとき
  • コードの草案を担当者への聞き取りで仕上げたいとき

日本語での紹介

できること

システムに何が起こり得るか、誰がどこから攻撃するか、どの対策が必要かを整理した脅威モデルを作成します。開発者やシステムの担当者に質問してまとめる「interview」、コードと過去の脆弱性情報をもとに草案を作る「bootstrap」、両方を続けて行う「bootstrap-then-interview」の3つの進め方があります。どの方法でも共通の形式で THREAT_MODEL.md を作成し、後続の調査や確認に使える形にします。

こんなときに便利

新しいシステムの設計レビューで、業務上のリスクも含めて確認したいときに向いています。担当者がいない既存コードや、脆弱性の履歴があるコードを調べる場合は、コードに基づく草案作成から始められます。担当者とコードの両方がそろっていれば、草案を一緒に見直す進め方も選べます。

使い方の例

  • 「このコードベースの脅威モデルを作って」
  • 「攻撃対象になり得る入口とリスクを整理して」
  • 「コードから草案を作り、担当者への聞き取りで仕上げて」

注意点

静的分析を行い、対象コードをビルド、実行、ファズテストすることはありません。成果物はチェックアウトの docs/security/THREAT_MODEL.md に書き込みます。脆弱性情報の取得を依頼された場合、資料では公開アドバイザリーデータベースなどに限るよう指定されています。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(5)

  • SKILL.md8.0 KB
  • bootstrap.md21.6 KB
  • interview.md9.0 KB
  • README.md5.6 KB
  • schema.md6.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

threat-model

A threat model answers "what could go wrong with this system, who would do it, and what should we do about it?" independently of whether any specific bug has been found yet. It is the map; vulnerability discovery is the metal detector. A good threat model tells the pipeline where to look and tells triage which findings matter.

Litmus test: If patching one line of code makes an entry disappear, it was a vulnerability, not a threat. A threat ("attacker achieves RCE via untrusted media parsing") still stands after every known bug is fixed; a vulnerability ("dr_wav.h:412 doesn't bounds-check chunk_size") does not. This skill produces threats. Vulnerabilities appear only as evidence that raises a threat's likelihood score.

Invocation: /threat-model [bootstrap-then-interview|bootstrap|interview] <target-dir> [flags]


Step 0 — Safety preamble (always runs first)

This skill performs static analysis only. It reads source, git history, and any vulnerability reports the user supplies, and writes a single output file (docs/security/THREAT_MODEL.md). It does not build, execute, fuzz, or modify the target, and does not make network requests against the target's infrastructure.

Before proceeding, confirm and state in your first response:

  1. The target directory exists and is a local checkout you can read.
  2. You will not execute any code from the target directory.
  3. If --vulns points at a URL or you are asked to "fetch CVEs", you will query only public advisory databases (NVD, GitHub Security Advisories, the project's own issue tracker) and never the target's live deployment.

If the user asks you to validate a threat by running an exploit, decline. This repository vendors only the static skills; there is no execution pipeline here (Ouroboros adaptation).


Step 1 — Route to a mode

Parse $ARGUMENTS:

First tokenRoute to
interviewRead interview.md in this directory and follow it.
bootstrapRead bootstrap.md in this directory and follow it.
bootstrap-then-interviewBootstrap first, then interview seeded from the draft. See below.
anything else, or emptyAsk the user: "Is someone who owns or built this system available to answer questions in this session?" Yes and the codebase is checked out → recommend bootstrap-then-interview. Yes but no codebase → interview.md. No → bootstrap.md.

All modes write the same artifact (THREAT_MODEL.md, schema in schema.md) so downstream consumers (pipeline recon/judge, verifier agents) do not need to know which mode produced it.

interviewbootstrap
NeedsAn application owner present in the sessionA local checkout; optionally past vulns
MethodFour-question framework: conversational walk through what are we working on → what can go wrong → what are we going to do about it → did we do a good jobFive stages: parallel research swarm → synthesize sections 1-3 + vuln table → generalize vulns into threat classes → STRIDE gap-fill → emit
Best forNew systems, design reviews, systems where the risk lives in business logic the code doesn't showInherited systems, third-party code, OSS dependencies, anything with a CVE history
Provenance taginterviewbootstrap

Context durability. Interview mode is multi-turn; tool results from early reads may be evicted before you need them. To stay resilient:

  • Do not read interview.md or bootstrap.md in full up front. Read the mode file (or the relevant section of it) at the point you need it, one question or stage at a time.
  • If a re-read via the Read tool is refused as "file unchanged", the prior result was evicted; reload with cat <path> via Bash instead.

Interview backbone (so you can proceed even if interview.md is unavailable mid-session):

QQuestionFills schema sections
Q1What are we working on?section 1 context, section 2 assets, section 3 entry points
Q2What can go wrong?section 4 threat rows (id, threat, actor, surface, asset)
Q3What are we going to do about it?section 4 impact/likelihood/status/controls; section 5 deprioritized; section 8 recommended mitigations
Q4Did we do a good job?validate ranking, coverage check, section 6 open questions

bootstrap-then-interview mode

When the owner is available and the codebase is checked out, this is the recommended path: the owner's time goes to refining a code-grounded draft instead of describing the system from scratch.

  1. Tell the owner: "I'll read the code first and come back with a draft (about 5-10 min), then we'll walk it together. Want that, or would you rather start cold?" Only proceed if they opt in; otherwise fall back to interview.md.
  2. Read bootstrap.md and follow it end-to-end. Write docs/security/THREAT_MODEL.md.
  3. Immediately continue into interview mode: read interview.md and follow it with --seed docs/security/THREAT_MODEL.md in effect. The section 6 open questions from bootstrap become your Q1-Q4 prompts; the owner confirms, corrects, and adds rather than starting from nothing.
  4. Overwrite docs/security/THREAT_MODEL.md with the refined model. Set provenance mode: bootstrap-then-interview.

The same flow is available manually: run bootstrap first, then interview --seed <THREAT_MODEL.md> in a later session.


Step 2 — Shared output contract

All modes MUST emit docs/security/THREAT_MODEL.md conforming to schema.md in this directory. Read schema.md immediately before you write the file, not at routing time; in interview mode the gap between routing and emit can be many turns, and an early read will be evicted before it's used.

Ouroboros adaptation: every target uses the harness checkout's docs/security/THREAT_MODEL.md. Run from that checkout root with CHECKPOINT_ROOT unset or equal to it; never change the publication root to match the read target. This owner-facing model is intentionally tracked, unlike ignored scan and triage findings. For every mode, stage the content in a new operator-controlled payload file under the trusted payload staging contract and publish with python3 .claude/skills/_lib/checkpoint.py append docs/security/THREAT_MODEL.md --replace --from "<payload-file>". Do not use Write directly on the final report, and stop if the helper refuses.

After writing the file, print to the user:

  1. The path to THREAT_MODEL.md.
  2. The top 5 threats by likelihood × impact (id, one-line description, L×I).
  3. For bootstrap: any open questions the code could not answer (these seed a later interview pass).
  4. For interview: any owner statements that could not be verified in code (these seed follow-up code review).

References

  • docs/security/README.md for how this skill fits the Ouroboros security loop (Ouroboros adaptation; the upstream docs/security.md / docs/prompting.md live in the reference harness).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

auto

無料概要あり

複数ファイルにまたがる開発や技術基盤の移行を、要件整理から仕様作成、実装・検証へつなぎます。不足事項を確認し、バックグラウンドで作業と結果を追跡します。

  • 複数ファイルにまたがる機能開発
  • フレームワークや言語の移行
  • 認証・保存先・API層の置き換え
Q00/ouroboros6,2742026年10月25日 更新

brownfield

無料概要あり

既存のGitリポジトリとworktreeを登録・検索し、Ouroborosの要件整理で参照する既定のプロジェクトを選び、評価用コマンドの設定も作成するスキル。

  • 要件整理で既存プロジェクトを参照
  • 話題に合う登録済みリポジトリの検索
  • リポジトリ追加・移動後の再走査
Q00/ouroboros6,2742026年10月25日 更新

cancel

無料概要あり

Ouroborosで進まなくなった実行や残ったバックグラウンドジョブを停止します。プロジェクト内の実行を確認し、個別指定や一括でキャンセルするスキルです。

  • 進まなくなった実行を止めたいとき
  • ジョブIDを指定して停止したいとき
  • プロジェクト内の実行を一括停止
Q00/ouroboros6,2742026年10月25日 更新

evaluate

無料概要あり

完成した成果物が受け入れ基準を満たすか、ビルドやテスト、基準ごとのレビューで検証します。不確かな場合は複数モデルで確認し、不合格後の自動修正にもつなげます。

  • 完成した成果物を仕様と照合したいとき
  • 実際の動作を受け入れ基準で確認
  • 曖昧な結果を複数モデルで確認
Q00/ouroboros6,2742026年10月25日 更新

evolve

無料概要あり

Ouroborosで仕様の概念構造と完成の判定条件を世代ごとに見直し、実行・評価を繰り返す開発ループを開始し、進捗確認や過去世代への巻き戻しも行うスキル。

  • 実行と評価を重ねて開発したいとき
  • 世代ごとの改善状況の確認
  • 開発ループを過去世代に戻したいとき
Q00/ouroboros6,2742026年10月25日 更新

interview

無料概要あり

作りたいものや変更内容が曖昧なときに、対話で目的・制約・完成の判断基準を整理します。コードを書く前に認識のずれや未決事項を確認するスキルです。

  • 開発前に曖昧なアイデアを整理したいとき
  • 新機能の完成条件を決めたいとき
  • 対象範囲と制約をすり合わせたいとき
Q00/ouroboros6,2742026年10月25日 更新

Q00 のスキルをすべて見る

このスキルの問題を報告する