plugins/flow/skills/security-auditor/SKILL.md
Use when reviewing authentication, authorization, user input, secrets, API keys, database queries, file uploads, session management, external API calls, OWASP risks, or data handling attack surface.
npx skillsauth add cofin/flow security-auditorInstall 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.
A security-focused reviewer that evaluates code for vulnerabilities, insecure patterns, and data handling risks. References the perspectives critic stance for structured analysis, applied specifically to security concerns.
Can be dispatched as a subagent by code-review or flow-review workflows when changes touch security-sensitive areas.
Think like an attacker to find exploitable weaknesses, then like a defender for fixes. Severity classification:
Work through each category (acknowledge secure categories briefly):
For each finding: OWASP category, severity, realistic attack vector, fix. Categories with no findings acknowledged briefly as secure.
</workflow> <guardrails>Before delivering findings, verify:
Context: Security audit of a user lookup API endpoint.
Finding 1 — Injection (SQL) — Severity: Critical
db.query("SELECT * FROM users WHERE id = " + req.params.id) concatenates user input directly into SQL. Attack vector: GET /users/1;DROP TABLE users-- executes arbitrary SQL. Fix: use parameterized query db.query("SELECT * FROM users WHERE id = $1", [req.params.id]).
Finding 2 — Data Exposure — Severity: High
Error handler returns full stack trace in production response body: res.json({ error: err.stack }). Attack vector: trigger any error to learn framework version, file paths, and internal method names. Fix: return generic error to client, log stack trace server-side only.
Finding 3 — Authorization — Severity: High
Endpoint checks req.user.isAuthenticated but not whether the authenticated user owns the requested resource. Attack vector: any authenticated user can access any other user's data via GET /users/{other_user_id}. Fix: add req.user.id === req.params.id check or implement object-level permission middleware.
Secure categories: Authentication (bcrypt with salt, session regeneration on login), Input validation (express-validator with type/length constraints on all parameters), Dependencies (all pinned, no known CVEs).
</example>development
Use when tracing execution paths, mapping dependencies, understanding unfamiliar code, following data flow, investigating end-to-end behavior, debugging call chains, or deciding which files to read next.
testing
Use when analyzing tradeoffs, comparing approaches, weighing options, assessing risks, stress-testing conclusions, identifying blind spots, or applying multiple viewpoints to a decision.
development
Use when reviewing hot paths, slow code, database queries, N+1 risks, memory usage, loops, I/O, caching strategy, concurrency, latency-sensitive paths, or resource efficiency.
data-ai
Use when a repository has .agents, when the user asks for Flow lifecycle routing, Beads-backed task memory, spec-first planning, TDD implementation, sync/status, review, finish, archive, or /flow:* help.