How to Sell a Legacy Code Audit with ChatGPT

Quick answer: Get the client's written permission and remove passwords, keys and connection strings first. Paste one file or function at a time into the prompt below, which asks for a plain-language summary, security issues with severity, performance and maintainability problems, and an action plan with estimated hours. Then reproduce every finding on a copy (never the live site), delete what you cannot confirm, add what it missed, set the hours yourself, and sell a fixed-price audit of one area before quoting the fixes.

Before you paste any code

  1. Get the client's written OK to use an AI tool on their code.
  2. Remove passwords, API keys, tokens and connection strings. The masker below finds the obvious ones.
  3. Paste one file or function at a time, not the whole system.
  4. Follow the client's contract or NDA if they have one.

Free secret masker

Paste code to find likely passwords, keys and connection strings and get a copy with their values replaced by [REDACTED]. It catches common patterns only, so read the code yourself too. Runs in your browser; nothing is sent or stored.

    The free ChatGPT prompt

    You are a senior software auditor.
    Review this [LANGUAGE, e.g. PHP / ColdFusion / VB.NET] code:
    
    """
    [PASTE CODE]
    """
    
    Produce a client-ready audit report with:
    1. Summary (3 lines, non-technical, for the business owner)
    2. Security issues (SQL injection, XSS, auth, secrets) with severity: Critical / High / Medium / Low
    3. Performance problems
    4. Maintainability problems
    5. A fixed-price action plan: each fix with estimated hours
    Use a table for issues. Do not invent issues; if unsure, mark as "needs verification".

    The estimated hours it gives are a first guess. Set the real estimate from your own experience.

    Example: a 4-line order page

    Invented example.

    $id = $_GET['id'];
    $sql = "SELECT * FROM orders WHERE id = $id";
    $row = mysqli_fetch_assoc(mysqli_query($db, $sql));
    echo "<h1>Order " . $_GET['id'] . "</h1>";
    IssueSeverityFix
    SQL injection in the order queryCriticalPrepared statement
    Order ID printed without escaping (XSS)Highhtmlspecialchars()
    No check that the order belongs to the logged-in userNeeds verificationCheck the login and order code
    SELECT * for one rowLowSelect only the columns used

    Check every finding yourself

    Sell it simply and honestly

    Frequently asked questions

    Can ChatGPT audit code by itself?

    No. It can draft a report and point at likely problems, but it can be wrong and it only sees what you paste. Reproduce every finding yourself before it goes into a report a client pays for.

    Is it safe to paste client code into ChatGPT?

    Only with the client's written permission and within their contract or NDA. Remove passwords, API keys and connection strings first; the masker on this page helps you find the obvious ones, but check by hand as well.

    What should a legacy code audit include?

    A short summary the business owner can read, security issues with a severity, performance and maintainability problems, and an action plan for the fixes. Mark anything you could not confirm as needing verification.

    How do I price a code audit?

    Price a fixed scope, such as one area (login, checkout or payments), from the time you expect it to take you. The hours in the AI draft are only a first guess. Quote the fixes separately after the audit.

    Is what I paste into the masker saved or sent?

    No. It runs in your browser and nothing is sent or stored.

    Next steps