dtsong/my-claude-setup/web-security-hardening
Claude Code and agent skill by dtsong/my-claude-setup
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install dtsong/my-claude-setup/web-security-hardeningSKILL.md
Web Security Hardening
Security audit checklist for web applications. Run through each item when reviewing or building web apps.
Audit Workflow
- Identify the framework (Node.js/Express, Python/Django/Flask, etc.)
- Review each checklist item below
- For implementation details, see framework-specific references:
- Node.js/Express: See references/nodejs.md
- Python/Django/Flask: See references/python.md
- For production deployments, see references/production-gcp.md for extended checklist covering:
- GCP infrastructure (IAM, networking, secrets)
- CI/CD pipeline security
- Monitoring & incident response
- Report findings with severity and remediation steps
Security Checklist
1. Rate Limiting
Risk: DoS attacks, brute force attempts, API abuse
Check for:
- Per-endpoint rate limits (stricter on auth endpoints)
- Rate limit headers in responses (
X-RateLimit-*) - Appropriate limits for different user tiers
2. Security & Authorization Headers
Risk: XSS, clickjacking, MIME sniffing, info leakage
Required headers:
Strict-Transport-Security(HSTS)X-Content-Type-Options: nosniffX-Frame-Options: DENYorSAMEORIGINContent-Security-PolicyAuthorizationheader validation on protected routes
3. IP Block List (Public APIs)
Risk: Abuse from known bad actors, bot traffic
Check for:
- IP-based blocking mechanism
- Integration with threat intelligence feeds (optional)
- Logging of blocked requests
4. CORS Configuration
Risk: Unauthorized cross-origin requests, data theft
Check for:
- Explicit origin whitelist (not
*in production) - Appropriate methods and headers allowed
- Credentials handling if needed
5. Security Middleware
Risk: Common web vulnerabilities
Check for framework-appropriate middleware:
- Node.js:
helmet - Python:
django-secure,flask-talisman - Sets multiple security headers automatically
6. Input Validation
Risk: Injection attacks, data corruption, XSS
Check for:
- Frontend validation (UX, not security)
- Backend validation (required for security)
- Schema validation libraries (Zod, Joi, Pydantic, etc.)
- Sanitization of user input before storage/display
7. File Upload Limits
Risk: Storage exhaustion, malicious file uploads
Check for:
- Max file size limits
- Allowed file type restrictions (MIME + extension)
- File content validation (magic bytes)
- Secure storage location (outside webroot)
8. ORM for Database Access
Risk: SQL injection
Check for:
- Parameterized queries (never string concatenation)
- ORM usage (Prisma, Sequelize, SQLAlchemy, Django ORM)
- If raw SQL needed: prepared statements only
9. Password Hashing
Risk: Credential theft, rainbow table attacks
Check for:
- Strong algorithm: bcrypt, Argon2, or scrypt
- Appropriate cost factor (bcrypt rounds ≥10)
- No MD5, SHA1, or plain SHA256 for passwords
- No plaintext password storage or logging
Gotchas
- CORS
credentials: true+origin: '*'fails silently in browsers — must specify explicit origin when using credentials helmet()defaults changed between v4 and v5 — CSP is no longer set by default in v5, must configure explicitly- CSP
unsafe-inlinenegates most XSS protection — if you need inline scripts, use nonces or hashes instead express.json()withoutlimitaccepts arbitrarily large payloads — always setlimit: '1mb'or similarhttpOnlycookies prevent XSS token theft but NOT CSRF — still need CSRF tokens or SameSite=Strict- Rate limiting per IP fails behind reverse proxies — must set
trust proxyand useX-Forwarded-For bcryptsilently truncates passwords at 72 bytes — use Argon2 for long passphrases or pre-hash with SHA-256
Audit Report Format
Scope Constraints
- Application-layer audit only — infrastructure (WAF, network policy, TLS termination) and platform hardening are out of scope
- Advisory by default: reports findings; applies fixes only when the user asks
- Checklist targets typical Node/Python web stacks — adapt middleware specifics for other frameworks
- Not a penetration test: static review of code and config, no live exploitation
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/web-security-hardening/SKILL.md
Popularity
- Repository stars
- 4
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dtsong/my-claude-setup/web-security-hardening)