tm7-threat-model
하는 일
이 에이전트는 Microsoft 위협 모델링 도구용 위협 모델 파일(.tm7)을 만듭니다. 시스템 설명을 도구가 이해하는 정확한 형식의 다이어그램과 보안 위협으로 바꿉니다.
사용하는 경우
- ✓위협 모델 파일(.tm7)을 만들어야 할 때.
- ✓STRIDE 위협 모델링을 수행하면서 .tm7 파일이 필요할 때.
- ✓Microsoft 위협 모델링 도구용 .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에게 요청하는 예시
“사용자, 웹 앱, 데이터베이스가 있는 시스템을 위한 .tm7 파일을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 시스템의 구성 요소(프로세스, 데이터베이스 등)를 파악해 고유 식별자를 부여하고, 모든 것을 특정 구조의 XML 파일로 정리합니다. 이 파일은 Microsoft 위협 모델링 도구가 읽을 수 있도록 정확한 형식으로 만들어집니다.
기술 내용 (원본 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 위협 모델링 도구가 시스템 보안 모델을 저장하고 공유하기 위해 쓰는 파일입니다.
STRIDE란 무엇인가요?
시스템의 보안 위협을 찾는 방법입니다. 스푸핑, 변조, 부인 방지, 정보 노출, 서비스 거부, 권한 상승에 초점을 맞춥니다.
파일 형식이 왜 그렇게 중요한가요?
.tm7 파일은 매우 특정한 XML 구조를 가집니다. 형식이 잘못되면 Microsoft 위협 모델링 도구가 파일을 열지 못하고 오류 메시지를 보여 줍니다.
상세 정보
작성자의 원본 설명
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 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.