Security Pitfalls in AI-Generated Code: What Happens When Developers Skip Review

This ad is not shown to multipass and full ticket holders
React Summit
React Summit 2026
June 11 - 15, 2026
Amsterdam & Online
The biggest React conference worldwide
Upcoming event
React Summit 2026
React Summit 2026
June 11 - 15, 2026. Amsterdam & Online
Learn more
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

AI speeds up development — but it also introduces silent vulnerabilities. This talk exposes the hidden security risks of unreviewed AI-generated code and shows practical ways to protect your applications without slowing down your workflow.

Table of Content: 

- How LLMs Generate Code & Why It Can Be Dangerous

- Real-World Examples of AI-Introduced Vulnerabilities

- A Practical, Secure Workflow for AI-Generated Code

- Q&A

This talk has been presented at AI Coding Summit 2026, check out the latest edition of this Tech Conference.

FAQ

Common security pitfalls in AI-generated code include injection attacks due to unsanitized inputs, insecure authentication logic, broken authorization processes, hardcoded secrets in the code, and dependency and supply chain vulnerabilities.

Reviewing AI-generated code is crucial because AI can produce code quickly but may inherit bad practices, leading to security vulnerabilities. Developers are responsible for ensuring the code is secure and does not expose sensitive information.

Developers can ensure the security of their AI-generated code by validating and sanitizing inputs, properly configuring authentication and authorization processes, avoiding hardcoding secrets, and regularly updating dependencies and conducting security audits.

Resources for learning about security in AI-generated code include CVA organization for vulnerabilities, Cloudflare Radar for real-time security issues, OWASP for understanding security vulnerabilities, and platforms like TryHackMe for practical security exercises.

Dangerous assumptions about AI-generated code include believing that clean-looking code is secure, assuming that passing tests mean everything is covered, and thinking that fast code generation equates to good quality without thorough verification.

Developers can stay up-to-date with security vulnerabilities by following organizations like CVA, Cloudflare, and official technology websites. Engaging with community updates, blogs, and security-focused platforms also helps maintain awareness.

While AI can assist in generating code, it does not inherently ensure security. Developers must take responsibility for verifying the security of the code and implementing necessary security measures, as AI-generated code can include vulnerabilities.

In AI-assisted development, code ownership is significant because developers are accountable for the code's security and integrity. AI may assist in coding, but developers must ensure the final product is secure and free from vulnerabilities.

Developers can prevent security issues by establishing AI rules for code generation, validating and sanitizing data, implementing proper authentication and authorization, avoiding hardcoded secrets, and keeping dependencies up-to-date.

Examples of security vulnerabilities in AI-generated code include SQL injection attacks, compromised authentication logic, unauthorized access due to poor authorization settings, and exposed secrets or environment variables in the code.

Kristiyan Velkov
Kristiyan Velkov
25 min
26 Feb, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Introduction to AI security pitfalls, emphasizing the importance of understanding AI promises and risks, responsibility in verifying AI-generated code, the necessity of code verification and thorough review for secure deployment, ensuring code validation and sanitization for secure applications, risks of unsecure authentication logic and broken authorization due to AI usage, the importance of avoiding exposing secrets in code by trusting AI blindly, learning resources on cloud security and platforms like Flare Learning and TryHackMe, and the significance of creating AI rules, testing, and following best practices for code security.

1. AI Security Pitfalls and Speaker's Background

Short description:

Introduction to AI security pitfalls, the promise of AI code, and the speaker's background as a front-end developer using AI tools and resources, including being a Docker captain and author.

Which is very, very important nowadays. Since we use a lot of AI code and also a lot of AI tools to generate code, I want to raise the topic about security pitfalls in AI-generated code, a topic which more and more developers will explore. We know that the models are getting better and better, but do our code is secure in the end? And what is happening if the developer don't review this code later on? So today's agenda will be a little introduction about me, who I am, what I'm doing, and also the promise of AI code. How AI code is good for us, how we can use it, why we can use it, and some dangerous assumptions about this code and AI help.

Later on, we'll continue with what changes when the developer itself not just uses the tool, but also reviews the code later on. And here I will share with you five pitfalls, which I believe are really important in the world of security, and we should be aware. Later on, I want to share with you some information for where you can learn about security, also how you can be up-to-date, and of course, if you have questions, you can ask later on. So let's start.

About me, shortly, I'm a front-end developer with 11 years of experience, using AI daily, different tools of AI, like a cursor, like code, and also VS Code, extensions for AI, like a Copilot, Kiro also, so all of the varieties. My role in my company is a principle. So for that reason, I have the opportunity to use many tools, but also to see what are fitting, bad, or good for us, like company standards. Also, I'm doing tech walks, and I'm the author of some books, and I'm a Docker captain, this is a title given by Docker, to the community participants, which are really good at what they're doing, and also, I'm a speaker.

2. AI Promises and Risks of Blindly Trusting AI

Short description:

Authoring Docker guides, releasing Docker for ReactJS Developers book, emphasizing the importance of understanding AI's promises and the risks of blindly trusting AI-generated code without thorough review.

