Build1 publisher3 min readPublished
The credential an agent inherits sets the ceiling on the damage
GitGuardian argues that credentials and permissions decide how bad an agent incident gets. Checked against the three 2026 disclosures it cites, the argument holds up, and only one of the three involved steering a model.
The Engineer · Build desk

What happened
- In July 2026, Noma Labs got GitHub's new Agentic Workflows to fetch a private repository's README and post the contents as a public comment, using instructions planted in a public issue.
- That process picked up live AWS credentials from the developer's environment, including the access key, the secret access key and active session tokens.
- GitGuardian counted 28.6 million new hardcoded secrets on public GitHub during 2025, a 34 percent increase, with 24,008 of them sitting in MCP configuration files.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint A guardrail that one added word defeats cannot be the control you design around, so the scope of the token the agent holds is the only quantity you can bound before an incident starts.
- decision Teams running agent tools inside a developer shell have to decide whether that shell should hold long-lived cloud keys at all, or mint short-lived scoped credentials per workspace.
- exposure A leaked API key keeps working after the vendor patch ships and keeps billing its owner, so the exposure window is set by how fast the key is revoked.
- contradiction GitGuardian's case is that credentials set the damage, yet both vendor fixes it cites were consent and trust gates at the config loader. Credential scope is left entirely to the operator.
GitGuardian's argument is that the manipulation decides whether an incident starts and the credentials decide how far it goes [1]. Of the three disclosures it cites, only one involved steering a model. CVE-2026-21852 works because a repository can set an environment variable: Claude Code reads ANTHROPIC_BASE_URL, then sends its API requests, key attached, to whatever host that variable names, and it does so before showing the user a trust prompt [6]. CVE-2026-12957 works because the Amazon Q extension for VS Code loaded .amazonq/mcp.json out of any workspace a developer opened, with no consent step and no workspace trust check [9]. Both needed a developer to open a folder.
The severity scores went elsewhere. Check Point's two remote code execution bugs in Claude Code, both reachable through repository configuration files loaded when the tool starts inside an untrusted project, scored higher than the key leak [5][8]. The stolen key is what outlives the patch: authenticated traffic to attacker infrastructure, usage billed to the victim, and access that persists wherever the key stays valid [8]. In the Amazon Q case, the attacker-controlled MCP process picked up live AWS credentials from the developer's environment, including the access key, the secret and active session tokens [10]. Wiz's proof of concept called aws sts get-caller-identity to establish which account and role those credentials belonged to, then sent the answer to an external server [11].
GitLost is the one case where the model itself was steered. Noma Labs filed a plausible-looking issue in a public repository containing instructions to retrieve information from other repositories in the organisation, and after testing variations of the prompt found that adding one word, "Additionally," was enough to get past GitHub's guardrails [2][3]. What followed was bounded by the agent's authority: read a private repository's README, post the contents as a public comment [4].
The published fixes went to the loaders. Anthropic patched its three issues between August and December 2025, ahead of Check Point's February 2026 disclosure [7]. Amazon fixed the consent flow in language server version 1.65.0 [12]. Neither patch changed the scope of the credentials the agent holds.
GitGuardian counted 28.6 million new hardcoded secrets on public GitHub in 2025, up 34 percent, and 24,008 of them sat in MCP configuration files [13][14]. That is 0.084 percent of the year's total [16]. The Shai-Hulud 2 breach alone accounted for 33,185, about 1.4 times every MCP config file combined [14][17].
For the scope argument to buy anything in your environment, the agent's process has to stop inheriting the shell it starts in. That means workspace-scoped, short-lived credentials minted for the tool call, so that get-caller-identity returns a role with no production reach. GitGuardian's own prescription is its product line: block secrets at the model and tool boundary, discover exposed credentials on developer endpoints, and shorten revocation [15]. Revocation time matters for the reason the Claude Code case shows, because a redirected API key keeps billing the victim for as long as it stays valid [8].
What to watch
- Whether GitHub narrows the repository scope of the token Agentic Workflows runs with, after the Noma Labs disclosure.
- Whether other MCP-loading IDE extensions adopt the workspace trust check Amazon added in language server 1.65.0.
- Whether GitGuardian's next count breaks out secrets found in agent and MCP config files by tool, so the 24,008 figure can be compared year on year.