Example result: Security review checklist for your code
AI-generated example · Security Review
Updated

Security review checklist for your code

This prompt reviews code you paste for security problems, given its context. It is a first pass and not a replacement for a proper audit.

text-security-review-checklist — chatgpt — 50 words

Review this code for security problems:

[PASTE CODE]

Context: [WHAT IT DOES AND WHO USES IT]

Check for injection, broken authentication, insecure secrets, unsafe input handling, missing authorisation checks, sensitive data exposure and unsafe dependencies. For each issue explain the risk in plain English, rate severity and show a fix.

Run it against code that handles logins, uploads and payments first; that is where the risk is.

Get a better result

What you will get

A review of your code for injection, weak login handling, exposed secrets, unsafe input, missing permission checks, data exposure and risky dependencies, each with a plain-English risk, a severity rating and a fix.

Why it works

A review is only useful with clear risks, so the prompt names common problem areas and asks for plain English, severity and a fix for each. The context line sets what matters most. Starting with login, upload and payment code, as the tip says, finds the biggest risks.

Common mistake

You paste real passwords or keys.

Fix: Replace secrets with placeholders before pasting. If a real key was shared, rotate it.

Also watch for
  • You treat a clean result as proof of safety. It is a first pass. Have a qualified security reviewer check anything that handles money or personal data.
  • The context line is blank. Say who uses the code and what it protects, so the severity ratings fit the real risk.
Try a variation: make a dependency check

Paste your dependency list and ask which packages are old, abandoned or have known issues, then check each in the official advisories.

Still not right? Reply with this

I fixed the high severity items. Here is the new version: [PASTE]. Confirm each fix and check that none of them added a new problem.

Guides that use this prompt

More chat & writing prompts

See all 465 →