So, talking about Docker guides, all of these guides was authored by me, so if you're interested, for example, how to dockernize ReactJS application in best way, you can go to official documentation and check. That being said, I want to share with you something very important, and that is release of my new book, and this is Docker for ReactJS Developers. This book is a missing piece, which I try to fill in our world of technology. Just because many resources in Internet, it's written in a way that back-end developers should explore and understand Docker. And when we talk about front-end perspective is missing. So, I try to bring the information and fill this gap to the community. You can check the Docker for ReactJS Developers. If you love to go to Docker or React, this book is for you. The rest of the books are just related to interviews in React world, and also I have a book for TypeScript. Definitely go to my website, and if you're interested, review, write to me, or just share opinion.

Now, back to the presentation itself. Today, I want really to mention something very important, and that is the promise of AI. What is promise of AI? So, most of developers today is using AI to write code. But do the code itself is enough good, and do the speed which AI is really good at it, it's promising to deliver a good quality of code. And also, I saw many people, including me also, that we are using AI, but we stopped thinking of the whole process. We stopped thinking how we should develop the application in right way. And also, I saw myself and many of developers, I'm teaching that this comfort zone of AI generated code and speed itself, it's not meaningful. And for that reason, I want to say few uncomfortable reality reasons and what is really happening when we use AI without thinking what will cause later on in our application. What we assume.

So, when the code runs without errors, the verification process, it's shifted in a way to AI. What I mean here. So, imagine we generate some feature. This feature is really big. And after AI change, let's say thousands of files, what we do usually is blindly trust AI that the code itself is very good just because the model is very good. But often that is not reality. And I saw it in firsthand how our applications was compromised, was hacked just because what is happening is that the developer doesn't do what is need to be done in the end. And that is to review the code itself. And the review process is very hard just because AI can change a lot of files and usually people just watching them and don't try to spot the mistakes or to use AI to fix them. So, what is happening in my team nowadays is that people, senior developers, are saying that this is fault of AI. The code is shit, but let's blame AI.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
The talk discusses the importance of supply chain security in the open source ecosystem, highlighting the risks of relying on open source code without proper code review. It explores the trend of supply chain attacks and the need for a new approach to detect and block malicious dependencies. The talk also introduces Socket, a tool that assesses the security of packages and provides automation and analysis to protect against malware and supply chain attacks. It emphasizes the need to prioritize security in software development and offers insights into potential solutions such as realms and Deno's command line flags.
The State of Passwordless Auth on the Web
JSNation 2023JSNation 2023
30 min
The State of Passwordless Auth on the Web
Passwords are terrible and easily hacked, with most people not using password managers. The credential management API and autocomplete attribute can improve user experience and security. Two-factor authentication enhances security but regresses user experience. Passkeys offer a seamless and secure login experience, but browser support may be limited. Recommendations include detecting Passkey support and offering fallbacks to passwords and two-factor authentication.
5 Ways You Could Have Hacked Node.js
JSNation 2023JSNation 2023
22 min
5 Ways You Could Have Hacked Node.js
Top Content
The Node.js security team is responsible for addressing vulnerabilities and receives reports through HackerOne. The Talk discusses various hacking techniques, including DLL injections and DNS rebinding attacks. It also highlights Node.js security vulnerabilities such as HTTP request smuggling and certification validation. The importance of using HTTP proxy tunneling and the experimental permission model in Node.js 20 is emphasized. NearForm, a company specializing in Node.js, offers services for scaling and improving security.
Content Security Policy with Next.js: Leveling Up your Website's Security
React Summit US 2023React Summit US 2023
9 min
Content Security Policy with Next.js: Leveling Up your Website's Security
Top Content
Watch video: Content Security Policy with Next.js: Leveling Up your Website's Security
Lucas Estevão, a Principal UI Engineer and Technical Manager at Avenue Code, discusses how to implement Content Security Policy (CSP) with Next.js to enhance website security. He explains that CSP is a security layer that protects against cross-site scripting and data injection attacks by restricting browser functionality. The talk covers adding CSP to an XJS application using meta tags or headers, and demonstrates the use of the 'nonce' attribute for allowing inline scripts securely. Estevão also highlights the importance of using content security reports to identify and improve application security.
How React Applications Get Hacked in the Real-World
React Summit 2022React Summit 2022
7 min
How React Applications Get Hacked in the Real-World
Top Content
How to hack a RealWorld live React application in seven minutes. Tips, best practices, and pitfalls when writing React code. XSS and cross-site scripting in React. React's secure by default, but not always. The first thing to discover: adding a link to a React application. React code vulnerability: cross-site scripting with Twitter link. React doesn't sanitize or output H ref attributes. Fix attempts: detect JavaScript, use dummy hashtag, transition to lowercase. Control corrector exploit. Best practices: avoid denialist approach, sanitize user inputs. React's lack of sanitization and output encoding for user inputs. Exploring XSS vulnerabilities and the need to pretty print JSON. The React JSON pretty package and its potential XSS risks. The importance of context encoding and secure coding practices.
Let Me Show You How React Applications Get Hacked in the Real-World
React Advanced 2021React Advanced 2021
22 min
Let Me Show You How React Applications Get Hacked in the Real-World
Top Content
React's default security against XSS vulnerabilities, exploring and fixing XSS vulnerabilities in React, exploring control characters and security issues, exploring an alternative solution for JSON parsing, and exploring JSON input and third-party dependencies.

