| name | security |
| description | Analyze and implement security-sensitive code involving authentication, authorization, tokens, sessions, uploads, payment, encryption, secrets, webhooks, sensitive data, dependency risk, injection, XSS, CSRF, SSRF, SQL injection, and audit logging. |
Security
Workflow
- Identify assets, actors, trust boundaries, and attacker-controlled inputs.
- Validate and normalize input at boundaries.
- Enforce authentication and authorization close to protected actions.
- Protect secrets and sensitive data in storage, transit, logs, and errors.
- Check injection, XSS, CSRF, SSRF, path traversal, upload, and deserialization risks as relevant.
- Add tests for bypass, malformed input, and authorization boundaries when feasible.
Hard Rules
- Never output real secrets.
- Never recommend disabling security checks as a durable fix.
- Never concatenate untrusted input into SQL, shell commands, templates, file paths, or URLs without safe APIs and validation.
- Do not log tokens, passwords, private keys, full payment data, or sensitive personal data.
Output
State threat, mitigation, residual risk, and verification. Keep security claims precise.