Sota Threat Modelingのロゴ

Sota Threat Modeling

コミュニティ
martinholovsky
sota-threat-modeling

新しいシステムの設計と既存システムの監査、両方に対応する最先端の脅威モデリングです。信頼できない入力、新たな信頼境界、機密データ、サードパーティ依存関係に関わる機能、サービス、統合、アーキテクチャを設計するとき(BUILDモード)にご利用ください。既存のコードベースをレビュー、監査、ペネトレーションテストの対象範囲設定を行い、暗黙の脅威モデルを再構築して抜け漏れを見つけるとき(AUDITモード)にも役立ちます。コードレベルの脆弱性レビューは対象外です。その場合はsota-code-securityをご利用ください。トリガーキーワード:threat model、STRIDE、LINDDUN、PASTA、attack tree、kill chain、data flow diagram、DFD、trust boundary、attack surface、abuse case、security design review、security architecture review、risk rating、DREAD、CVSS、security requirements、secure design、security audit、gap analysis、prompt injection、excessive agency、threat catalog、mitigations、residual risk。

概要

公開者martinholovsky
リポジトリSOTA-skills
スキル名sota-threat-modeling
スター
28
フォーク
3
同梱ファイル
6
ライセンスCC-BY-4.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 6個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    martinholovskyがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Sota Threat Modeling」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-threat-modeling
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/martinholovsky/SOTA-skills.git /tmp/SOTA-skills
mkdir -p .claude/skills
cp -r /tmp/SOTA-skills/skills/sota-threat-modeling .claude/skills/sota-threat-modeling
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSota Threat Modelingを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSota Threat Modelingを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Sota Threat Modelingは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

SOTA Threat Modeling

Purpose

Threat modeling answers Shostack's four questions with engineering rigor:

  1. What are we working on? (decompose: DFD, trust boundaries, assets, actors)
  2. What can go wrong? (enumerate: STRIDE/LINDDUN per element, catalogs, attack trees)
  3. What are we going to do about it? (treat: mitigate/accept/transfer/avoid, map to requirements and tests)
  4. Did we do a good job? (verify: abuse-case tests, residual risk review, re-model triggers)

This skill operationalizes those questions in two modes. Never produce a threat model that is only prose — every threat must land as a tracked requirement, a test, or an explicitly accepted risk with an owner.

BUILD Mode — Threat-Model-While-Designing

Run this workflow whenever designing anything that crosses a trust boundary. Scale effort to risk: a 15-minute "four questions" pass for a small feature; a full STRIDE-per-interaction model for a new service or auth flow.

Workflow

  1. Scope the delta. Model what is new or changed, not the whole system. List new entry points, new data classes, new dependencies, new actors.
  2. Draw the DFD as text/mermaid (see rules/02). Mark trust boundaries explicitly. If you cannot draw a boundary, you do not understand the design yet — stop and ask.
  3. Pick the methodology (see rules/01): STRIDE-per-interaction by default; add LINDDUN if personal data flows; attack trees for a single high-value asset; four-questions-only for low-risk deltas — but the system's tier (rules/04 §8) sets the floor: a High-tier system gets its tier's depth even for a small delta.
  4. Enumerate threats crossing each boundary using the per-component catalogs in rules/03. Write each threat as: actor → action → asset → impact. No vague entries ("hacking", "data breach").
  5. Rate and treat each threat (see rules/04): likelihood × impact matrix, then accept / mitigate / transfer / avoid. Every mitigation becomes a security requirement with an ID.
  6. Emit artifacts (see rules/05): threat model doc, security requirements backlog entries, abuse cases as test stubs, and re-modeling triggers.
  7. Wire into delivery. Reference requirement IDs in the design doc, tickets, and PR descriptions. A threat without a tracked artifact does not exist.

Continuous / incremental (agile, PR reviews)

  • Threat model the story, not the sprint. Add a "Security notes" section to design docs and PR descriptions for any change matching a re-model trigger: new dependency, new endpoint/route/queue/cron/webhook, new trust boundary, new data class, auth/authz change, file/deserialization handling.
  • In PR review, run a micro-STRIDE on the diff and its dependents (callers and importers of each changed file, two hops out by default — sota/rules/01 §1): what new input enters? whose privilege executes it? what does it write or call? Minutes for a small diff, and it catches design-level regressions a line-by-line review misses.

AUDIT Mode — Reconstructing a Threat Model from Code

Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.

Use when handed an existing system with no (trustworthy) threat model. Goal: rebuild the implicit model from artifacts, then diff intended vs. actual controls. Full procedure in rules/06.

Workflow

  1. Inventory entry points from code (see rules/02 §extraction): routes, queue consumers, cron jobs, webhooks, third-party callbacks, CLI/admin tools, file uploads, IaC-exposed ports.
  2. Reconstruct the DFD from the inventory: processes, stores, external entities, flows; infer trust boundaries from network topology, authn checkpoints, and IAM policies.
  3. Identify assets and actors from schemas, secrets handling, and config.
  4. Run the catalogs (rules/03) against each component; for every catalog item record: control present / absent / partial, with file:line evidence.
  5. Gap analysis: rank absent/partial controls by exploitability × blast radius; distinguish "missing control" from "missing defense-in-depth".
  6. Report findings in the standard format below.

Severity conventions

