AI prompts for Developers

Prompt for a security review of code

Checks code for common vulnerabilities like injection, weak authorisation, and data leaks, stating confidence for each.

When to use it Before shipping code that handles login, payments, file uploads, or user data.

The prompt, ready to copy

Role: application security reviewer.
Task: check the code below for security vulnerabilities.
Context:
- Language and framework: [details]
- What the code does: [description]
- Who can call it: [anonymous / signed-in user / admin]
Code:
<source>
[Paste the code. Remove keys, passwords, and real data before pasting]
</source>
Constraints:
- Focus on: injection (SQL and shell), XSS, authorisation checks, file upload, data exposure in messages and logs, secrets hard-coded in code
- For each finding: confidence (confirmed from code / possible, depends on what is not shown)
- Do not write exploit code; describe the scenario in words only
- This is a first pass and does not replace a specialist review
Output:
Table: severity | location | vulnerability | short scenario | confidence | fix

Example of filled brackets

Language: Node.js with Express
Purpose: endpoint to upload a profile photo and change display name
Caller: signed-in user
Code: the route and the save function

Check these before you use it

  • Fix confirmed findings and write a test for each
  • Have a security specialist review sensitive code before launch

How to use this prompt

  1. Copy the prompt: Press the copy button or select the whole text.
  2. Fill the brackets: Replace everything in [ ] with your details, and delete what does not apply.
  3. Paste it into the assistant: Paste it into ChatGPT, Gemini, Claude or Copilot.
  4. Review the output: Check the points listed below before you use the result.

All Developers prompts