The Commit Signed by No One: Assigning Liability When a Model Writes the Vulnerability
Photo: developer reviewing AI-generated code diff on multiple monitors in dark office, via img.freepik.com
The pull request had two approvals, a passing pipeline, and your name on the merge button. Buried in the diff were forty lines of session-handling logic that no human at the company wrote. Nine months later, a penetration tester finds the flaw. The incident report will name the service, the ticket, and the engineer who merged. It will not name the model, the vendor that trained it, or the prompt that produced it.
That gap — between who authored the code and who absorbs the consequences — is the defining accountability problem of AI-assisted development in 2026. Coding assistants are no longer a novelty bolted onto an editor. They draft tests, refactor authentication paths, and scaffold infrastructure. The governance around them, meanwhile, has mostly been reduced to a license agreement and a checkbox in the IDE.
The Signature Is the Only Provenance That Survives
Consider what actually persists after a merge. The commit history records an author, a timestamp, a diff, and a message. It does not record whether a model proposed the function, whether a developer accepted a completion verbatim, or whether the code was regenerated three times until it passed a linter. Once the branch is squash-merged, even the intermediate attempts — the place where a reviewer might have spotted a dangerous pattern — are gone.
This matters because liability in the United States is allocated by evidence, not by intent. When a breach triggers notification obligations under state law, or when a regulator asks how a control failed, the company will reconstruct the timeline from whatever artifacts exist. If the artifacts imply a human wrote everything, the human is where the story ends.
Engineers intuitively understand this and rarely say it out loud. A senior developer at a mid-sized fintech put the tradeoff plainly: the assistant saves an hour a day, and in exchange you accept that any defect in the accepted output is yours alone. That is a bad trade when it is never written down.
The Review That Cannot See the Prompt
Security review is built on the assumption that a diff is a complete description of the change. That assumption was always generous. With generated code it becomes false.
A model may produce a correct-looking token validation routine that omits a check present everywhere else in the codebase, simply because the prompt did not mention it. A reviewer reading the diff sees consistent style, plausible structure, and no obvious defect. The omission is invisible because the context that would have flagged it — the conventions of the surrounding module, the threat model, the reason the previous implementation was written that way — never entered the prompt.
Scanners do not close this gap. Static analysis rules detect patterns, not provenance. A generated function that quietly broadens a permission check passes every rule that a human-written function would fail, because the rule was written for the human case.
Where the Risk Actually Settles
The uncomfortable arithmetic is that the benefit of generated code accrues to delivery velocity, while the residual risk accrues to individuals. Organizations that have examined this honestly tend to find the same three failure points.
First, incident response. When a postmortem assigns a root cause, "the model suggested it" is not an acceptable finding in most corporate cultures, so it gets translated into "the engineer did not validate the output." Second, performance review. An engineer who flags that a large portion of a module was machine-generated is describing their own reduced authorship, which is not a neutral thing to say in a system that measures output.
Third, legal exposure. Developers who later become whistleblowers — who report that a company shipped generated code into a regulated system without review — frequently discover that the internal record contradicts them, because the record shows human authorship throughout.
A Disclosure Trail That Survives Contact With Legal
If a company wants a defensible position, the answer is not to ban the tools. It is to make provenance durable and boring. That means capturing, at merge time, a small set of facts that will still be readable in an incident review eighteen months later.
- A machine-readable flag in the commit trailer or PR metadata indicating model involvement, including tool and version.
- The prompt or task description, retained in the PR body rather than a chat log.
- A record of which reviewers were told the code was generated, and what they verified independently.
- The model's suggestion history where the tool permits export, since rejected completions often reveal the failure mode.
- An explicit statement of who validated behavior, not merely style.
The purpose is not surveillance of developers. It is the opposite: a record that distributes responsibility accurately rather than concentrating it on whoever happened to click merge.
What to Build Before the Next Merge
For engineers, the practical move is to document disagreement now. If you have argued that generated code entering a payments path, an identity provider, or a safety-critical service deserves a separate review gate, put that argument in writing and keep your copy. A contemporaneous email is worth more than a year of recollection.
For teams, the minimum viable policy is a provenance field that cannot be silently stripped and a review step that asks what the model was asked to do. For regulators, the emerging lesson is that software supply chain rules which stop at SBOMs miss the largest unlogged contributor in the pipeline.
The model wrote it. The organization shipped it. Until the record says so, the person who pressed the button will carry the whole thing alone.