SeverityDefinition
CriticalRemotely exploitable now, by an unauthenticated or low-priv actor, leading to full compromise of a key asset (RCE, auth bypass, mass data exfil). Fix before anything else ships.
HighExploitable with realistic preconditions (one valid account, one misconfig, MitM position) compromising a key asset; or a Critical with a single weak mitigating layer. Fix this sprint.
MediumRequires chaining, elevated access, or unusual conditions; or impacts a secondary asset; or defense-in-depth gap on a Critical path. Schedule.
LowHardening, hygiene, info disclosure of low-value data, theoretical with strong existing controls. Backlog.

Severity = exploitability × impact in this deployment context — never copy a CVE/CVSS base score without environmental adjustment (see rules/04).

Finding format (every finding, no exceptions)

[SEV] TITLE (component, STRIDE/LINDDUN class)
Location: path/to/file.py:123 (and IaC/config refs)
Threat: <actor> can <action> via <vector> because <missing/weak control>,
        impacting <asset> (<C/I/A/privacy impact>).
Evidence: code excerpt or config line proving the gap.
Recommendation: specific control + where it goes; map to requirement ID.
Residual risk if accepted: one sentence.

Rules Index

FileRead this when...
rules/01-methodologies.mdChoosing between STRIDE, LINDDUN, PASTA, attack trees, kill chains; deciding lightweight vs. heavyweight; setting up continuous/PR-level threat modeling.
rules/02-decomposition.mdDrawing DFDs in mermaid, defining trust boundaries, listing entry points/assets/actors/privilege levels; extracting all of these from an existing codebase.
rules/03-threat-catalogs.mdEnumerating threats for a specific component: web frontend, API, database, message queue, file storage, CI/CD, mobile, LLM agent/tool-use, cloud/IAM.
rules/04-risk-rating-treatment.mdRating threats (DREAD pitfalls, CVSS usage, L×I matrices), choosing accept/mitigate/transfer/avoid, mapping mitigations to requirements and tests, documenting residual risk, tiering applications and modules to set modeling and review depth.
rules/05-outputs-operationalization.mdWriting the threat model document, building the security requirements backlog, turning abuse cases into tests, keeping the model alive (re-model triggers), the PR security-notes template.
rules/06-audit-reconstruction.mdAuditing an existing system: reconstructing the model from code, control-presence matrix, gap analysis, severity calibration, reporting.

Load only the files you need; rules/02 + rules/03 cover 80% of day-to-day work.

Top-10 Non-Negotiables

  1. No model without a diagram. Every threat model includes a DFD (mermaid or ASCII) with explicit trust boundaries. Prose-only models hide boundary confusion.
  2. Threats are sentences, not nouns. Actor → action → asset → impact. "SQL injection" is a vector; "anonymous user exfiltrates the orders table via unparameterized search query" is a threat.
  3. Every entry point gets enumerated — including queues, cron, webhooks, callbacks, admin tooling, and CI/CD. HTTP routes are never the whole attack surface.
  4. Trust boundary crossings drive enumeration. Apply STRIDE per interaction at each crossing; data inside one boundary at one privilege level rarely needs the full treatment.
  5. Personal data ⇒ LINDDUN pass. STRIDE does not cover linkability, identifiability, or non-compliance; run a privacy pass whenever PII flows or is stored.
  6. Rate with likelihood × impact in context. Never ship raw DREAD scores or unadjusted CVSS base scores as priorities.
  7. Every threat gets a disposition. Mitigate (→ requirement ID + test), accept (→ named owner + expiry date), transfer, or avoid. "Noted" is not a disposition.
  8. Mitigations become tests. Each mitigated threat yields at least one abuse-case test (unit, integration, or rule-based check) that fails if the control regresses.
  9. LLM/agent components are first-class attack surface. Model prompt injection, tool-call abuse, excessive agency, and data exfil via outputs for any system invoking an LLM with tools or retrieved content.
  10. Models expire. Define re-model triggers in the document itself — at least the canonical list in rules/05 §4 (e.g. new dependency, trust boundary, data class, auth change); an undated, trigger-less threat model is treated as absent in audits.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Sota Threat Modeling」では何ができますか?

新しいシステムの設計と既存システムの監査、両方に対応する最先端の脅威モデリングです。信頼できない入力、新たな信頼境界、機密データ、サードパーティ依存関係に関わる機能、サービス、統合、アーキテクチャを設計するとき(BUILDモード)にご利用ください。既存のコードベースをレビュー、監査、ペネトレーションテストの対象範囲設定を行い、暗黙の脅威モデルを再構築して抜け漏れを見つけるとき(AUDITモード)にも役立ちます。コードレベルの脆弱性レビューは対象外です。その場合はsota-code-securityをご利用ください。トリガーキーワード:threat model、STRIDE、LINDDUN、PASTA、attack tree、kill chain、data flow diagram、DFD、trust boundary、attack surface、abuse case、security design review、security architecture review、risk rating、DREAD、CVSS、security requirements、secure design、security audit、gap analysis、prompt injection、excessive agency、threat catalog、mitigations、residua...

TypingMindでSota Threat Modelingを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Sota Threat Modelingはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSota Threat Modelingをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-threat-modelingを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Sota Threat Modelingを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Sota Threat Modelingで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSota Threat Modelingを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Sota Threat Modeling」は無料ですか?

はい。martinholovskyがCC-BY-4.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