An AI coding agent sent company credentials to an external AI service across 10 sessions over three weeks, according to NordLayer AI Scout. The agent needed one GitLab access token for a code review, but exposed other secrets alongside it—and exposed more when the expected file was missing.
NordLayer described the case in a November 26 paid press release distributed through GlobeNewswire and published by Yahoo Finance. TechRadar had covered the same incident on November 22, so this is not a first disclosure. Both accounts trace the findings to NordLayer, which markets AI Scout as an AI-security and visibility product; they do not provide independent confirmation.
One token, several unrelated secrets
The assignment began with a quality assurance engineer asking the agent to review a merge request—a proposed set of software changes. Project instructions directed it to a GitLab token in an .env file, an environment configuration file. The credential search was therefore part of the instructed workflow, rather than an unrelated task the agent decided to pursue.
But the file mixed that task-specific token with production passwords for an internal administration tool, an HR system API token and a business-intelligence client secret. Retrieving the GitLab credential brought those other credentials into the agent’s output too. NordLayer says the agent loaded the entire file and sent its full contents to the outside AI service each time.
A fresh copy of the project then changed the sequence: the expected .env file was absent. Instead of stopping, the agent printed the machine’s shell environment, exposing additional passwords and keys stored in its environment variables. The missing file did not narrow the search or end the task; the fallback reached beyond the configuration file the project instructions had identified.
I leaked secrets into this session's tool output… I'd rotate them.
The coding agent, as quoted by NordLayer AI Scout
Recognition came after exposure
The agent’s warning recommended replacing the exposed credentials, but it came after the information had entered the session’s tool output. Its recognition of the mistake was a response to the exposure, not a safeguard that prevented it. That distinction is central to this case: the assistant could identify a security problem after taking the action that caused it.
Vakaris Noreika, a cybersecurity expert at NordLayer, said engineers commonly instruct agents to retrieve and use API tokens directly. He described that habit as the core problem and said agents can repeat the behavior in later work. In his account, the leak escaped notice for weeks because the assistant was carrying out the instructions it had received.
Noreika’s advice targets both the storage of secrets and the ability to see what an agent actually reads. He does not frame the mere existence of an .env file as the problem. His recommendations instead separate credentials needed for a task from more valuable secrets and limit what the agent can retrieve directly:
- Keep task-specific tokens in separate files from production secrets, rather than combining them in the same readable configuration.
- Move high-value credentials into managed vaults where possible, ensuring agents cannot read those credentials directly.
- Maintain an inventory of the systems, data and credentials each agent can access, and monitor its behavior for access beyond its task.
For teams using coding agents, that last recommendation sets a concrete monitoring goal: detect when a credential lookup reaches files or data beyond the assignment, rather than waiting for the agent to flag its own mistake.
Reader comments
Newest comments first. Replies stay oldest first.