threat-model-gate — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited threat-model-gate (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Security cannot be added later. Features that touch user data, system boundaries, or trust relationships require threat modeling during planning — not after code is written.
Every feature that handles user data, authentication, or system boundaries requires explicit threat modeling before implementation.
"We'll secure it in the next sprint" is a commitment that never gets honored. The cost of retrofitting security is 10x the cost of designing it in. Threat modeling during planning is the minimum viable security practice.
Apply this gate when planning involves any of the following:
Authentication and Identity
Authorization and Access Control
Data Handling
API Design
Cryptography
Network and Infrastructure
Work through these four areas before committing to an implementation approach:
Identify what is worth protecting:
ASSETS TO IDENTIFY:
- What data does this feature create, read, update, or delete?
- What is the confidentiality classification? (public / internal / confidential / restricted)
- What is the integrity requirement? (can corruption be tolerated? for how long?)
- What is the availability requirement? (what is the acceptable downtime?)
- What are the downstream systems or users that depend on this data?Map where trust changes:
BOUNDARIES TO IDENTIFY:
- Where does data cross from an untrusted zone to a trusted zone?
- Which actors (users, services, admins) receive which level of trust?
- Where are authentication and authorization enforced?
- What can an unauthenticated caller reach?
- What can an authenticated-but-unauthorized caller reach?
- Where does input become data (the injection boundary)?Apply STRIDE to each asset and boundary (see STRIDE Quick Reference below):
FOR EACH BOUNDARY OR ASSET:
- S: How could an attacker impersonate a legitimate actor?
- T: How could an attacker modify data in transit or at rest?
- R: How could an actor deny having performed an action?
- I: How could an attacker read data they should not see?
- D: How could an attacker make the feature unavailable?
- E: How could an attacker gain more privilege than intended?For each threat identified, specify the control:
MITIGATIONS TO SPECIFY:
- Authentication controls (how is identity verified?)
- Authorization controls (how is permission verified?)
- Input validation (what are the trust boundaries for input?)
- Encryption (what is encrypted, with which algorithm, where?)
- Audit logging (what events are logged, where, for how long?)
- Rate limiting (what abuse scenarios does this prevent?)
- Failure mode (what happens when the control fails?)| Category | Threat Target | Standard Mitigation | DREAD Focus |
|---|---|---|---|
| Spoofing | Identity, authentication | MFA, strong auth, certificate pinning | Reproducibility: how reliably can credentials be forged? |
| Tampering | Data integrity, code | Input validation, signing, checksums | Damage Potential: what is the blast radius of tampered data? |
| Repudiation | Audit trails, logging | Comprehensive audit logs, timestamps | Discoverability: how visible is the logging gap? |
| Info Disclosure | Confidentiality | Encryption at rest/transit, access controls | Affected Users: how many users' data is exposed? |
| Denial of Service | Availability | Rate limiting, auto-scaling, circuit breakers | Exploitability: how easily can the DoS be triggered? |
| Elevation of Privilege | Authorization | Least privilege, RBAC, input validation | Damage Potential: what can the attacker do with elevated access? |
STRIDE is a starting point, not a complete threat model. Use it to ensure you have covered all six threat categories, then go deeper on the categories most relevant to the feature.
When threat modeling identifies specific threats, score each using DREAD (5 dimensions, each 0-10). The average determines severity classification.
| Dimension | Question | 0 (Low) | 5 (Medium) | 10 (High) |
|---|---|---|---|---|
| Damage Potential | How bad if exploited? | Minor inconvenience | Single user data loss | Full system compromise |
| Reproducibility | How reliably exploitable? | Race condition, rare | Requires specific config | Every time, automated |
| Exploitability | How much skill needed? | Nation-state capability | Security professional | Script kiddie, public exploit |
| Affected Users | How many impacted? | Single user, edge case | Subset of users | All users / tenants |
| Discoverability | How easy to find? | Requires source code access | Findable by scanning | Obvious from public interface |
Severity bands:
Calibration rule: When a score falls within 0.5 of a boundary (e.g., 5.5-6.4), check Damage Potential. If DP >= 7, round UP. If DP <= 3, round DOWN.
Every plan for a security-sensitive feature must include a ## Security Requirements section:
## Security Requirements
### Assets
- **[Asset Name]:** [Confidentiality: public/internal/confidential/restricted] | [Integrity: high/medium/low] | [Availability: high/medium/low]
### Trust Boundaries
- **Boundary:** [Description — e.g., "public internet to application server"]
- **Authentication:** [How identity is established]
- **Authorization:** [How permission is verified]
### STRIDE Analysis
| Threat | Vector | Mitigation | Residual Risk |
|--------|--------|-----------|---------------|
| Spoofing | [How an attacker could spoof] | [Control] | [low/medium/high] |
| Tampering | [How data could be tampered with] | [Control] | [low/medium/high] |
| Repudiation | [What actions could be denied] | [Control] | [low/medium/high] |
| Information Disclosure | [What data could be exposed] | [Control] | [low/medium/high] |
| Denial of Service | [What could be exhausted or crashed] | [Control] | [low/medium/high] |
| Elevation of Privilege | [How privilege could be escalated] | [Control] | [low/medium/high] |
### Security Controls
- **Input Validation:** [What is validated, where, and how]
- **Encryption:** [At rest: algorithm. In transit: TLS version, cipher suites]
- **Audit Logging:** [What events are logged, retention period, tamper protection]
- **Rate Limiting:** [Limits, scope, response on breach]
- **Secrets Management:** [Where credentials are stored, how rotated]
### Failure Modes
- **If authentication fails:** [Behavior — e.g., "return 401, log attempt, no information leakage"]
- **If authorization fails:** [Behavior — e.g., "return 403, log with user ID and resource"]
- **If encryption fails:** [Behavior — e.g., "abort operation, do not fall back to plaintext"]When you notice these in a plan, stop and apply threat modeling before proceeding:
"Security will be added later"
WRONG: "We'll add authentication in v2."
RIGHT: Define the authentication model now. Implementation can be phased; the design cannot.Implicit trust of internal services
WRONG: "It's only called by our internal API, so we don't need auth."
RIGHT: Internal services are compromised too. Define what trust means and how it is enforced.Encryption as an afterthought
WRONG: "We'll encrypt the database later when we have time."
RIGHT: Define encryption at rest requirements now. Schema changes after launch are expensive.Authorization by obscurity
WRONG: "Users won't know the endpoint exists."
RIGHT: Assume all endpoints are discoverable. Enforce authorization explicitly.Logging as a security control
WRONG: "We'll know if something bad happens because we log everything."
RIGHT: Logging is detection and response, not prevention. Identify the preventive controls."We trust our users"
WRONG: "Our users are internal employees, they wouldn't abuse this."
RIGHT: Insider threat is real. Least privilege applies to employees too. Define what each role can do.Deferring the threat model to the security team
WRONG: "Security will review this before it ships."
RIGHT: The security team reviews your threat model. You write the threat model. Start now.Sharing secrets in plans or commits
WRONG: Including actual API keys, connection strings, or credentials in plan documents or code.
RIGHT: Reference secrets by name only. Actual values belong in secrets managers, not in plans.When drafting or reviewing a plan for a security-sensitive feature:
## Security Requirements section with assets, trust boundaries, STRIDE analysis, and security controls documented? If not, the plan is incomplete.users table password_hash column, never logged" is a mitigation.## Security Requirements section for security-sensitive features should not receive architect approval./architect but the Security Requirements section is missing or shallow, raise it before implementation begins. It is cheaper to fix the design than the code./secure-review finds issues that the threat model should have caught, update the threat model section of the plan and the .claude/learnings.md file. Threat model gaps are learning opportunities.receiving-code-review governs how you evaluate the reviewer's feedback; threat-model-gate governs whether the implementation addresses the correct threats.This skill provides a planning gate -- it ensures threat modeling happens before implementation. For the full threat modeling methodology with three-phase STRIDE+DREAD analysis and OTM JSON output, load the standalone threat-model knowledge-base skill:
Using skills/threat-model/SKILL.md: perform a threat model for this system.The threat-model skill provides:
reference/otm-schema.md and reference/report-template.mdSecurity is a design constraint, not a feature. It cannot be sprinted in after the architecture is set.
Threat modeling during planning takes 30 minutes. Retrofitting security after launch takes months and may require breaking API changes, data migrations, or architectural rewrites.
Model the threats. Document the controls. Then build.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.