A static audit of 6,000 agent-generated patches on SWE-bench Verified
Coding agents are graded on whether their patches pass tests, but tests can't see a security weakness slipped in alongside a fix, an error silenced instead of fixed, or a test rewritten to agree with the code. I audited every patch 12 frontier models submitted to SWE-bench Verified under the same agent scaffold, against the human-written fixes for the same issues, using before/after static analysis (Bandit, Semgrep) and behavioral checks.
Result: agent patches are not less secure than human fixes. What
the tests miss is behavior: one model routinely adds silent except: pass
handlers, and three models edit tests they were explicitly told not to touch, sometimes
rewriting assertions to match their own change. SWE-bench can't see either, by design.