Workshops on related topic

Hands-On Workshop: Introduction to Pentesting for Web Apps / Web APIs
JSNation US 2024JSNation US 2024
148 min
Hands-On Workshop: Introduction to Pentesting for Web Apps / Web APIs
Featured Workshop
Gregor Biswanger
Gregor Biswanger
In this hands-on workshop, you will be equipped with the tools to effectively test the security of web applications. This course is designed for beginners as well as those already familiar with web application security testing who wish to expand their knowledge. In a world where websites play an increasingly central role, ensuring the security of these technologies is crucial. Understanding the attacker's perspective and knowing the appropriate defense mechanisms have become essential skills for IT professionals.This workshop, led by the renowned trainer Gregor Biswanger, will guide you through the use of industry-standard pentesting tools such as Burp Suite, OWASP ZAP, and the professional pentesting framework Metasploit. You will learn how to identify and exploit common vulnerabilities in web applications. Through practical exercises and challenges, you will be able to put your theoretical knowledge into practice and expand it. In this course, you will acquire the fundamental skills necessary to protect your websites from attacks and enhance the security of your systems.
0 to Auth in an hour with ReactJS
React Summit 2023React Summit 2023
56 min
0 to Auth in an hour with ReactJS
Top Content
WorkshopFree
Kevin Gao
Kevin Gao
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool. There are multiple alternatives that are much better than passwords to identify and authenticate your users - including SSO, SAML, OAuth, Magic Links, One-Time Passwords, and Authenticator Apps.
While addressing security aspects and avoiding common pitfalls, we will enhance a full-stack JS application (Node.js backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session securely for subsequent client requests, validating / refreshing sessions- Basic Authorization - extracting and validating claims from the session token JWT and handling authorization in backend flows
At the end of the workshop, we will also touch other approaches of authentication implementation with Descope - using frontend or backend SDKs.
OWASP Top Ten Security Vulnerabilities in Node.js
JSNation 2024JSNation 2024
97 min
OWASP Top Ten Security Vulnerabilities in Node.js
Workshop
Marco Ippolito
Marco Ippolito
In this workshop, we'll cover the top 10 most common vulnerabilities and critical security risks identified by OWASP, which is a trusted authority in Web Application Security.During the workshop, you will learn how to prevent these vulnerabilities and develop the ability to recognize them in web applications.The workshop includes 10 code challenges that represent each of the OWASP's most common vulnerabilities. There will be given hints to help solve the vulnerabilities and pass the tests.The trainer will also provide detailed explanations, slides, and real-life examples in Node.js to help understand the problems better. Additionally, you'll gain insights from a Node.js Maintainer who will share how they manage security within a large project.It's suitable for Node.js Developers of all skill levels, from beginners to experts, it requires a general knowledge of web application and JavaScript.
Table of contents:- Broken Access Control- Cryptographic Failures- Injection- Insecure Design- Security Misconfiguration- Vulnerable and Outdated Components- Identification and Authentication Failures- Software and Data Integrity Failures- Security Logging and Monitoring Failures- Server-Side Request Forgery
How to Build Front-End Access Control with NFTs
JSNation 2024JSNation 2024
88 min
How to Build Front-End Access Control with NFTs
WorkshopFree
Solange Gueiros
Solange Gueiros
Understand the fundamentals of NFT technology and its application in bolstering web security. Through practical demonstrations and hands-on exercises, attendees will learn how to seamlessly integrate NFT-based access control mechanisms into their front-end development projects.
Finding, Hacking and fixing your NodeJS Vulnerabilities with Snyk
JSNation 2022JSNation 2022
99 min
Finding, Hacking and fixing your NodeJS Vulnerabilities with Snyk
Workshop
Matthew Salmon
Matthew Salmon
npm and security, how much do you know about your dependencies?Hack-along, live hacking of a vulnerable Node app https://github.com/snyk-labs/nodejs-goof, Vulnerabilities from both Open source and written code. Encouraged to download the application and hack along with us.Fixing the issues and an introduction to Snyk with a demo.Open questions.
Bring Code Quality and Security to your CI/CD pipeline
DevOps.js Conf 2022DevOps.js Conf 2022
76 min
Bring Code Quality and Security to your CI/CD pipeline
Workshop
Elena Vilchik
Elena Vilchik
In this workshop we will go through all the aspects and stages when integrating your project into Code Quality and Security Ecosystem. We will take a simple web-application as a starting point and create a CI pipeline triggering code quality monitoring for it. We will do a full development cycle starting from coding in the IDE and opening a Pull Request and I will show you how you can control the quality at those stages. At the end of the workshop you will be ready to enable such integration for your own projects.