Skip to content

Add tm7-threat-model skill for valid TM7 file generation#2280

Open
prasadgd9022 wants to merge 1 commit into
github:stagedfrom
prasadgd9022:add-tm7-threat-model-skill
Open

Add tm7-threat-model skill for valid TM7 file generation#2280
prasadgd9022 wants to merge 1 commit into
github:stagedfrom
prasadgd9022:add-tm7-threat-model-skill

Conversation

@prasadgd9022

Copy link
Copy Markdown

Description

Adds a new tm7-threat-model skill that generates valid Microsoft Threat Modeling Tool (.tm7) files.

.tm7 files use the WCF DataContractSerializer format (not generic XML); the Threat Modeling Tool refuses to open files that use a plain-XML structure. This skill documents the exact root element, namespace prefixes, stencil/data-flow/threat serialization, and a checklist of common mistakes that corrupt .tm7 files. It bundles a validated example-minimal.tm7 reference (well-formed, no <?xml?> declaration).

This is a clean re-submission of #1660 (which was closed only because it targeted main and had a polluted, auto-regenerated diff). This PR targets staged and changes only the new skill folder plus its single generated row in docs/README.skills.md.

Type of Contribution

  • New skill file.

Additional Notes

  • npm run skill:validate✅ tm7-threat-model is valid.
  • npm run build regenerated docs/README.skills.md (single added row).
  • Targeting the staged branch as required.

Adds a skill that generates valid Microsoft Threat Modeling Tool (.tm7)
files using the correct WCF DataContractSerializer format, with a minimal
reference file. Includes STRIDE threat generation workflow and a checklist
of common serialization mistakes that corrupt .tm7 files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 12, 2026 17:44
@github-actions github-actions Bot added new-submission PR adds at least one new contribution skills PR touches skills labels Jul 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a skill for generating Microsoft Threat Modeling Tool .tm7 files.

Changes:

  • Documents TM7 serialization and STRIDE modeling.
  • Adds a bundled TM7 reference model.
  • Registers the skill in generated documentation.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
skills/tm7-threat-model/SKILL.md Defines generation instructions and serialization examples.
skills/tm7-threat-model/example-minimal.tm7 Provides the reference TM7 model.
docs/README.skills.md Adds the skill catalog entry.

Comment on lines +189 to +193
Threats go in `<ThreatInstances>` using `<KeyValueOfstringThreatpc_P0_PhBB>`:

```xml
<ThreatInstances>
<KeyValueOfstringThreatpc_P0_PhBB xmlns:a="...Arrays">
Comment on lines +54 to +55
- Custom elements such as `<MetaInformation>`, `<SecurityGaps>`, `<Mitigations>`,
`<Assumptions>` — they do not exist in the TM7 schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-submission PR adds at least one new contribution skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants