AI coding assistants are now used by most professional developers, and a significant share of new code in many organisations starts as an AI suggestion. Research over the past few years has shown that those suggestions can contain vulnerabilities, and that developers using assistants may be more confident in insecure code than those without.
So when an AI-suggested vulnerability reaches production and is exploited, who is responsible?
The external answer: the organisation that ships it
From the perspective of customers, regulators and courts, the answer is straightforward: the organisation that ships the software is responsible for its security, however the code was produced.
Regulation is reinforcing that:
- The EU Cyber Resilience Act, which entered into force in December 2024, places cybersecurity obligations on manufacturers of products with digital elements sold in the EU, including secure development, vulnerability handling and security updates. Most obligations apply from late 2027, with vulnerability reporting duties starting earlier. Nothing in it distinguishes between human-written and AI-written code.
- Secure-by-design guidance from CISA and international partners puts responsibility for customer security outcomes on software makers.
- Contracts with enterprise customers increasingly require evidence of secure development practices.
What about the tool vendor?
AI coding tool vendors generally offer commitments around intellectual property, for example defending customers against copyright claims arising from suggestions, under certain conditions. They do not generally warrant that suggestions are secure or correct, and their terms place responsibility for reviewing and testing code with the user.
Vendors are responsible for the quality of their tools, their data handling and their own security. They are not a place to transfer the risk of what you ship.
The internal answer: people who accept, review and release
Inside the organisation, accountability should follow the same lines as for any code:
- The developer who accepts a suggestion and commits it owns that code, as if they had typed it.
- The reviewer who approves the merge shares responsibility for what they approved.
- The release owner or team lead is accountable for what goes to customers.
- The organisation is accountable for giving people the tools, training, time and controls to do this well.
That last point matters. Blaming individual developers for vulnerabilities while pushing for AI-driven speed, without investing in review, testing and training, is neither fair nor effective.
Governance that makes accountability real
flowchart TB P[Policy<br/>approved tools, data rules,<br/>where AI is restricted] --> D[Developer<br/>accepts & adapts code] D --> A[Automated gates<br/>SAST, SCA, secrets, tests] A --> R[Human review<br/>risk-based depth] R --> Rel[Release approval] Rel --> E[(Evidence<br/>provenance, scan results,<br/>approvals)] T[Training & champions] -.-> D T -.-> R
1. A clear policy. Which AI tools are approved, under which terms (data retention, training on your code), and where they are restricted or require extra review, for example in authentication, cryptography, payment and safety-critical code.
2. Automated controls that do not care who wrote the code. SAST, dependency and secret scanning, IaC checks and tests on every change.
3. Risk-based review. Deeper review, and a second reviewer, for security-sensitive paths.
4. Provenance. Record which changes were substantially AI-generated where your tools allow it. This helps with review focus and, if needed, incident analysis.
5. Training. Teach developers the characteristic failure modes of AI-generated code, and how to review it.
6. Evidence. Keep records of scans, reviews and approvals. Under regimes like the Cyber Resilience Act, being able to demonstrate secure development practices matters as much as having them.
A note on liability and contracts
If you build software for clients, review your contracts: clients may ask whether AI tools are used, may restrict them, and may require specific assurance activities. Being transparent about your AI-assisted development practices, and the controls around them, builds trust and avoids disputes.
The bottom line
AI does not change who is responsible for secure software. It changes how that responsibility has to be exercised. The organisation that ships the code owns its security; inside the organisation, the people who accept, review and release it are accountable, and the organisation must equip them with policy, controls and training. Treat AI-generated code exactly like any other code, and be able to prove that you did.
Our application security testing and CISO as a Service teams help organisations build AI-aware secure development governance, and our secure code review validates the code itself.