NeuroAI NEUROAINEUROAI.SITE
China AI, reported clearly
1,300+ verified stories on models, robotics, BCI and the business of AI.
Browse stories
ESC

An AI Agent Wrote the Code, and Committed the Key With It

An AI coding agent committed a credential that opened a private repository, exposing prompt samples sent to three models in June and July; AWS shipped an API for cutting agent permissions on demand.

2026-11-22 · 4754 words · NeuroAI
An AI Agent Wrote the Code, and Committed the Key With It

A commit came back with one extra line in it.

That was Together AI's public repository, xorl. The line was written by an AI coding agent doing its job: committing code. The extra line was a credential.

Three Models, Four Days of Samples

The incident ran through June and July. The disclosure landed on November 21.

The post is titled plainly: a security event, prompt leakage for requests in June and July of 2026. It is signed by chief executive and co-founder Vipul Ved Prakash, and the second paragraph contains an apology.

What leaked was prompt samples, collected during routine software testing, with authorization, and stored in a private Hugging Face repository. They came from requests to three models: MiniMax M3, GLM-5.2 and Kimi K2.6. The dates are specific: mainly June 24, July 4, July 8 and July 14. Four days, three models.

From June 24 to November 21 is 150 days; counting from July 14, 130. The data sat in that repository in July, nobody has said which day the door was pushed open, and the disclosure came in November. For those months, people kept sending requests, with no way to know what had been stored.

The Scanner Was Late

By the company's account, an AI coding agent committed a credential along with its code, and that credential opened the private repository. Automated scanning caught it and the commit was reverted.

But in the exposure window, someone got there first.

They downloaded the stored samples, then searched those prompts for credentials to other services and tested each one. The second move is the telling one: it shows the party knew what such samples usually contain. Five of the credentials tested were canaries planted by Dragos, a security firm running an experiment designed to reveal exactly this: someone using a key that is not theirs.

The post says the company engaged an external forensics firm and notified law enforcement, found no evidence of leakage beyond this incident, and that it understands the data has since been deleted.

Why the Key Walked In

The interesting part is not that another leak happened. It is how a key travels with code.

An agent edits files, runs tests and commits. It can read environment variables, configuration files, and a credential file someone left in the project directory. If it can read them, it can write them into a commit. People make the same mistake; the difference is volume. An engineer commits a few times a day, an agent dozens of times an hour, and it has no idea what it just handed over. It only knows the tests passed.

The net supposed to catch this is scan-and-revert: by the time the scanner matches a string that looks like a key, the credential is already in a public repository, and the scan cannot tell which door that string opens. Hence the fix is less about scanning harder than about storing less.

A Smaller Key, Cut on Demand

The industry response arrived a day earlier than the disclosure.

On November 20, an AWS security blog introduced STS GetScopedCredentials. Take the temporary credentials you already hold, and exchange them for a copy with narrower permissions.

There are hard limits on how narrow. One inline scope-down policy per request, capped at 2,048 characters; at most three such policies per session, each intersecting with the ones before it; a requested duration no longer than what remains of the calling session; and a quota of 200 requests per second per account in each region. The result keeps the caller's identity, including role session name and tags, so CloudTrail still shows who started the work. Recursion works too, provided every earlier policy allows the API itself.

The point is smaller, not stricter. The old pattern handed out one large key and relied on people not leaving it around. The new one cuts a small key per task and lets it expire. What that saves is not money but blast radius: if a key that can only read one storage bucket leaks, the worst case is that bucket.

Four Fixes, One Direction

Together AI's four changes point the same way: scoped or short-lived credentials with keyless access where supported; checking every pull request for credentials; zero data retention by default for new accounts; updated development rules for AI coding agents.

The first shrinks the key. The second searches people at the door. Keyless access means no long-lived credential sits on the machine; the workload exchanges for a short one each time, on the strength of its environment identity. Adoption has been slow because it touches deployment, permissions and auditing at once.

The third is the easiest to skip. Zero data retention means nothing is stored after the request, not even debugging samples. No stored batch, no door to open. The price is harder debugging.

The Next Commit Is Coming

The post does not say how many samples were downloaded, or who did it. The review continues.

What is certain is that the next commit will come.

The advice to customers is a single line: if you handle sensitive prompts, turn on zero data retention in your settings. That moves part of the responsibility outward. The platform retains by default; the customer switches it off. The awkward part is that customers often do not know the switch exists until they read about it in a disclosure.

Every team handing code to an agent runs into the same question: how much permission to grant. Too little and the agent cannot work. Too much and it commits the permission along with the code. The AWS API answers half of it. The other half sits in process: who may merge, what gets read before merging, and whether a person can be traced after something goes wrong.

Half is not a solution.

Disclaimer: This article is based on public information and is for reference only; it is not investment advice.

Related coverage

Cite this article

NeuroAI (脑机网), "An AI Agent Wrote the Code, and Committed the Key With It," 22 November 2026, https://neuroai.site/a/na-corp-ai-key-commit-1122

Machine-readable: BibTeX · RIS · JSON · Markdown

More in “Companies & Stack” → · Back to home · Markdown version

China AI, reported clearly
1,300+ verified stories on models, robotics, BCI and the business of AI.
Browse stories