In a year we will not see SQL injection in agent-generated code. I speak to a lot of AppSec teams and, in most cases, the last twenty PRs opened by agents had minimal injection, XSS, and no secrets in config. That issue is so 2024. Most of those teams are still running rule-based scanners tuned to find exactly the issues that are going extinct.
They are going extinct because the model copies what is common, and the safe way became the common way. Ask an agent for a database call and you get a parameterized query, because that is what almost every query it was trained on looks like. Ask for a form and the framework escapes the output for you. Writing SQL by string concatenation now takes effort, and nobody makes the effort. The model did not get careful. It was shown the safe way a hundred thousand times, and it was shown the unsafe way next to the finding, because Mythos found every one of those in minutes. A model found the bugs, and the next model trained on them.
Bugs that look like features
So what’s left in a world where there are no vanilla issues? The security issues that pretend to be standard features: business logic flaws. Trust boundaries, authorization, a control that should be there and isn’t. There is no unsafe line to point at, so a model reading the code sees clean code. Give the same model the rule it was supposed to enforce and the architecture it runs in, and it can find the violation. The difference is what you feed it.
If the fix is feeding the model the rule, the obvious move is to feed it to the agent before it writes the code, so the violation never gets written. “Scope every query to the tenant” goes in the system prompt and the problem is gone. That works, for that rule. Any rule you can state once and apply everywhere turns into a default, the same way parameterized queries did, and in two years tenant scoping is just as vanilla.
The rules nobody wrote down
The rule a guardrail cannot hold is the one that exists only for this feature. The enterprise export job is allowed to read across sub-tenants, so it has no tenant check, and nobody noticed the self-serve tier can call the same job. Support can impersonate a user, but only after the customer approved the ticket. Refunds under fifty dollars skip approval unless the account is under thirty days old. Nobody trained a model on those, and nobody wrote them in the PRD either. They are decisions, and agents now ship more of them per week than anyone is writing down.
You already know where these get found. Pull your last pentest report and your bounty payouts. The criticals are IDOR, authorization bypass, a workflow that skips a step, and researchers stopped hunting injection years ago. None of it came from a scanner, and the report has looked like this for two years. What changed is the rest of the report. It is emptying out, so these findings go from most of what matters to all of it.
Name the destination, not the paths
You cannot write the refund threshold ahead of time. You can write the rule above it, and that is now your team’s job, because the PM will not and the agent cannot: a contractor can never read the ledger. That sentence finds nothing on its own. It tells the check what to look for. The check walks every path from contractor to ledger: the API, the export job, the webhook, the legacy endpoint, the service account whose IAM role got widened last week. You never listed those paths, you only named the destination, and the ones you never thought of are what the walk turns up.
The walk has to run on the whole system, code and cloud together, after the agent is done, because the rule at write time is a snapshot. The agent had the rule in its prompt and still compared the wrong field. Two PRs each honored it on their own and combined into a path that didn’t. The IAM change that opened the legacy endpoint landed three weeks after merge, and no line of code moved. Every one of those passed the check at the PR, because at the PR each one was true.
Your scanners read code and have no rule. Your finding count is going to drop because the class it counts is disappearing, and the dashboard you report to the board will look better every quarter. Your exposure is not dropping, and the first person to prove that will not work for you.




