Home · Business · IT, Data & Security · Software development

NO

As of 13 August 2026, AI cannot fix security vulnerabilities in your code.

This still needs a person who signs their name to it.

Can you do it?

15 minutesto a draft.

n/ait cannot be self-verified.

Cost, all in£0

Skill neededdeveloper

Who has to check ita professional

What the alternative costsNo priced human alternative is provided in the supplied data.

If this goes wrong: the patch appears to work while leaving the attack path open, or it breaks production and creates an outage.

What to actually do

  1. Hand it to a person

    The route this page recommends

    Someone with a licence or accountable authority has to sign this before it counts.

  2. Use a tool built for this

    Second choice
  3. Do it yourself

    The distant third

    A chat interface gets you a draft, but you cannot verify it yourself. That is the catch.

    How to actually do it

    1. Open the vulnerability report and record the affected files, exploit description, severity, affected versions and required security behaviour.
    2. Create a sanitised working copy of the relevant repository and remove passwords, tokens, personal data, customer data and proprietary secrets before sharing anything with an AI tool.
    3. Gather the relevant source files, dependency manifest, runtime and framework versions, deployment details, existing tests and the commands used to run them.
    4. Paste the report and context into a coding model using the supplied prompt, then answer its questions from your repository and security documentation rather than asking it to guess.
    5. Apply the proposed diff only in a separate branch, inspect every changed line, and compare the new tests with the original exploit and the intended trust boundaries.
    6. Run the project's formatter, unit and integration tests, dependency checks and security scanner, then test the exploit against the patched branch without claiming the vulnerability is closed from a clean scan alone.
    7. Send the diff, test output, scan results, threat assumptions and residual-risk list to a qualified security professional for review before deployment, and record the approval and rollback plan.

    Prompt

    Act as a security-focused software engineer reviewing a proposed fix, not as the final approver. I will provide a vulnerability report, the relevant source code, dependency and runtime details, existing tests, and the intended security behaviour.
    
    First, restate the vulnerability, affected attack path, trust boundary, assumptions and likely impact. Identify any missing information and ask focused questions before proposing a fix if that information could change the remediation.
    
    Then propose the smallest safe change. Show a unified diff, explain each changed line, identify any required configuration or dependency changes, and explain why the change blocks the attack without weakening other controls. Do not invent APIs, versions, settings, test results or security guarantees. If you are uncertain, say exactly what is uncertain.
    
    Add or update focused tests for the exploit case, relevant edge cases and the expected secure behaviour. Give exact commands for formatting, unit tests, integration tests, dependency checks and security scanning, but do not claim that any command has passed unless I provide its output.
    
    Finish with: residual risks, possible regressions, deployment precautions, rollback steps, data or secrets that must not be pasted into a chatbot, and a checklist for review by a qualified security professional. Treat the result as a draft patch until those checks are complete.
    
    Vulnerability report:
    [PASTE REPORT]
    
    Relevant code and file paths:
    [PASTE CODE]
    
    Application, framework, language, versions and deployment environment:
    [PASTE DETAILS]
    
    Existing tests and security controls:
    [PASTE DETAILS]

    Open it prefilled in ChatGPT or Claude, or copy it into Gemini, which takes no prefill link.

What it gets wrong

  • AI cannot see the full attack surface, including infrastructure, access controls, logs, secrets handling and undocumented trust relationships.
  • It can produce a plausible patch that fixes the reported input while leaving a related exploit path open.
  • It cannot establish from generated tests or a clean scanner result that the vulnerability is absent in production.
  • It does not take responsibility for a breach, data loss, compliance consequence or outage caused by the change.
  • It cannot safely handle secrets or private production data unless your organisation has approved the tool and its data controls.

What makes this a NO: verification cost, legal accountability and stakes of error.

How we scored this

Five axes, each scored nought to two by hand: ten means AI carries the task cleanly, and the thresholds that turn a total into YES, PARTLY or NO are published in the methodology. Each axis name links to its definition.

AxisScore (0–2)
Output2
Inputs1
Verification0
Liability0
Effort delta2
Total5 / 10

FAQ

Can ChatGPT fix a security vulnerability in my code?
It can propose a patch, explain the attack path and generate tests, but that is not the same as proving the vulnerability is fixed. Apply the change in a separate branch and have a qualified security professional review it before deployment.
Is it safe to paste vulnerable code into an AI tool?
Not if the code contains secrets, personal data, customer data or confidential business logic that your organisation has not approved for that tool. Sanitise the example and check your employer's security and data-handling policy first.
Can AI find and fix all security vulnerabilities?
No. AI can help investigate reported issues and make likely code changes, but it cannot reliably discover every attack path or understand undocumented infrastructure and trust boundaries. Scans and tests still need expert interpretation.
Should I deploy an AI-generated security fix?
Not without normal engineering checks and security review. This is not professional advice; a serious vulnerability needs review by a qualified security professional, with tests, scan results, deployment controls and a rollback plan.

Nearby answers

Assessed by gpt-5.6-luna (gpt-5.6-luna) on 2026-08-13, second-checked by an independent model. Wrong somewhere? Email [email protected] and it gets re-checked.

The newsletter

AI news, new answers and product picks, straight to your inbox.