Part 2 of the SecureFlag AI training series
It can be tempting to approve AI-generated code straight away because it looks clean and comes with a convincing explanation of how it works. The problem is that it often lacks security checks, even when the code seems to be complete.
As an example, a page can show account records as expected but still let one user view another user’s details. Finding these missing checks depends on knowing what to look for when reviewing the code.
In Veracode’s 2026 GenAI Code Security Report, AI models generated code that was syntactically correct nearly 100% of the time, but about 44% of the tested coding tasks resulted in code with a known vulnerability. This goes to show how easily functional code can introduce security risks.
Developers are still responsible for AI-generated code, but the work is different. These days, instead of writing each line, developers describe what is needed and then decide whether the result is safe to release. Making that decision requires strong secure-coding foundations.
Agentic coding security training builds on that foundation by teaching how to prompt an AI agent for secure code and how to adapt code review to AI-generated output.
Agentic coding security training is intended for developers who regularly use AI coding agents and assistants to build software. It applies to developers across a team, whether or not they specialize in security, although they will get the most from it if they already have a foundation in secure coding.
The training covers four areas.

To get useful results from AI coding agents, developers need to understand how to guide them and control what they can access and do. They need to give agents clear instructions and specify security requirements, including input validation, authorization, safe defaults, and error handling.
It’s also important to understand how agents can be manipulated through prompt injection, where instructions hidden in third-party documentation or online guides change what the agent does. Broad access to files and credentials can also expose sensitive data or allow actions that weren’t intended.
Developers should also be aware of the security implications of agent skills, hooks, and configuration files, particularly when using components from external sources.
Even though a well-written prompt reduces the risk of AI-generated code introducing security vulnerabilities, it doesn’t eliminate it. Developers still need to review the output to make sure security requirements have been met.
An important part of the review is checking for missing security controls, such as permission checks or limits on repeated requests, and how the system responds to unexpected input. Developers should also check how the code behaves in situations the original request did not cover.
Another point to keep in mind is that agents can modify several files and reuse existing functions, so developers also need to understand how those changes affect the wider application. Something that looks fine in the new code could still cause problems elsewhere.
An AI agent won’t necessarily report its own mistakes or say something when a security control is missing. Developers therefore need to know which protections AI agents tend to leave out, including:
Authorization checks: Making sure users can access only the records and perform the actions they’re allowed to.
Rate limits: Limiting how many times someone can try to log in.
Session handling: Ensuring sessions end when they should, especially after inactivity.
Less obvious application endpoints: Checking other parts of an application that accept requests and making sure they have the right security controls.
Developers learn more effectively when they can work through a vulnerability in a real project. They fix the issue using their own technology stack, then run the application in a lab environment to check that the security control works as intended. It helps catch fixes that look correct in the code but don’t resolve the vulnerability when the application is running, as well as any new issues introduced by the change.
With this kind of practical training, teams can make better use of AI coding agents without overlooking the security of the code they produce. Developers are better equipped to assess AI-generated code, and teams can use more consistent security checks when reviewing and approving changes. It helps reduce the risk of vulnerable code reaching production.

SecureFlag’s Agentic Coding Labs give developers hands-on practice with the skills covered in this post. Working in real development environments, they learn to write security-focused prompts, review AI-generated code, find missing controls, and test their fixes.
These labs are part of SecureFlag’s wider developer security training platform, which covers 70+ programming languages, frameworks, and technologies. The platform also offers training on the OWASP Top 10 for LLM Applications and OWASP Top 10 for Agentic Applications, addressing the security risks of AI features built into products.
SecureFlag supports training rollouts, ongoing learning through annual plans and adaptive training, and just-in-time labs in developers’ existing tools. Teams can also track training coverage by technology and by commit.