threat-modeling
Analyzes data flows for security threats and proposes mitigations. Use when assessing a new feature, an architecture change or a compliance review.
- License 许可
- MIT
- 所属仓库
- vibbs/company-os
- 最近更新
- 2026-10-21
- Stars
- ★ 6
- Forks
- 2
01 前言 Front Matter
- name
- threat-modeling
- runtimes
- { "claude": { "argument-hint": "[--quick]", "user-invocable": true } }
- description
- Analyzes data flows for security threats and proposes mitigations. Use when assessing a new feature, an architecture change or a compliance review.
03 SKILL.md 正文
Threat Modeling
Reference
- ID: S-RISK-01
- Category: Risk
- Inputs: system architecture, data flow diagrams, trust boundaries, asset inventory
- Outputs: threat model document → artifacts/risk/
- Used by: Ops & Risk Agent
- Tool scripts: ./tools/artifact/validate.sh
Purpose
Produces a structured threat model that identifies attack surfaces, enumerates threats using a systematic methodology (STRIDE), and maps each threat to concrete mitigations, ensuring security is considered proactively rather than reactively.
Procedure
Step 0: Stage-Aware Mode Selection
Read company.stage from company.config.yaml. If idea or mvp:
MVP Security Checklist (use instead of full STRIDE):
- Auth provider (not roll-your-own)
- HTTPS enforced
- Input sanitization on all user-supplied fields
- Payment webhook signature verification (if applicable)
- No secrets in code (run
./tools/security/secrets-scan.sh) - Dependency scanning configured
Reserve full STRIDE analysis for growth/scale stages or features touching financial data/PII at scale. If user passes --quick, always use MVP mode regardless of stage.
- Define the scope: which system, feature, or data flow is being modeled.
- Draw or review the data flow diagram (DFD): external entities, processes, data stores, data flows. Use the excalidraw skill (S-ENG-17) to produce the DFD — Mermaid
flowchart LRwith trust boundary subgraphs inline, and optionally an Excalidraw file for richer documentation. - Identify trust boundaries: where data crosses between trust zones.
- Enumerate threats using STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) for each element.
- Rate each threat: likelihood (1-5) and impact (1-5), calculate risk score.
- For each threat, define a mitigation: preventive control, detective control, or accepted risk.
- Prioritize mitigations by risk score.
- Document residual risks: threats accepted without full mitigation.
- Define review triggers: when this threat model should be revisited.
- Save the threat model to
artifacts/risk/. - Validate the artifact using
./tools/artifact/validate.sh.
Cross-References
- security-posture (S-RISK-04) — aggregate view of all threat model findings across features; run
/security-posturefor cross-cutting risk inventory - release-readiness-gate (S-QA-03) — consumes threat model as a required artifact for Bar 3 (Security & Risk)
Quality Checklist
- [ ] Scope is clearly defined and bounded
- [ ] Data flow diagram is complete with all trust boundaries
- [ ] STRIDE analysis covers all DFD elements
- [ ] Each threat has likelihood and impact ratings
- [ ] Every high-risk threat has a defined mitigation
- [ ] Residual risks are explicitly documented and accepted
- [ ] Review triggers are specified
- [ ] Artifact passes validation
04 同仓库更多 Skills
typo-field
Fixture skill with a misspelled top-level field.
spaced-comments
Fixture skill with comments and spaces after block keys.
crlf-comments
Fixture skill with Windows line endings.
claude-fields
Fixture skill using top-level fields Claude Code documents.
workflow-router
Maps an objective to the artifacts, stages and agents it needs. Use when deciding what happens next or which agents to involve.
weekly-review
Summarizes your week: what shipped, AI spend, support themes, security health and next priorities. Use at the end of each week.