Verified against ChatGPT · 2026-08-13
Get a security review of an infrastructure change before it merges, not a generic OWASP checklist
Reviews a specific infrastructure or config change (IaC diff, new service, permission grant) for concrete security issues tied to what actually changed, ranked by exploitability, instead of a boilerplate security checklist that doesn't engage with the diff.
The prompt
Ready to copy — highlighted parts are example details you can swap.
Review the following infrastructure change for security issues before it merges. Focus only on what this specific change introduces or alters — do not produce a general security checklist unrelated to the diff. THE CHANGE Terraform diff adding an S3 bucket policy that grants `s3:GetObject` to `Principal: "*"` for a bucket storing generated PDF invoices SYSTEM CONTEXT Invoice generation pipeline; bucket holds customer-facing PDF invoices with names, addresses, and line-item pricing, no payment card data WHO/WHAT CAN REACH THIS Bucket is currently only linked from authenticated customer portal pages, but the new policy would make objects fetchable by anyone with the URL, authenticated or not COMPLIANCE OR POLICY CONSTRAINTS THAT APPLY This data falls under our internal PII handling policy; not sure if GDPR data-residency rules apply since some customers are in the EU For every issue you find, state: what specifically in the change causes it, how it could actually be exploited given the exposure surface described (not a hypothetical worst case unrelated to this system), and how confident you are that it's a real issue versus something that needs a human to verify (e.g., you can't see the full IAM policy, only this diff). Rank issues by exploitability given the actual exposure surface, not by textbook severity alone — a critical-sounding misconfiguration on an internal-only service reachable by nobody outside a VPN is lower priority than a moderate one on something internet-facing. If the change looks fine, say so plainly rather than manufacturing a minor finding to seem thorough. Do not invent a specific CVE, compliance clause, or statistic — if you reference a class of vulnerability or a compliance requirement, describe it generically and tell me to verify the specific clause number or CVE ID myself rather than stating one as fact. WHAT NOT TO DO Do not produce a generic 'security best practices' list disconnected from this specific diff. Do not flag something as an issue without stating the concrete exploit path — 'this could be a security risk' without a mechanism is not a usable finding. OUTPUT FORMAT 1. Verdict: change looks safe to merge / has issues that should block merge / has issues worth fixing but not blocking, with one-line reasoning. 2. Findings table: issue, exact location in the diff, concrete exploit path given the exposure surface, confidence (high/needs-human-verification), severity given actual exposure. 3. Anything you could not fully assess because you can't see surrounding context (e.g., the full network policy, the rest of the IAM role) — name exactly what additional context would let you finish the assessment.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
Anchoring the review to the actual diff and exposure surface, rather than inviting a general security checklist, is what stops GPT-5.1 from defaulting to its most common failure mode on open-ended security prompts: producing a broad, textbook-derived list of best practices (rotate keys, enable MFA, use least privilege) that sounds thorough but doesn't engage with what the specific change actually does, which reads well in a PR comment but gives the reviewer nothing they couldn't have found in a generic OWASP page. Requiring a concrete exploit path per finding, tied to the stated exposure surface, forces the model to reason about actual reachability rather than severity in the abstract — a public S3 read policy is a very different risk on an internal-tools bucket behind a VPN than on a customer-facing invoice bucket, and ranking by textbook severity alone (which is what an unscoped prompt tends to produce) would flag both identically, burying the finding that actually matters under equally-weighted noise. The explicit ban on inventing a specific CVE or compliance clause number addresses a known and serious failure mode of LLM-generated security content: models will confidently cite a plausible-sounding CVE ID or GDPR article that does not correspond to the real one, which is actively dangerous in a security review because a wrong citation can make a reviewer trust a finding (or dismiss one) based on authority that doesn't actually exist — instructing the model to describe the vulnerability class generically and defer the specific citation to human verification keeps the review useful without smuggling in fabricated authority. The confidence field matters because a static diff reviewer genuinely cannot see the full IAM role, the rest of the network policy, or runtime behavior, and a review that doesn't distinguish 'I can see this is wrong' from 'I can't rule this out without more context' invites false confidence in exactly the kind of review meant to prevent it.
What you get back
Verdict: has issues that should block merge. Finding: the new bucket policy statement grants `s3:GetObject` to `Principal: "*"`, meaning any unauthenticated party with an object URL or key pattern can fetch invoice PDFs containing customer names and addresses; exploit path is trivial URL enumeration or leaked link sharing, no auth bypass needed since none exists in the new policy. Confidence: high, based directly on the diff. Needs human verification: whether object keys are guessable/sequential, which I can't assess from this diff alone.
Verified against
ChatGPT GPT-5.1 · 2026-08-13
Changelog
- 2026-08-13 — Initial publish, verified against ChatGPT GPT-5.1.
Need this built into your business?
If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
