Post

Your secrets are leaking to AI coding agents (and how to stop it)

AI coding agents inadvertently leak secrets by consuming entire developer repositories, including .env files and credentials, which are then transmitted unredacted in prompts to model providers and stored in logs. The article details real attacks, particularly the Mini Shai-Hulud supply chain attack designed to harvest 80+ environment variables and 130+ file paths including ~/.aws/credentials, ~/.npmrc, and database strings from agent context windows. The core vulnerability is architectural: secrets scattered across provider and gateway logs cannot be remediated like git-committed secrets, and agent context has become a high-value attack target. Effective mitigation requires multi-layered secrets detection at the IDE, agent, and PR levels using pattern matching for 450+ secret patterns, rather than relying on model-side judgment to filter sensitive data.

Read original article

This post is licensed under CC BY 4.0 by the author.