Security Review of a Code Snippet: Ranked Findings With Exploit Path and Fix
Reviews pasted code for injection, broken authorization, secrets, SSRF and similar flaws, and returns only real findings ranked by severity, each with a one-line exploit path and fixed code.
You geta table with Severity (Critical, High, Medium, Low), Line, Issue, Exploit path, Fix. Under it, the fixed code for each Critical or High finding. End with what you could not check…
The prompt
mkdir -p .agents/skills/security-review-of-a-code-snippet-ranked-findings-with-exploit-p && curl -sL "https://prompts-gpt.com/prompts/security-review-of-a-code-snippet-ranked-findings-with-exploit-path-and-fix/raw" -o .agents/skills/security-review-of-a-code-snippet-ranked-findings-with-exploit-p/SKILL.mdAct as an application security engineer reviewing code before it ships. Review the Python 3.11 / Flask 3.0 with Flask-Login session auth, sqlite3 (example value for {language and framework}) code below. If I have not said where its input comes from (public request, logged-in user, admin, internal job) and how users are authenticated, ask me in one short question first.
Check for: injection (SQL, command, template), missing authorization and IDOR, hardcoded secrets, SSRF, unsafe deserialization, path traversal, weak or misused crypto, risky dependencies, and personal data written to logs.
Rules:
1. Report only issues you can point to in this code. No generic advice such as "add rate limiting" unless the code shows the gap.
2. For each finding, give the exploit path in one sentence: who sends what, and what they get.
3. If a finding depends on code I did not paste, mark it "needs context" and say what you need to see.
4. If nothing serious is found, say so plainly instead of padding the list.
Output format: a table with Severity (Critical, High, Medium, Low), Line, Issue, Exploit path, Fix. Under it, the fixed code for each Critical or High finding. End with what you could not check from this snippet alone.
{paste the code}Dashed parts are example values, so the prompt runs as copied. Change them in Fill in the blanks.
Example output
Paste a function, route handler or file into ChatGPT or Claude, or run it in Claude Code, Codex or Copilot chat with the file open. Say where the input comes from to get fewer 'needs context' rows.
Make it repeatable
Keep using this prompt without pasting it in every time.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Pull Request Review with Merge Recommendation
Reviews a diff against your standards and returns a merge, merge-with-changes, or do-not-merge recommendation. Findings are ranked by severity, with evidence, suggested fixes, and open questions.
Review a Beginner's Code with Kind, Prioritized Feedback on the Top 3 Fixes
Paste your code and get a mentor-style review with one specific compliment, the three highest-impact fixes ranked with corrected snippets, and one next step.
Refactor Pasted Code for Readability Without Changing Its Behavior
Returns a cleaner version of your code plus a change log that explains each edit, why behavior is preserved, and which edge cases you should test.
Resolve a Git Merge Conflict and Keep What Both Branches Intended
Paste your conflict markers and get a plain explanation of each side's change, a merged version that keeps both intents, and a test checklist.
Explain Any Regex Token by Token with Matching and Failing Examples
Get a token-by-token table explaining your regex, plus strings that match, nearly match and fail, and a clear catastrophic backtracking risk check with a safer rewrite.
Debug an Error From the Message and the Code Around It
Finds the most likely cause of an error from the message and the relevant code, ranks other possible causes, and gives the smallest fix plus a way to prove it worked.
- Plain-English Question to a Correct SQL Query for Your Schema
- Paste a Bug Report, Get a Test-First Fix in Any AI Chat
- Root Cause Analysis from Stack Trace and Logs
- Find and Fix Data Quality Issues with Ready-to-Run SQL Checks
- Get Socratic Coding Hints in Three Levels Before Seeing the Full Solution
- Quiz Yourself on a Coding Concept with What-Does-This-Print Questions