/mattpocock-skills:security-reviewfrom mattpocock-skills
Audit a git diff, branch, or PR for security vulnerabilities, authorization flaws, PII leaks, and injection risks. Use when conducting security reviews, auditing PRs for security, or verifying tenant isolation.
Ships in mattpocock-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A dedicated security and data privacy review of the diff between HEAD and a fixed point (or staged and working-tree changes).
This skill scans code specifically for Application Security (AppSec) vulnerabilities, broken authorization logic, multi-tenant data leaks, sensitive data exposure, and configuration weaknesses.
When running as a sub-agent within code-review, always run in a fresh context window to prevent contamination from earlier code authoring discussions.
Evaluate the diff against these five specific pillars:
tenant_id or organization_id derived from the verified session? Look for missing where: { tenantId } clauses.isAdmin, permission guards)? Can a standard user invoke admin operations?exec, spawn, popen) without strict whitelisting?dangerouslySetInnerHTML, unescaped template tags, or raw HTML injection with untrusted input?127.0.0.1, 169.254.169.254, 10.0.0.0/8, 192.168.0.0/16)?../?*) alongside credentials: true?POST, PUT, DELETE) protected against Cross-Site Request Forgery?Run git diff <fixed-point>...HEAD (or evaluate the requested diff). Verify the ref exists and the diff is non-empty.
For every finding in the diff, categorize severity:
Every finding must cite the exact file, line number or hunk, attack scenario, and remediation code:
## Security & Privacy Findings
### [HIGH] IDOR in Invoice Retrieval Endpoint
- **Location**: `src/api/invoices.ts:45-52`
- **Vulnerability**: Insecure Direct Object Reference (AuthZ)
- **Attack Scenario**: An authenticated user can pass any `invoiceId` in the path param. The database query `db.invoice.findUnique({ where: { id: params.invoiceId } })` fails to filter by the requesting user's `organizationId`. An attacker can read competitors' invoices.
- **Remediation**:
```ts
const invoice = await db.invoice.findFirst({
where: { id: params.invoiceId, organizationId: session.organizationId }
});
if (!invoice) throw new NotFoundError();
src/auth/service.ts:88logger.info("Login attempt", { email: user.email }) records customer PII to shared log aggregates.{ emailHash: sha256(user.email) }.
If no security vulnerabilities are detected in the diff, state: "No security or privacy vulnerabilities identified across the 5 pillars."
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub op3616windows/skills --plugin mattpocock-skills48 skills in this plugin
/codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.