A confirmed vulnerability is only half the work; the other half is a fix the owning developer understands, trusts, and merges without a week of back-and-forth.
Producing that fix is a writing problem as much as a security one, and it is where AI helps most cheaply: given the vulnerability and the code, it drafts a minimal patch, explains the exploit in the developer's own stack, and produces PR-ready wording. Because remediation guidance is lower-risk than a triage decision — a bad patch fails a test rather than silently shipping a hole — this is a Foundation-tier task. The discipline is still real: you verify the fix closes the vuln and introduces nothing new before it goes out under your name.
The fastest-merged remediation guidance leads with the exploit the developer can reproduce, then the smallest diff that stops it. "Here's the curl that dumps the table, here's the two-line parameterization that blocks it" beats a paragraph of CWE theory every time.
Assemble the confirmed finding. You need the vulnerable code, the exploit path you already verified, and the CWE/class. Do not draft remediation for an unconfirmed finding — fix the triage first.
Prompt for a minimal fix plus developer-facing explanation:
You are writing remediation guidance for a confirmed vulnerability in
code I own. Produce:
1. A one-paragraph explanation of the exploit a developer can follow,
including how an attacker triggers it.
2. The MINIMAL code change that fixes it — smallest possible diff, no
refactoring, no added abstractions.
3. Why this fix works (what property it restores).
4. What to watch for so the fix doesn't introduce a new bug.
Keep it concrete and specific to this stack. Do not rewrite the whole
file.
VULNERABILITY: SQL injection (CWE-89) at services/report.py:42
EXPLOIT PATH: `month` query param flows unsanitized into the query string
CODE:
<paste the function>
Expected output: a reproducible exploit description, a tight diff (e.g., switching to a parameterized query), a plain statement of why parameterization breaks the injection, and a caveat (e.g., "confirm no other caller relies on the old string-concatenation behavior").
Demand the diff be minimal. If the model returns a large rewrite, push back: "give me the smallest change that fixes only this, changing nothing else." Small diffs get reviewed and merged; large ones get parked.
Draft the PR/ticket wording. Ask for a title, a body with the exploit-then-fix structure, and a testing note pointing at the regression test (see the regression-test playbook). This is the artifact the developer receives.
Attach the proof. Include the failing-then-passing test or the before/after scanner result so the reviewer doesn't have to take the fix on faith.
Remediation guidance quotes the client's vulnerable code and describes a real exploit against their system — both sensitive. Before prompting, redact real endpoints, credentials, and customer identifiers, and reduce the code to the security-relevant function. If the client's policy bars public tools, run a local model for the drafting and keep the scanner-based proof (which runs offline) as the evidence. Deliver the write-up in the client's own tracker, never paste working exploit payloads against production into an external tool, and confirm per-client tool approval before the first prompt.