tm7-threat-model
できること
このエージェントは、Microsoftのツール向けに脅威モデルファイル(.tm7)を作成します。システムの説明を、図とセキュリティ上の脅威に変換し、ツールが読み取れる正確な形式で出力します。
使う場面
- ✓脅威モデルファイル(.tm7)を作成する必要があるとき。
- ✓STRIDEによる脅威モデリングを行い、.tm7ファイルが必要なとき。
- ✓Microsoft Threat Modeling Tool用の.tm7ファイルを生成または修正したいとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/tm7-threat-model/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ユーザー、Webアプリ、データベースがあるシステムの.tm7ファイルを作成して。”
毎週5つの新しいスキル。1分で読めます。
仕組み
システムの構成要素(プロセスやデータベースなど)を特定し、それぞれに一意の識別子を割り当てます。そのうえで、決まった構造のXMLファイルにまとめます。ファイルは、Microsoft Threat Modeling Toolで読み込めるよう正確に整形されます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Microsoft Threat Modeling Tool (.tm7) Generator
You generate valid .tm7 files for the Microsoft Threat Modeling Tool (v7.3+). A .tm7
file is not generic XML — it is a WCF DataContractSerializer document with an exact
namespace and element structure. If the structure is wrong, the tool refuses to open the file
with:
"File is not an actual threat model or the threat model may be corrupted."
Your job is to translate a described system (components, data stores, external actors, data
flows, trust boundaries) into a diagram plus STRIDE threats, serialized in the exact .tm7
format described below.
Workflow
When asked to produce a .tm7 file:
- Model the system. Identify the elements:
- Processes (web apps, services, functions) →
StencilEllipse,GE.P - Data stores (databases, caches, queues, blobs) →
StencilParallelLines,GE.DS - External interactors (users, browsers, third-party systems) →
StencilRectangle,GE.EI - Trust boundaries →
BorderBoundary,GE.TB - Data flows connecting the above →
Connector,GE.DF
- Processes (web apps, services, functions) →
- Assign a unique lowercase UUID (e.g.
148ade68-5c80-40f3-8e1f-4e2cabdb5991) to every stencil and every flow. Never use human-readable ids likeusers-browser. - Lay out coordinates (
Left/Top/Width/Height) so stencils don't overlap. - Generate STRIDE threats per interaction and place them in
<ThreatInstances>. - Serialize using the structure in this guide, mirroring
assets/example-minimal.tm7. - Validate against the "Common Mistakes" checklist before returning the file.
- Write the file with no XML declaration and no pretty-print indentation (a single continuous XML stream is what the serializer emits).
Always open assets/example-minimal.tm7 first and adapt it — reuse its exact
serialization skeleton and only change stencil types, names, coordinates, flows, and threats.
CRITICAL: Serialization format
TM7 files use WCF DataContractSerializer XML, not standard XML.
The file MUST start with this exact root element — no <?xml?> declaration:
<ThreatModel xmlns="http://schemas.datacontract.org/2004/07/ThreatModeling.Model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
NEVER use:
<?xml version="1.0" encoding="utf-8"?>— causes deserialization failure.xmlns:xsi/xmlns:xsd— these are standard XML namespaces, not DataContract namespaces.- Invented elements such as
<SecurityGaps>or<Mitigations>— they do not exist in the TM7 schema.
Note:
<MetaInformation>(with children like<Owner>,<Contributors>,<Reviewer>,<Assumptions>,<ExternalDependencies>,<HighLevelSystemDescription>,<ThreatModelName>),<Notes>, and<KnowledgeBase>are part of the real schema and are emitted by the tool — keep them (see the structure below andassets/example-minimal.tm7). Just don't invent elements that the tool never produces.
Required namespace prefixes
| Prefix | URI | Used for |
|---|---|---|
| (default) | http://schemas.datacontract.org/2004/07/ThreatModeling.Model |
Root ThreatModel |
xmlns:i |
http://www.w3.org/2001/XMLSchema-instance |
Type attributes |
xmlns:z |
http://schemas.microsoft.com/2003/10/Serialization/ |
Reference ids (z:Id) |
xmlns:a |
http://schemas.microsoft.com/2003/10/Serialization/Arrays |
Arrays / collections |
xmlns:b |
http://schemas.datacontract.org/2004/07/ThreatModeling.KnowledgeBase |
Stencil properties |
xmlns:c |
http://www.w3.org/2001/XMLSchema |
Primitive type values |
File structure (correct order)
A full tool export contains, in this order: DrawingSurfaceList, MetaInformation, Notes,
ThreatInstances, ThreatMetaData (often empty/self-closing), then the large generic
KnowledgeBase as a top-level sibling (not nested inside ThreatMetaData), and finally
Profile.
<ThreatModel xmlns="..." xmlns:i="...">
<DrawingSurfaceList>
<DrawingSurfaceModel z:Id="i1" xmlns:z="...">
<GenericTypeId xmlns="...Abstracts">DRAWINGSURFACE</GenericTypeId>
<Guid xmlns="...Abstracts">{guid}</Guid>
<Properties xmlns="...Abstracts" xmlns:a="...Arrays">...</Properties>
<TypeId xmlns="...Abstracts">DRAWINGSURFACE</TypeId>
<Borders xmlns:a="...Arrays">
<!-- Stencil elements: processes, data stores, external entities, boundaries -->
…
よくある質問
.tm7ファイルとは何ですか?
Microsoft Threat Modeling Toolが、システムのセキュリティモデルを保存・共有するために使うファイルです。
STRIDEとは何ですか?
システムのセキュリティ上の脅威を洗い出す手法です。Spoofing(なりすまし)、Tampering(改ざん)、Repudiation(否認)、Information Disclosure(情報漏えい)、Denial of Service(サービス拒否)、Elevation of Privilege(権限昇格)の頭文字を取っています。
なぜファイル形式がそれほど重要なのですか?
.tm7ファイルは非常に特定のXML構造を持っています。形式が正しくないと、Microsoft Threat Modeling Toolでファイルを開けず、エラーメッセージが表示されます。
詳細
作者による元の説明
Creates valid Microsoft Threat Modeling Tool (.tm7) files compatible with the Microsoft Threat Modeling Tool v7.3+. Use this skill whenever asked to create, generate, or modify a .tm7 threat model file, or when performing STRIDE threat modeling that should output a .tm7 file that opens cleanly in the Microsoft Threat Modeling Tool.
repo: github/awesome-copilot
人気
- GitHubのスター
- 40k
- ランキング
- #7453
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。