An AI coding assistant writes code faster than a reviewer reads it, and an agent does more than write: it installs packages, runs shell commands, calls MCP servers and reads files that may hold secrets. The attack surface now includes the agent's own actions, not only the code it leaves behind.
Older AppSec tools scan what lands in the repository. Newer tools also act earlier: they give the agent security instructions before it writes, keep secrets out of prompts, block risky installs and commands, and keep an inventory of which assistants, models and MCP servers are in use. Coverage of AI code and assistants and endpoint controls carry 45% of the score between them because they address the agent directly.
Both layers still matter. A pull request written by an agent needs the same SAST, SCA and secrets checks as one written by a person.
How to secure code written by Copilot, Cursor and Claude Code