Agent transcripts are the new .env: how the Cursor and Notion leaks happened
Cursor's update on its October incident and Notion's advisory describe leaks that went through AI agent transcripts, not .env files. An attacker used an access key that Cursor had issued to Fireworks[1], a vendor it used for training and inference, to copy a bucket of coding-agent traces, mostly from 2025, and some of those traces contained unredacted credentials. Those credentials led to a malicious copy of the Claude Code[2] extension placed in the cache behind Cursor's extension marketplace, which up to 5,000 people could have installed in roughly 11 hours. The same Fireworks incident reached Notion, which revoked Notion API keys it found in affected users' AI chat messages.
Credentials get into transcripts when an agent prints a .env file, when an error message echoes a token, or when a password is typed into a command. Claude Code saves an approved command, password included, in .claude/settings.local.json; git excludes this file from commits, but docker build, zips and synced folders copy it. Transcripts also spread to backups, packages, training data and model providers, and an attacker with access to a laptop can read them, since the Shai-Hulud[3] worm scanned developers' machines for GitHub tokens and cloud keys.
Redaction alone is not enough: secret scanners match formats, and agents transform secrets by encoding or splitting them. The main advice is to keep long-lived keys out of the agent's environment and give it short-lived, narrowly scoped credentials, such as a GitHub App token that expires after an hour or an AWS session from AssumeRole[4] that lasts from 15 minutes up to the role's maximum. Secrets should be referenced by variable name, such as "$DATABASE_URL", rather than typed into commands.
Read the original kosem.aiDiscussion
Discussion
Commenters mostly agree on the basic fixes: denying agent reads of .env files with permissions.deny, injecting secrets at run time with op run or doppler, and using short-lived scoped tokens. Some suggest scanning the transcript folder with gitleaks or trufflehog and rotating anything found, while others note that deny rules don't cover text from a logged-in browser, failed curl logs or mcp.json. One commenter says their setup hashes and strips tool output before it reaches disk, at the cost of not being able to replay sessions exactly.
Sources
-
kosem.ai
Agent transcripts are the new .env


