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 the council needs to surface organizational knowledge buried across multiple internal sources (wikis, design docs, ADRs, past tickets, postmortems, chat archives, code repos). Plans where to look, what to cross-reference, and how to synthesize findings into evidence the council can act on. Do not use for external market research (use competitive-analysis), library evaluation (use library-evaluation), or technology trend assessment (use technology-radar).
testing
Use to convert a Word .docx file to PDF and/or verify its page count. Triggers on: converting docx to pdf, rendering a document, checking how many pages a docx produces, or asserting a page-count constraint (e.g. a resume must stay 2 pages). Wraps LibreOffice headless conversion.
development
Interactive wizard to craft effective prompts using Claude Code best practices
tools
Use when batch labeling, prioritizing, and assigning GitHub issues during triage sessions.