STRIDE + OWASP-based security audit that scans code for vulnerabilities, categorizes findings by severity, and optionally fixes them iteratively using the autoresearch guard pattern.
Security runs a multi-layer analysis: STRIDE threat modeling, OWASP Top 10 mapping, dependency auditing (npm audit, pip-audit, etc.), and secret detection. Findings are categorized from Critical to Info. With --fix, it enters an iterative loop that applies targeted fixes and validates each one against your test suite.
- Before a production release
- After adding authentication or payment features
- During periodic security reviews
- When onboarding a new codebase
- After a dependency update with known CVEs
| Layer | What It Checks |
|---|
| STRIDE | Spoofing, Tampering, Repudiation, Information Disclosure, DoS, Elevation of Privilege |
| OWASP Top 10 | A01 Broken Access Control through A10 SSRF |
| Dependency Audit | npm audit, pip-audit, govulncheck, bundle audit (auto-detected) |
| Secret Detection | Hardcoded API keys, passwords, tokens, private keys |
| Argument | Description |
|---|
scope | Glob pattern or full for entire codebase |
--fix | Apply fixes iteratively with guard validation |
--iterations N | Cap total fix iterations (default: 10) |
/ck:security src/api/**/*.ts
/ck:security src/ --fix --iterations 15
/ck:security full
| Level | Meaning |
|---|
| Critical | Exploitable now, data loss or unauthorized access |
| High | Significant risk, should fix before release |
| Medium | Limited exploitability or impact, fix next sprint |
| Low | Minor concern, fix when convenient |
| Info | Best practice suggestion |
- Scope Resolution — expand glob or
full into file list
- STRIDE Analysis — evaluate all 6 threat categories
- OWASP Check — map findings to A01-A10
- Dependency Audit — run stack-specific audit tools
- Secret Detection — scan for hardcoded credentials
- Categorize — assign severity to each finding
- Sort findings by severity (Critical first)
- For each finding: apply targeted fix → run guard (tests/lint) → commit with
security(fix-N): <description>
- If guard fails: stop early and report the failure (no partial fixes left uncommitted)
- Summary: files scanned, count per severity
- Findings table: #, Severity, Category, File, Description, Fix Recommendation
- Autoresearch — underlying guard pattern used by
--fix mode
- Code Review — broader code quality review including security
- Security Scan — lighter-weight secret and dependency scanning