Cherry-pick TDD, app security checklist, and AgentShield scan guidance into our Cursor pack without installing the full ECC harness.
1.8 KiB
1.8 KiB
name, description, metadata
| name | description | metadata | ||||
|---|---|---|---|---|---|---|
| app-security-checklist | Application security checklist when adding auth, APIs, user input, uploads, payments, or handling secrets. Use for security review of app code (not the Cursor /review-security subagent launcher). |
|
App security checklist (lean)
Use when implementing or reviewing auth, APIs, uploads, secrets, or sensitive data.
For Cursor’s built-in branch security review subagent, use /review-security instead.
Secrets
- No hardcoded keys/tokens/passwords in source
- App secrets → Infisical (
/apps/<repo>); infra → Ansible Vault - Local
.envgitignored; commit*.exampleonly - Never log secrets, full tokens, card numbers, or passwords
Input & data
- Validate/parse untrusted input (schema libs OK: zod, pydantic, etc.)
- Parameterized queries / ORM only — no string-concat SQL
- Uploads: size + type/extension allowlist; store outside web root when possible
- Sanitize any user HTML; prefer framework auto-escaping
AuthZ
- Check authorization on every sensitive action (not only at login)
- Prefer httpOnly + Secure + SameSite cookies over localStorage tokens
- Generic client errors; detail only in server logs
HTTP / abuse
- Rate-limit auth and expensive endpoints
- CSRF protection on cookie-session state changes
- Sensible security headers (CSP without casual
unsafe-inline/unsafe-eval) - CORS allowlist — not
*with credentials
Dependencies
- Lockfiles committed; CI uses reproducible install (
npm ci/ equivalent) - Do not silence audit/lint gates with
|| true
Pre-ship gate (short)
Secrets out of git · inputs validated · queries parameterized · authZ on mutations · no secret logging · rate limits on hot paths · CI gates honest.