skills/web-security-hardening/SKILL.md
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
npx skillsauth add dtsong/my-claude-setup web-security-hardeningInstall 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.
Security audit checklist for web applications. Run through each item when reviewing or building web apps.
Risk: DoS attacks, brute force attempts, API abuse
Check for:
X-RateLimit-*)Risk: XSS, clickjacking, MIME sniffing, info leakage
Required headers:
Strict-Transport-Security (HSTS)X-Content-Type-Options: nosniffX-Frame-Options: DENY or SAMEORIGINContent-Security-PolicyAuthorization header validation on protected routesRisk: Abuse from known bad actors, bot traffic
Check for:
Risk: Unauthorized cross-origin requests, data theft
Check for:
* in production)Risk: Common web vulnerabilities
Check for framework-appropriate middleware:
helmetdjango-secure, flask-talismanRisk: Injection attacks, data corruption, XSS
Check for:
Risk: Storage exhaustion, malicious file uploads
Check for:
Risk: SQL injection
Check for:
Risk: Credential theft, rainbow table attacks
Check for:
credentials: true + origin: '*' fails silently in browsers — must specify explicit origin when using credentialshelmet() defaults changed between v4 and v5 — CSP is no longer set by default in v5, must configure explicitlyunsafe-inline negates most XSS protection — if you need inline scripts, use nonces or hashes insteadexpress.json() without limit accepts arbitrarily large payloads — always set limit: '1mb' or similarhttpOnly cookies prevent XSS token theft but NOT CSRF — still need CSRF tokens or SameSite=Stricttrust proxy and use X-Forwarded-Forbcrypt silently truncates passwords at 72 bytes — use Argon2 for long passphrases or pre-hash with SHA-256// WRONG: credentials with wildcard origin (silently fails)
app.use(cors({ origin: '*', credentials: true }));
// RIGHT: explicit origin
app.use(cors({ origin: 'https://app.example.com', credentials: true }));
// WRONG: helmet v5 without CSP (no longer set by default)
app.use(helmet());
// RIGHT: explicit CSP
app.use(helmet({ contentSecurityPolicy: { directives: { defaultSrc: ["'self'"] } } }));
## Security Audit: [App Name]
### Summary
- **Items Passing**: X/9
- **Critical Issues**: X
- **Recommendations**: X
### Findings
#### [Item Name] - [PASS/FAIL/PARTIAL]
**Severity**: Critical/High/Medium/Low
**Finding**: [Description]
**Location**: [File/endpoint]
**Remediation**: [Steps to fix]
development
Use when planning implementation steps, deciding commit format, or structuring development approach. Provides brainstorm-plan-implement flow with conventional commits. Triggers on 'how should I approach this', 'commit format'.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
Interactive wizard to craft effective prompts using Claude Code best practices