# Claude Code Approval Files Expose Thousands of Secrets

> Claude Code’s persistent approval setting can write secrets like API keys into plaintext project files, risking exposure if the repository is shared.

- Type: AI news
- Page: https://completeaitraining.com/news/claude-code-approval-files-expose-thousands-of-secrets/
- Published: 2026-11-09
- Updated: 2026-11-08
- Author: Jeroen Erne
- Jobs: Customer support, Healthcare, Insurance, IT and development, Legal, Product development
- Reading time: 1 min

Researchers identified a security risk in Claude Code’s persistent approval setting. When enabled, the feature can write full command strings into plaintext project files. Those files may contain hardcoded credentials, API keys, or other secrets. If the repository is then shared or made public, the exposed data becomes accessible to anyone with access to the codebase.

The finding affects teams across customer support, healthcare, insurance, legal, IT, and product development where agent-generated configuration files are committed without review. The plaintext storage means standard repository sharing workflows can inadvertently distribute sensitive credentials outside the organization.

Organizations are advised to implement secret scanning on all repositories, enforce least-privilege tool access for AI coding agents, and require explicit human review of agent-generated configuration files before they are committed or shared.

---

This is the Markdown form of https://completeaitraining.com/news/claude-code-approval-files-expose-thousands-of-secrets/. The whole site is mapped at https://completeaitraining.com/llms.txt.
