<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi" -->

---
title: AI-Generated Code in Production: Can It Really Be Trusted?
description: Veracode's 2025 GenAI Code Security Report found that roughly 45% of AI-generated code samples contained security vulnerabilities, with Java hitting a 72%...
canonical: https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AI-Generated Code in Production: Can It Really Be Trusted? | daily.dev
og:description: Veracode's 2025 GenAI Code Security Report found that roughly 45% of AI-generated code samples contained security vulnerabilities, with Java hitting a 72%...
og:url: https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi
og:image: https://api.daily.dev/og/posts/UszaxywBI.png
og:image:alt: AI-Generated Code in Production: Can It Really Be Trusted?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI-Generated Code in Production: Can It Really Be Trusted?

**[Medium](https://daily.dev/sources/medium_js)** · 6 min read · 1 upvotes · 0 comments

## Summary

Veracode's 2025 GenAI Code Security Report found that roughly 45% of AI-generated code samples contained security vulnerabilities, with Java hitting a 72% failure rate. A Stanford study further showed developers using AI coding assistants wrote less secure code while feeling more confident about it. Key risks include improper output handling (OWASP LLM05:2025), unsanitized queries, and weak auth flows. GitClear data shows copy-paste code rates rising, meaning fewer eyes re-check logic before it ships. The post argues production-readiness requires both automated security scanning and human architect review — not just a working demo.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/joyloai/ai-generated-code-in-production-can-it-really-be-trusted-6528693158d9>

## Questions this post answers

### What percentage of AI-generated code contains security vulnerabilities according to Veracode's research?

Roughly 45% of AI-generated code samples contained a security vulnerability, based on testing of code from more than 100 large language models across 80-plus coding tasks in Veracode's 2025 GenAI Code Security Report. The vulnerabilities included flaws from the OWASP Top 10, and failure rates varied significantly by programming language.

_Anyone shipping AI-generated code can weigh security review needs using data like this via daily.dev._

### Which programming languages have the highest security failure rates when code is generated by AI?

Java had the worst security failure rate at 72% in Veracode's 2025 GenAI Code Security Report testing, while Python, C#, and JavaScript logged failure rates between 38% and 45%. The gap suggests language-specific training data and how forgiving a language is about unsafe patterns both affect how securely models generate code.

_Teams choosing a stack for AI-assisted development can track language-specific risk data on daily.dev._

### Does using an AI coding assistant make developers write less secure code while feeling more confident about it?

Yes, a Stanford-led study by Perry, Boneh, and colleagues found developers with access to an AI coding assistant wrote measurably less secure code than developers without one, and were more likely to believe their code was secure. This overconfidence gap is described as a key reason security flaws in AI-generated apps go unnoticed until real users trigger them.

_Developers relying on AI assistants can follow research on this confidence gap through daily.dev._

## Similar posts on daily.dev

- [Enterprises know AI-generated code is vulnerable; they’re shipping it anyway](https://daily.dev/posts/enterprises-know-ai-generated-code-is-vulnerable-they-re-shipping-it-anyway-o7qxd8buy) · InfoWorld · 1 upvotes · 0 comments
- [Devs know AI code is riddled with holes, but ship it anyway](https://daily.dev/posts/devs-know-ai-code-is-riddled-with-holes-but-ship-it-anyway-xma56raho) · DEVCLASS · 1 upvotes · 1 comments
- [Survey: More AI Code Running in Production Environments with Caveats](https://daily.dev/posts/survey-more-ai-code-running-in-production-environments-with-caveats-93aoqq6ip) · DevOps.com · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#llm](https://daily.dev/tags/llm), [#ai-coding](https://daily.dev/tags/ai-coding), [#code-review](https://daily.dev/tags/code-review)

[View this post on daily.dev](https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AI-Generated Code in Production: Can It Really Be Trusted?","url":"https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi"},"datePublished":"2026-07-12T01:35:00.831Z","dateModified":"2026-09-13T20:03:20.462Z","description":"Veracode's 2025 GenAI Code Security Report found that roughly 45% of AI-generated code samples contained security vulnerabilities, with Java hitting a 72%...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,llm,ai-coding,code-review","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"AI-Generated Code in Production: Can It Really Be Trusted?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ai-generated-code-in-production-can-it-really-be-trusted--uszaxywbi#faq","mainEntity":[{"@type":"Question","name":"What percentage of AI-generated code contains security vulnerabilities according to Veracode's research?","acceptedAnswer":{"@type":"Answer","text":"Roughly 45% of AI-generated code samples contained a security vulnerability, based on testing of code from more than 100 large language models across 80-plus coding tasks in Veracode's 2025 GenAI Code Security Report. The vulnerabilities included flaws from the OWASP Top 10, and failure rates varied significantly by programming language. Anyone shipping AI-generated code can weigh security review needs using data like this via daily.dev."}},{"@type":"Question","name":"Which programming languages have the highest security failure rates when code is generated by AI?","acceptedAnswer":{"@type":"Answer","text":"Java had the worst security failure rate at 72% in Veracode's 2025 GenAI Code Security Report testing, while Python, C#, and JavaScript logged failure rates between 38% and 45%. The gap suggests language-specific training data and how forgiving a language is about unsafe patterns both affect how securely models generate code. Teams choosing a stack for AI-assisted development can track language-specific risk data on daily.dev."}},{"@type":"Question","name":"Does using an AI coding assistant make developers write less secure code while feeling more confident about it?","acceptedAnswer":{"@type":"Answer","text":"Yes, a Stanford-led study by Perry, Boneh, and colleagues found developers with access to an AI coding assistant wrote measurably less secure code than developers without one, and were more likely to believe their code was secure. This overconfidence gap is described as a key reason security flaws in AI-generated apps go unnoticed until real users trigger them. Developers relying on AI assistants can follow research on this confidence gap through daily.dev."}}]}
```

