Remediation

Remediation

Turn xgrep findings into fixed code — apply the safe fixes automatically, hand the judgement calls to a coding agent, and prove every change by re-scanning it.

Remediation

A scan gives you a list. What you actually want is the list gone.

xgrep fix closes that gap: it takes the findings a scan produced and turns them into committed code changes — applying the fixes that have exactly one right answer, delegating the ones that need judgement to your coding agent, and proving every change by re-scanning it before it is written.

xgrep fix — a scan flags a disabled-TLS-verification finding, then fix apply rewrites verify=False to verify=True through the verification harness and prints the applied diff

xgrep scan .        # find
xgrep fix           # review and fix, interactively

scan never modifies your source. fix is the only command that writes, and it only ever writes a change it has verified.

What you get

The obvious fixes, applied for you. verify=Falseverify=True, InsecureSkipVerify: truefalse, a cookie missing HttpOnly, an http:// URL that should be https://. Where a rule knows the one correct edit, xgrep makes it — no prompt, no model, no waiting.

The hard ones, handed to your agent with the context it needs. Where the fix depends on what the code is trying to do, xgrep does not guess. It hands your coding agent the unsafe region, the strategy, the sanitizers it will accept, and the criteria the result has to meet — then checks the answer.

Nothing written that isn't proven. Every edit is re-parsed and re-scanned before it lands. A fix that would break the file, or that doesn't actually clear the finding, is rejected rather than written. You never have to wonder whether a "fix" fixed anything.

Vulnerable dependencies upgraded too, not just vulnerable code — the same command, the same verification.

A pull request at the end, opened from the fixes you accepted, if you want one.

The loop

StepCommandWhat happens
Findxgrep scan .discovers findings and caches them
Confirmxgrep fix --triage-onlydecide what's real before you change anything
Fixxgrep fixapply, or delegate, the fixes
Proveautomaticevery change re-scanned before it is written

You can start anywhere in it. Fixing without triage is fine — triage exists for when you'd rather not hand-review a hundred findings first.

Where to go next

  • Fixing code — the interactive review session, delegating to a coding agent, and opening a pull request from what you fixed.
  • Fixing dependencies — upgrading the packages a CVE names, including the transitive ones.
  • Triage — confirming what's real first, by hand or with an agent, so a fix run only touches findings someone stands behind.

On this page