Who owns the code nobody wrote?
Thu, 26th Nov 2026 (Today)
A developer asks an AI assistant for a payment retry handler, gets four hundred lines back in under a minute, and ships them before lunch. It may have cleared an approval or two on the way. If that code later causes a breach, who owns it?
Put that question to a business and the answers vary, but one comes up more than any other: the security team.
Accountability
Aikido Security's State of AI in Security & Development 2026 report surveyed 450 developers, security leaders and application security engineers across Europe and the US. Respondents report that AI tools now write 24% of their production code. Asked who would be held accountable if a vulnerability in AI-generated code caused a security incident, 53% named the security team, for missing it.
That puts accountability on a team that sits far from the code. Security did not prompt it or merge it, and may never have seen it before it reached production. It can also give developers a reason to treat the security review as the safety net, which is the opposite of ownership.
Why security cannot own it
The obvious fix is to give security the control to match: more sign-offs, more scans, a review before anything ships. Twenty years on the vendor side of this industry has shown me why that fix struggles. There are plenty of exceptions, but many security teams came up through networks, infrastructure and operations, not software engineering, and the checks they add fit the security team's workflow rather than the developer's. A scan runs after the code is merged, the results sit in a separate portal, and a false positive blocks a release. The business asks what the check is worth, security defends its value in the middle of the disruption, and the control gets an exception, then a workaround, then it is quietly switched off.
That is a case for better testing, built around the person who has to act on the result.
Any check that depends solely on security reading the code was already a bottleneck, and AI pushes more code through it. It becomes a queue, and queues add delays and get bypassed.
Put ownership where the code is made
The person who merges code owns it, whether they typed it or prompted it. Write that into engineering policy in plain words. Ownership only works if developers can find and fix problems in generated code as fast as they produce it, which means giving them the time to understand what they merge and the means to test it inside the tools they already use.
In practice that is testing in the editor and on every pull request, with results that point at the line and suggest the fix while the developer still has the context. Accuracy matters as much as coverage, because a check that raises false alarms trains people to ignore it. A finding that lands in the pull request with a suggested fix tends to get fixed. The same finding arriving weeks later as a ticket in another team's queue tends to get argued over, adding to the delay.
Security has to learn the developer's world
That only works if security understands the environment it is trying to protect, and closing that gap starts with security. Put security engineers inside development teams for a sprint at a time, shipping alongside them rather than reviewing from outside.
Where there are DevSecOps engineers building security into the pipeline, give them time and a seat in planning. Back a security champion in each development team too, a developer who knows the codebase and has a direct line to security. Choose and tune testing tools with developers, and treat their complaints about noise as a defect to fix rather than resistance to manage.
Then measure security on what developers experience: time to fix, false positive rate, and whether teams would keep the tooling switched on if the choice were theirs. Agree the hard trade-offs in advance too, such as who approves AI-generated code touching authentication, payments or personal data.
So who owns it?
Done this way, developers can move at the speed AI promises, and security sees problems while they are still cheap to fix.
The code nobody wrote belongs to the person who merges it, provided they have the means to check it and a security team that understands how they work. That is worth settling before the next incident, while developers and security can still build it together, on trust rather than blame.