Langsung ke konten
Skillpedia
Keamanan40k Β· #7453

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.md

Salin 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

Gunakan skill ini untuk membantu saya: https://github.com/github/awesome-copilot/blob/main/skills/tm7-threat-model/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

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:

  1. 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
  2. Assign a unique lowercase UUID (e.g. 148ade68-5c80-40f3-8e1f-4e2cabdb5991) to every stencil and every flow. Never use human-readable ids like users-browser.
  3. Lay out coordinates (Left/Top/Width/Height) so stencils don't overlap.
  4. Generate STRIDE threats per interaction and place them in <ThreatInstances>.
  5. Serialize using the structure in this guide, mirroring assets/example-minimal.tm7.
  6. Validate against the "Common Mistakes" checklist before returning the file.
  7. 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 and assets/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

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa