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>testing
Use when syncing Beads state to markdown, checking Flow status, refreshing context docs, validating task markers, or reporting ready/blocked Flow work.
testing
Use when initializing Flow in a repo, configuring .agents, installing or checking Beads bd, setting local-only sync policy, or creating first project context files.
data-ai
Use when drafting PRDs, researching, planning, refining, revising, or creating .agents/specs/<flow_id>/spec.md worksheets for Flow.
testing
Use when implementing Flow tasks from Beads or spec.md, claiming ready work, applying TDD, recording task notes, committing, and syncing after task state changes.