tm7-threat-model
Fungsinya
Agent ini membuat file threat model (.tm7) untuk tool Microsoft. Agent ini mengubah deskripsi sistem menjadi diagram dan ancaman keamanan, dengan format yang tepat sesuai yang dipahami oleh tool tersebut.
Kapan dipakai
- βSaat Anda perlu membuat file threat model (.tm7).
- βSaat melakukan pemodelan ancaman STRIDE dan membutuhkan file .tm7.
- βJika Anda ingin membuat atau mengubah file .tm7 untuk Microsoft Threat Modeling Tool.
Link skill
https://github.com/github/awesome-copilot/blob/main/skills/tm7-threat-model/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuatkan file .tm7 untuk sistem dengan satu pengguna, satu aplikasi web, dan satu database.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent ini mengidentifikasi komponen sistem Anda (seperti proses dan database), memberi setiap komponen identifier unik, lalu menyusun semuanya ke dalam file XML dengan struktur tertentu. File tersebut diformat dengan tepat agar bisa dibaca oleh Microsoft Threat Modeling Tool.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 -->
β¦
Pertanyaan umum
Apa itu file .tm7?
Itu adalah file yang digunakan oleh Microsoft Threat Modeling Tool untuk menyimpan dan membagikan model keamanan sistem.
Apa itu STRIDE?
STRIDE adalah metode untuk mengidentifikasi ancaman keamanan pada sistem, dengan fokus pada Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, dan Elevation of Privilege.
Mengapa format file sangat penting?
File .tm7 memiliki struktur XML yang sangat spesifik. Jika strukturnya salah, Microsoft Threat Modeling Tool tidak akan bisa membuka file tersebut dan akan menampilkan pesan error.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 40k
- Peringkat
- #7453
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
acquire-codebase-knowledge
40kMembantu agent Anda memahami dan mendokumentasikan proyek kode yang sudah ada. Berguna untuk proses onboarding anggota baru atau mendapatkan gambaran arsitektur.
acreadiness-assess
40kMemungkinkan agent Anda menilai kesiapan proyek untuk AI dan membuat laporannya. Berguna untuk mengetahui seberapa siap proyek menggunakan alat AI.
acreadiness-generate-instructions
40kMembantu agent Anda membuat instruksi untuk alat AI berdasarkan hasil penilaian. Berguna untuk meningkatkan cara AI berinteraksi dengan kode dan menutup celah yang ditemukan.
acreadiness-policy
40kMemungkinkan agent Anda membantu menyusun atau menerapkan kebijakan untuk penilaian proyek AI. Berguna untuk menstandarisasi evaluasi proyek dan memastikan kepatuhan.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.