security-review

Reviews code against security checklists covering secrets, input validation, authentication, and injection prevention.

5|Updated Jul 8, 2019
One-click install
npx skills add https://github.com/rinchsan/dotfiles --skill security-review-rinchsan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-review
Source: https://github.com/rinchsan/dotfiles/tree/main/.claude/skills/security-review
Command: npx skills add https://github.com/rinchsan/dotfiles --skill security-review-rinchsan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents common application vulnerabilities—hardcoded secrets, SQL injection, XSS, CSRF, missing authorization checks, and sensitive data leaks—by giving you a structured security checklist and concrete code patterns to apply while writing or reviewing code. ## Core Features & Use Cases - Nine-Area Security Checklist: Covers secrets management, input validation with Zod schemas, SQL injection prevention, authentication and authorization, XSS sanitization, CSRF protection, rate limiting, sensitive data exposure, and dependency auditing. - Do/Don't Code Patterns: Each section pairs vulnerable anti-patterns with corrected implementations in TypeScript, Next.js, and Supabase so fixes are immediately applicable. - Cloud Infrastructure Companion Guide: A bundled reference extends coverage to IAM least privilege, cloud secrets rotation, VPC security groups, CI/CD pipeline hardening with OIDC, Cloudflare WAF, and backup strategies. - Use Case: When adding a new API endpoint that accepts file uploads, activate this skill to validate file size, type, and extension, enforce parameterized database queries, verify authorization before mutations, and confirm rate limiting is in place. ## Quick Start Ask the AI to perform a security review of the authentication and file upload code in your current project using this checklist.

Frequently Asked Questions about security-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent SQL injection in TypeScript applications?

Prevent SQL injection by always using parameterized queries or an ORM query builder instead of string concatenation. For example, pass user input as bound parameters like db.query('SELECT * FROM users WHERE email = $1', [email]) or use Supabase filters such as .eq('email', userEmail).

How to validate user input and file uploads in Next.js?

Validate user input with Zod schemas that enforce types, formats, and length limits before processing. For file uploads, check file size against a maximum, whitelist allowed MIME types, and verify file extensions before accepting the upload.

Should I store JWT tokens in localStorage or cookies?

Store JWT tokens in httpOnly cookies, not localStorage, because localStorage is accessible to JavaScript and vulnerable to XSS attacks. Set cookies with HttpOnly, Secure, and SameSite=Strict flags to prevent token theft and CSRF.

What security checks should a CI/CD pipeline include?

A secure CI/CD pipeline should use OIDC instead of long-lived credentials, run secret scanning with tools like TruffleHog, audit dependencies with npm audit, enforce branch protection and code review, and scan container images before deployment.

Why is my Supabase data accessible to unauthorized users?

Unauthorized access usually means Row Level Security is not enabled or queries are not scoped to the authenticated user's ID. Always filter queries by the requester's ID and verify authorization roles before sensitive operations like deletions.

What are the limitations of a checklist-based security review?

A checklist-based review catches common vulnerability patterns but cannot replace penetration testing, runtime monitoring, or automated scanning tools. It works best as a development-time guardrail combined with npm audit, WAF rules, and logging for defense in depth.