AI coding agents can write features that work well but still leave them open to attacks. Researchers at the 2026 International Conference on Machine Learning (ICML) found that a coding agent delivered working code for 57% of feature requests, but only about one in five of those features was secure.1 A reviewer who only checks that code works would also approve the other four.
A secure coding checklist for AI apps is the set of checks your team completes before it ships AI-assisted code. The checklist covers invented packages, exposed secrets, agents with too much access, and large language model (LLM) features.
Secure coding for AI applications is the work your developers and application security (AppSec) team do to protect code an AI assistant helped write. That work also includes the LLM-powered features that code adds to your product. Your team is ultimately responsible for every line it ships, which is why your developers should review AI-assisted or AI-written code.
Developers who already validate input and limit permissions can keep those habits as they start working with AI. Your team can keep the standards it enforces today and add checks for the ways assistants and models fail. That combination is one of the important secure coding practices for AI applications Engineers and AppSec leaders can track those added checks in a secure coding checklist for AI apps, next to the requirements they already report against.
With AI applications, your team has to cover everything it would for a traditional app, plus the code an assistant suggests and any feature where your app sends a prompt to an LLM. A developer might get a working function from the assistant in seconds and merge it after a quick skim once it passes a few tests. If that function imports a package that doesn't exist, an attacker could claim that name and publish malicious code the developer would then install.
Your team has to treat those prompts and replies as a new trust boundary. Validate everything that crosses that boundary the way you'd validate form input.
Employees without an engineering background can create both risks when they use those same assistants to write scripts and automations. Your reviewers need to check that code too, since it ends up in the same repositories and environments.
A reviewer should check any AI-generated code before anyone on your team merges it. Fu and colleagues examined 733 AI-generated snippets found in public GitHub projects, 672 of them generated by Copilot, and spotted security weaknesses in 27.3% of them.2
That's why your reviewers should use an AI code security checklist on every pull request that includes code an AI assistant wrote. Start each AI-generated code security review with the weakness types that were most common in Fu's snippets, like weak random values and code injection. Work through these checks before approving the merge:
AI assistants sometimes import packages that don't exist and tend to invent the same names over and over. Spracklen and colleagues analyzed 576,000 code samples from 16 models and found that 19.7% of package references pointed to packages that didn't exist.3 A developer who accepted every import those 16 models suggested would have tried to install a made-up package about once in every five.
The researchers also found that when they gave a model the same prompt 10 times, it produced 43% of its invented names in all 10 attempts.3 An attacker who tries common prompts can learn which fake names your developers might see. Your team can take care of dependency security for AI apps with these checks in every project that uses an AI coding assistant:
Your team needs to control what an AI assistant can read and what an agent can do with its credentials. For example, an assistant that reads a .env file could copy an API key into new code. Agents are riskier because they can use their credentials to delete production systems. Add these items to your secrets management for AI code and your agent access policies:
Check every feature that sends prompts to an LLM for prompt injection, unsafe output handling, and sensitive data exposure. The Open Worldwide Application Security Project (OWASP) lists all three in its OWASP Top 10 for LLM applications ranking. Add these checks to your LLM application security checklist:
Treat everything the model reads as untrusted and validate everything it writes before your code or a user acts on it. Your developers need to put those checks in the app's own code because the model can't reliably tell your instructions apart from an attacker's. OWASP recommends these controls for prompt injection prevention:
Automate every check a tool can handle and save human review for the logic that tools can't judge. Faros AI tracked about 10,000 developers on 1,255 teams and found that engineers who used AI tools merged 98% more pull requests and pull request review time went up 91%.5
Your reviewers can spend their time on code that needs human judgment once tools take care of the routine checks. Add these automated checks to your commit hooks and continuous integration (CI) pipeline:
Focus your human reviewers on authentication, authorization, and business logic. A scanner can't tell whether a login flow matches your spec. The session and login flaws from the ICML study were exactly this kind of mismatch.
Revisit this checklist any time your team adopts a new assistant, model, or agent capability because each one changes what can go wrong. Your developers can also identify these flaws faster in a pull request once they've found and fixed them in real code.
Security Journey's hands-on Break/Fix labs and capture-the-flag challenges give developers that practice, with role-based training that we update as AI tools change. Employees without an engineering background who code with AI get hands-on practice through the AI Advantage Citizen Developers track. Your team can then institutionalize secure AI-assisted development habits any time it adopts new AI tools.