KenoraKenora
Security6 min read

New Security Risks Found in AI Coding Agents 

AI coding agents can build software faster, but their growing access to code, tools, and systems creates new security risks businesses need to control.

K

Kenora

Kenora Team

AI_Coding_Agents_Security_Risks

New Security Risks Found in AI Coding Agents

AI coding tools are changing software development fast. A few years ago, developers mostly used AI to get a code suggestion or a quick answer to a question. Today's AI coding agents do much more. They read your project files, write and change code, run commands, install packages, work with Git repositories, and finish tasks with very little human input.

That sounds great for productivity. But there is a catch. The more power we hand an AI agent, the bigger the target we create for attackers. This is not a future problem anymore. Security researchers are already finding real weaknesses in AI coding agents, including cases where a project's Git configuration can trick an agent into running commands on a developer's own machine.

So the question is no longer "Can AI write code?" It is "Can we trust AI with our code and our systems, safely?"

AI Coding Agents Are a Different Kind of Tool

There's an important difference between an AI coding assistant and an AI coding agent. An assistant suggests code. You read it, decide if it's useful, then use it yourself. An agent can act on its own. It can read your project, edit files, run tests, install dependencies, and use other tools without waiting for your permission each time.

That makes agents far more useful. It also makes them far more dangerous when something goes wrong. A calculator that gives you the wrong answer is a nuisance. A system that can make decisions and take real action, if it gets tricked, can cause a much bigger problem. That's where these new risks begin.

The Trust Problem: What Is Prompt Injection?

One of the biggest risks is called prompt injection. The idea is simple: an AI agent reads information from somewhere, and that information contains hidden instructions meant to trick it. The agent may then follow those instructions as if they came from you.

Picture a developer downloading a project from a public repository. The project looks completely normal. But buried inside it is hidden text written to influence the AI coding agent. The developer never notices it. The AI might. And if that agent can run commands, touch files, or use other tools, a few lines of hidden text can turn into a real security incident. Researchers now treat prompt injection as a genuine security threat for agentic coding tools, not just an odd AI mistake.

A Real Example From September 2026

In September 2026, researchers reported security flaws tied to Git configuration files in several AI coding agents. The issue was simple but serious: a repository could contain Git settings that caused an AI agent to run attacker controlled commands on the developer's machine, all while the developer believed they were just opening a normal coding project.

This example makes an important point. The security of an AI coding agent isn't only about the underlying AI model. It's also about the files it reads, the tools it can use, the permissions it holds, the code it downloads, the commands it can run, and every system it connects to. Judging an AI agent's safety by "does it write good code" is no longer enough.

More Access, More Risk

Imagine giving an AI coding agent access to your source code, private repositories, API keys, cloud accounts, databases, internal systems, and deployment tools. Now imagine that agent gets tricked. The damage is no longer a bad line of code. It can become a full security incident.

This is why security teams push for least privilege, giving an AI agent only the access it truly needs for the job in front of it, nothing more. AWS has also recommended controls around permissions, human approval, monitoring, and secure development practices for AI coding agents. The rule is simple: don't hand an AI agent five keys when it only needs one.

Fast Code Isn't Always Safe Code

AI can write code very quickly. Speed, though, is not the same thing as quality. AI generated code can still contain security mistakes, weak authentication, unsafe dependencies, poor error handling, exposed secrets, and plain logic errors. When AI produces a large amount of code in a short time, it gets harder for humans to review every line.

That's exactly why the usual software security habits still matter: code review, testing, dependency checks, vulnerability scanning, and penetration testing. AI writing the code doesn't make these steps optional. If anything, it makes them more important.

Watch Out for Plugins and Extra Tools

AI coding agents are becoming more connected. Developers can hook them up to extra tools, extensions, skills, and outside services, which makes them far more capable. But every new connection is also a new door an attacker could walk through.

Think about installing software on your own computer. You wouldn't install something unknown and immediately hand it access to everything. AI tools deserve the same caution. Before connecting an agent to a new tool, ask who built it, what it can access, what permissions it needs, and what happens if it's ever compromised. Simple questions, but they matter a lot once an AI agent can act on your behalf.

Should Businesses Stop Using AI Coding Agents?

No. That's not the answer. AI coding agents are genuinely useful. They help developers build features faster, write tests, catch bugs, understand large codebases, automate repetitive work, and try out new ideas.

The problem was never AI itself. The problem is giving AI too much freedom without enough control. Picture hiring a brilliant new developer. You wouldn't hand them access to every company system on day one. You'd start small, review their work, watch the important actions closely, and expand their access as they earn trust. AI agents deserve the same approach.

Six Ways to Lower the Risk

The good news: businesses don't need to give up on AI. They just need better guardrails.

  1. 1Limit access. Give an agent only the permissions its current task needs, not access to every company system.
  2. 2Keep a human in the loop. Sensitive actions, like running risky commands, installing unknown packages, touching private data, or deploying to production, should still need a person's sign off.
  3. 3Protect your secrets. API keys, passwords, and credentials shouldn't be freely available to AI tools. A leaked key can do far more damage than a bad line of code.
  4. 4Vet third party tools. Know what a plugin, extension, or skill actually does before you give it access to anything.
  5. 5Test everything. AI generated code should go through the same testing and security checks as any other code. Never assume it's safe just because an AI wrote it.
  6. 6Monitor what agents do. Good visibility into an agent's activity helps you catch strange behaviour before it turns into a real problem.

Security Has to Grow Up Alongside AI

Here's the bigger lesson. Traditional software security mostly focused on people, applications, servers, and networks. Now there's a new kind of actor inside that environment: the AI agent. It can read, decide, use tools, write code, and touch other systems, all very quickly.

Recent incidents involving AI agents have made this risk feel a lot more real. Security researchers now talk about AI agents as both potential targets and potential sources of an attack. That means companies need to think about AI security before they connect an agent to anything important, not after something goes wrong.

The Future Isn't About Avoiding AI

AI coding agents aren't going away. Developers will use them more, connect them to more tools, and trust them with bigger tasks. That's a real advantage. But there's a difference between using AI and trusting it without any limits.

The smarter path sits somewhere in the middle. Let AI handle the repetitive work while developers focus on the decisions that matter. Give agents useful tools, but keep clear boundaries around what they can touch and change. The goal was never "let AI do everything." It's "let AI do more, while making sure it can only do what it should."

Final Thought

AI coding agents are making software development faster, and that's genuinely exciting. But speed without security just creates a different kind of problem. The more capable these agents become, the more it matters that we control their permissions, check their actions, and test what they produce.

AI helps us build faster. Security makes sure we build safely. In the age of AI coding agents, businesses will need both.