security-gate
Security Gate
Two small jobs. While the user is still choosing the feature, ask the threat-model-lite questions, so later phases do not guess security decisions. At planning, apply the deep-pass trigger list to each slice, so deep slices get a security-focused review. This skill never performs the review; full-review does.
Threat-model-lite — spec-time checklist (interactive)
Run this inside the requirements interview. Resolve repository facts from evidence and return only unresolved security decisions to the interview's frontier; ask only the questions the feature exposes. They share the interview's five-question limit; do not send a second batch. Record the answers in the decision record with the user's actual words or the host's message locator. to-prd carries them into the PRD's Security Decisions section.
Reuse recorded decisions by their stable IDs and source-index references. Each slice still evaluates its own deep-pass triggers; a shared decision is not a shared risk classification. Use a safe scoped default only for a nonmaterial detail. Ask only when the answer changes access, data handling, scope, cost, permitted effect, or an unresolved security decision. Silence is not approval.
- Actors & auth: who can invoke this? What roles/permissions gate each action? What happens for unauthenticated or wrong-role access?
- Untrusted input: what data arrives from users or external systems? Where is it validated, and what is rejected?
- Data sensitivity: does this touch PII, credentials, tokens, or financial data? Where is it stored, logged, or sent? What must never appear in logs or error messages?
- Secrets: any new keys, tokens, or credentials? Where do they live (env, secret manager) and who rotates them?
- Dependencies: any new packages or services? Why this one, and what is its blast radius if compromised?
- Tenancy & access scope: can one user's request ever read or write another user's data? What enforces the boundary?
- Abuse: what does a malicious or careless user do with this feature? Rate limits, quotas, idempotency?
- Failure exposure: on error or timeout, what leaks (stack traces, internal IDs, partial writes)?