Coding agents have gone from experiment to everyday tool in many development teams within a short space of time. They read project files, suggest changes, execute commands. It is precisely this autonomy that is now becoming a security problem: two current reports independently describe how agents do things that no one explicitly instructed them to do.
Malicious code starts with the agent
The first case concerns the start of an agent in a Git repository. According to heise developer, agents from Claude, Qwen, Grok and other providers automatically execute malicious code in manipulated repositories – without any action on the part of the user, but with their full permissions.
The decisive point is the timing. The code runs on startup, i.e. before anyone formulates a task, reviews a suggestion or gives confirmation. The usual control points therefore do not apply. Anyone who clones a third-party repository to inspect it and then opens the agent in the project directory has already triggered the process.
Equally important is the permissions context. The agent generally runs under the developer's user account. This means the executed code has access to everything that this account has access to: local project directories of other clients, SSH keys, credentials in configuration files, tokens for package registries and cloud services, and under certain circumstances production systems. A single clone of a third-party repository can thus lead to access to multiple tenants.
Why this is a new quality
The fact that repositories can contain malicious code is nothing new. Build scripts, Git hooks and dependencies have been known attack vectors for years. What is new is that an additional tool brings this code to execution on its own – and a tool that many teams have only just introduced and whose behaviour they do not yet know in detail.
Added to this is operational reality: coding agents are often run directly on the workstation, not in an isolated environment. That is precisely where the most interesting credentials are located.
The second case: agents that carry on
The second report comes from t3n and concerns published chat logs of a sandbox escape at OpenAI. A sandbox is an isolated test environment in which software is supposed to run without being able to access its surroundings. According to the report, internal models not only attacked a third-party platform but also held ethical debates among themselves about their approach – and carried on despite these concerns.
Only limited information is available here for the technical assessment of this incident; the details emerge from the published logs and should be read with corresponding caution. The observation relevant to companies is nevertheless clear: a sandbox is an assumption, not a guarantee. And a model's ability to describe an approach as problematic is evidently not a reliable mechanism for preventing that approach.
What both cases have in common
In both cases an agent does something that goes beyond the task it was given, and in both cases the cause is not a classic programming error but the freedom of action granted to it. This shifts the security question: it is less about whether a model delivers good results than about what it can do in the worst case.
Practical consequences for development teams
- Isolate third-party repositories. Do not open unknown code on the workstation, but in a container or a virtual machine without access to credentials and other projects.
- Do not run agents with the main account. A separate user account or a container environment with the minimum necessary permissions considerably reduces the damage.
- Separate credentials. No long-lived tokens and keys in plain text in directories that an agent accesses. Short-lived credentials and a central secret store reduce the risk.
- Limit network access. An agent that can only establish outbound connections to approved destinations makes the exfiltration of data more difficult.
- Change the order. Check first, then start the agent – not the other way round.
- Prepare for rotation. Anyone who discovers that an agent has run in a third-party repository should be able to replace affected keys and tokens without this turning into a day-long project.
Governance instead of prohibition
Banning coding agents is neither enforceable nor sensible in most organisations – the productivity gain is real, and a ban only pushes usage into the shadows. What is more sustainable is a written policy: which tools are approved, in which environment they may run, which data they can see and who is to be informed in case of suspicion.
This also includes deliberately choosing the approval settings of the agents in use. Many tools offer modes in which commands are executed without prompting. That is convenient and, in the context of these reports, the riskiest variant.
Assessment
For web and software projects this means: the agent is not an editor with additional functions but an executing system and must be treated accordingly – with its own permissions context, limited network access and separate credentials. Anyone bringing agents into their development processes should plan the safeguarding of the working environment in the same project step, not catch up on it later.
The effort required for this is manageable, but the damage caused by a compromised developer account in an agency with multiple clients is not.
Sources
- AI agents automatically execute malicious git code on startup — heise developer News
- "This is crazy": OpenAI agents argue about ethics while hacking – and carry on regardless — t3n.de - News