stride-threat-model
Model a system with STRIDE; writes docs/threat-models/<slug>.md with frontmatter validated by the ThreatModel artifact schema.
- License 许可
- MIT
- 最近更新
- 2026-10-29
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- stride-threat-model
- description
- Model a system with STRIDE; writes docs/threat-models/<slug>.md with frontmatter validated by the ThreatModel artifact schema.
02 资源文件 1
- 参考文档routing.yaml348 B
03 SKILL.md 正文
stride-threat-model
Frame a threat model around the six STRIDE categories, decompose the scope by data flow, list threats with mitigations.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
When to use
- A workflow invokes
polymath-security:stride-threat-model. - A new feature handles authentication, payments, PII, or any trust boundary.
- The user says "let's threat-model this" or "STRIDE this".
Inputs
- System name + scope (required).
- PRD path if available (grounds the data classification).
- Existing threat models or ADRs in the area.
Procedure
- Read
Threat-model.md. - Slug from the system name: a workflow's
${workflow.slug}wins; otherwise lowercase it, replace each run of characters outsidea-z0-9with-, trim-at the ends, and cut to ≤ 60 characters at a-. An existing file at the target path is updated in place (show the diff), never duplicated. - Summary-first checkpoint. Show a one-screen skeleton — the scope boundary, the trust boundaries found, the 2–3 highest-risk STRIDE candidates — and confirm scope before the full model. Unattended run (workflow step, subagent): nobody can confirm — skip the wait, write the model, and open the summary with the skeleton.
- Draft
docs/threat-models/<slug>.md:- Scope — explicit boundary; what is and isn't covered.
- Data flow — mermaid or ASCII diagram showing every trust boundary the system spans (user → API → DB, internal → external, etc).
- Assumptions — what the platform already protects.
- Threats by STRIDE — one table per category. For each: threat description, mitigation, owner.
- Frontmatter must satisfy the
ThreatModelartifact schema (registry/schemas/artifacts/Threat-model.schema.json):artifact: ThreatModel,system,scope,owner,created,stride_categories(subset of the six STRIDE values).
Quality bar
- Every threat has a named owner (a team, not a person) and a mitigation that is observable in the system.
- At least one threat in each of the six STRIDE categories. If a category genuinely doesn't apply (e.g., no auth on a publicly read-only endpoint), say so explicitly under that section instead of leaving it blank.
- No mitigation that boils down to "be careful" or "review carefully".
Output
- File:
docs/threat-models/<slug>.md. - Summary listing total threat count by category.
Verifying in a workflow
If you author a workflow that invokes this skill, add a mustPass check:
mustPass:
- id: threat-model-valid
type: artifactValid
path: docs/threat-models/${workflow.slug}.md
artifact: ThreatModel
04 同仓库更多 Skills
runbook
Write or refresh an operational runbook for an alert/symptom; structured as TL;DR + Pre-checks + Steps + Verification + Rollback + Escalation.
rfc
Draft a lightweight design RFC to docs/rfcs/<slug>.md; Summary, Motivation, Detailed design, Drawbacks, Alternatives, Unresolved questions. A proposal to debate, not a recorded decision (adr).
editorial-pass
Review and tighten prose in a Markdown artifact for a target tone (terse, formal, friendly) without dropping information; preserve quotations and load-bearing constraints.
architecture-review-facilitation
Run an architecture review as a process — entry criteria, reviewer checklist, decision log, and follow-up actions — pairing the design artifact with a red-team pass.
architecture-doc
Write a C4-style architecture document; System Context + Containers (+ Components when interesting) with mermaid diagrams. Describes structure, not a decision (adr) or proposal (rfc).
adr
Write an Architecture Decision Record (Michael Nygard format) to docs/adrs/NNNN-<slug>.md; frontmatter validated by the ADR artifact schema. Records a made decision, not a proposal to debate (rfc).