When developers use AI coding assistants, training should add four things: reviewing generated code as untrusted input, checking suggested dependencies, keeping secrets and private data out of prompts, and knowing what the team policy allows. The classic flaw classes stay, because the assistant can write them too.
Definition
An AI coding assistant is a tool that suggests or writes code from a prompt or the surrounding files. It can be wrong in the same ways a person can, but faster and with more confidence in its tone. Training needs to shift from "write safely" toward "judge what was written safely".
The syllabus
| Topic | Skill to practice | Exercise |
|---|---|---|
| Review generated code | Read for access checks, input handling and error paths before accepting | Review a suggested handler that lacks an authorization check |
| Dependency suggestions | Verify a package exists, is maintained and fits your policy before adding it | Check a suggested package name against the registry and your allow list |
| Outdated or insecure patterns | Notice deprecated APIs and weak defaults | Spot an old hashing call in a suggestion |
| Secrets and private data | Keep keys, customer data and internal code out of prompts unless policy allows | Rewrite a prompt with placeholders |
| Tool permissions | Understand what an agent can read, run and change | Review a config that gives an agent broad file access |
| Policy | Know approved tools, logging and escalation | Quiz on your own acceptable use rules |
Our existing posts on training junior developers to review AI code and AI assistants suggesting outdated library versions go deeper on two of these.
How to run it
- Start with your policy. If you do not have one, write a one page version first: which tools, which data, who reviews.
- Collect two or three real examples from your own repos where an assistant produced a flaw. Anonymize them.
- Run a 45 minute session: demo, exercise, discussion.
- Add a line to your pull request template: "Contains AI generated code? Reviewed for access checks, dependencies and secrets."
- Revisit quarterly, because tools and settings change fast.
What not to do
- Ban the tools by memo and assume that ends use. Staff will use personal accounts.
- Treat the assistant's explanation as a security review.
- Train only juniors. Senior engineers accept suggestions too.
- Teach prompt tricks as a security control. Prompts are not a boundary.
Measuring it
Track the share of pull requests flagged for AI content that needed security changes in review, and dependency additions rejected at review. Use trends over a few quarters, and expect numbers to be messy.
Where Safeguard fits
Safeguard offers an MCP Guardrail, policies and gates, and SBOM and dependency scanning, which can help check what an assistant adds to a repository. You can start with a free scan.
Quick check
Do we need separate training for AI assistant users?
Not a separate program. Add a module to existing developer training covering review, dependencies, secrets and policy.
Is generated code less secure than human code?
We have not cited a source for a general claim either way. Treat it as untrusted input and review it, whoever wrote it.
Last reviewed: 19 October 2026.