API Endpoint Security Review
Reviews API route code for auth gaps, injection, data exposure and rate-limit issues, with fixes.
ClaudeCode & Tech
106 words · free to use
Review this API endpoint for security problems. Framework: [e.g. Express, FastAPI, Cloudflare Worker] Who should be able to call it: [PUBLIC / LOGGED-IN USERS / ADMINS ONLY] What it does: [DESCRIPTION] Code: [PASTE] Check for: missing or weak authentication and authorization (including users reaching other users' data), input validation and injection (SQL, NoSQL, command, prompt injection if it calls an LLM), secrets in code, overly detailed error messages, CORS, rate limiting and cost abuse, logging of sensitive data. For each finding: severity (Critical/High/Medium/Low), the exact line, how it could be abused in one sentence, and the fixed code. Finish with a short checklist for future endpoints.
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [PUBLIC / LOGGED-IN USERS / ADMINS ONLY], [DESCRIPTION], [PASTE].
- Paste it into Claude and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.