2026-11-11 日报

AI Coding Agents Leak Thousands of Secrets to GitHub - Dark Reading

Darkreading

AI Coding Agents Leak Thousands of Secrets to GitHub - Dark Reading

"Nothing in the repo marks that file as private, so it gets committed with the rest of the code," the researchers explained. The fact that a routine development task creates a security exposure is dangerous for organizations, especially because these AI coding tools are supposed to be helpful, not harmful, notes Ryan McCurdy, vice president of marketing for database security firm Liquibase. “A developer approves a command to save time, the AI agent retains credentials as part of that approval, and those credentials can eventually end up in a public repository," he observes via email. "Nobody intended to expose them, but the workflow made it possible." ## Dead Zone of Exposure [...] Claude Code is not being overtly careless; it does try to protect files when it creates its .claude/settings.local.json file inside a Git repository, the researchers noted. The tool does this by adding the file to the developer's global Git ignore list, which tells Git to ignore the file on that particular developer's machine. This prevents it from being included in routine commits. However, the protection is not built into the development project itself, and the "ignore" rule does not travel with the repository when it is cloned onto another machine, the researchers noted. "The rule never goes into the repo's own .gitignore, so nothing travels with the project to protect it," they wrote. [...] Those approaches may be to make sure auto mode catches the exposure, or to build in basic secrets scanning, among other ideas that Anthropic will prototype "to understand the tradeoffs" before shipping something with its next version of Claude Code, Cherny said. Indeed, the leakage exposes how Claude Code's protection relies heavily on a developer-specific Git setting rather than a safeguard built into the project or the AI coding tool itself, exposing a gap that can turn an ordinary command approval into a persistent credential leak.

阅读原文