skills/security-reasoning/SKILL.md
MANDATORY threat analysis. You MUST invoke this skill before writing or approving ANY code involving authentication, authorization, cryptography, input handling, payment processing, PII, secrets management, API endpoints, or trust boundaries. Do NOT write security-sensitive code without running STRIDE analysis first. Do NOT say you will add security later. Auth is a design decision, not a feature to bolt on.
npx skillsauth add xD4O/praxis security-reasoningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step. Do not skip steps. Do not combine steps. Do not summarize. Work through each gate in order.
This task involves a trust boundary. You MUST complete threat analysis before writing or approving security-sensitive code.
List every point where data crosses a trust boundary:
For each boundary, name what's on each side and what data crosses.
For each trust boundary, answer ALL six questions. Do not skip any. Mark each as MITIGATED, NEEDS-MITIGATION, or NOT-APPLICABLE.
S — Spoofing: Can an attacker pretend to be someone else at this boundary? How is identity verified? What happens if verification is bypassed?
T — Tampering: Can data be modified in transit or at rest? Is integrity checked? What happens if data is silently corrupted?
R — Repudiation: Can a user deny they performed an action? Are significant actions audit-logged with tamper-proof timestamps?
I — Information Disclosure: Can sensitive data leak? Is data encrypted in transit (TLS) and at rest? Are error messages sanitized? Do logs accidentally include tokens, passwords, or PII?
D — Denial of Service: Can this boundary be overwhelmed? Is there rate limiting? Resource quotas? Timeout enforcement?
E — Elevation of Privilege: Can a user gain unauthorized access? Is authorization checked at every operation, not just at the entry point? Are permissions enforced server-side, not just client-side?
Produce a table:
| Boundary | Threat | Severity | Mitigation | Status | |---|---|---|---|---| | [boundary] | [S/T/R/I/D/E] | [Critical/High/Med/Low] | [what prevents it] | [done/needed] |
From the table, identify the 3 highest-severity unmitigated threats. For each, state the specific mitigation required before this code ships.
<HARD-GATE> Do NOT approve, merge, or present security-sensitive code as complete until: - All trust boundaries are identified - STRIDE is answered for each boundary (no blanks) - Top 3 risks have specific mitigationsRed flags that this skill catches:
After STRIDE analysis is complete and mitigations are identified:
If Superpowers is installed → pass the threat model and required mitigations to whichever Superpowers skill is active (brainstorming, writing-plans, or code-review). The mitigations MUST appear in the plan and be verified during code review. Do NOT implement security mitigations inside this skill — hand the requirements to Superpowers for execution.
If Superpowers is NOT installed → proceed to implementation with the mitigations as requirements in your own plan.
development
MANDATORY — HIGHEST PRIORITY SKILL. You MUST invoke this skill (praxis) BEFORE invoking superpowers:brainstorming or ANY other skill when the task is non-trivial. This skill classifies the problem, selects reasoning frameworks, and runs threat analysis BEFORE brainstorming begins. Do NOT invoke superpowers:brainstorming first. Do NOT respond directly. Do NOT ask clarifying questions on your own. Invoke praxis FIRST, complete its gates, THEN hand off to superpowers:brainstorming. Non-trivial means: system design, feature planning, architecture decisions, debugging, security-sensitive code, trade-off evaluation, code review, or refactoring. Trivial means: fix a typo, rename a variable, answer a factual question, run a command.
development
MANDATORY strategic analysis. You MUST invoke this skill for business decisions, product strategy, competitive analysis, roadmap prioritization, or any decision about WHAT to build rather than HOW to build it. Do NOT skip SWOT analysis. Do NOT present strategy without measurable OKRs. Invoke when the problem is about direction, positioning, or priorities rather than implementation.
development
MANDATORY first step. You MUST invoke this skill before brainstorming, designing, or planning any non-trivial work. Do NOT start asking clarifying questions on your own — this skill's gates ARE the clarifying questions. Invoke when the user asks to build, design, plan, create, architect, or implement anything substantial. Do NOT skip this because the task seems straightforward. Straightforward-seeming tasks with wrong framing produce the most expensive failures.
testing
MANDATORY validation. You MUST invoke this skill before presenting any design, plan, architecture decision, or significant recommendation as final. Runs 7 cognitive debiasing checks: inversion, second-order effects, MECE coverage, map vs territory, adversarial, simplicity, and reversibility. Do NOT present conclusions without running all 7 checks. Invoke after brainstorming produces a design, after a plan is drafted, before any irreversible action, or when asked to validate or review an approach.