In the pack: ChatGPT, Claude & Gemini Prompts for Coding and Developers
Security Review of a Code Change
Prompt
Language / framework: {{LANGUAGE}} / {{FRAMEWORK}}
The diff or code: {{CODE}}
Context: who can reach this code (anonymous users, logged-in users, admins, internal services) and what data it touches: {{CONTEXT}}
Check specifically for:
1. Injection: SQL, NoSQL, shell commands, template injection, path traversal, unsafe deserialization.
2. Broken access control: can user A read or change user B's data? Are authorization checks done on the server, for every object?
3. Authentication and session issues, CSRF on state-changing requests.
4. Cross-site scripting: output encoding in HTML, attributes, URLs and JavaScript contexts.
5. Server-side request forgery and unvalidated redirects.
6. Secrets: hard-coded keys, tokens or passwords; secrets or personal data written to logs or error messages.
7. Unsafe defaults: debug mode, permissive CORS, weak crypto, missing rate limits on sensitive endpoints.
For each real finding: severity (Critical / High / Medium / Low), the quoted line, an example attack input or request, the impact, and the fixed code. Separately, list "Worth checking" items you can't confirm from this code, with what to check. If you find nothing serious, say so plainly.
Customize this prompt
Fill in the variables below to personalize this prompt:
Model Settings
Recommended Models
Temperature
Max Tokens
Additional Notes
About this prompt
“Security Review of a Code Change” is a free prompt for ChatGPT in the Coding & Software category, 199 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.
It has 4 placeholders to fill in first:
{{LANGUAGE}}, {{FRAMEWORK}}, {{CODE}}, {{CONTEXT}}.
Use the “Customize this prompt” fields to personalise it before you copy.
Recommended models: ChatGPT, Claude, Gemini.
0 upvotes, sent to an AI tool 0 times, viewed 7 times.
Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.