{
  "id": 21200620,
  "title": "Claude Code Has Been Leaking Secrets Through Its \"Don't Ask Again\" Feature",
  "url": "https://urgent.news/2026/11/22/claude-code-has-been-leaking-secrets-through-its-dont-ask-again",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-22T11:00:00.000Z",
  "source": {
    "name": "InfoQ",
    "slug": "infoq",
    "url": "https://www.infoq.com/news/2026/11/claude-code-leaking-secrets/"
  },
  "original_language": "en",
  "account": "Claude Code, an agentic tool developed by Apiiro, has been exposed for leaking sensitive information in public repositories. The issue arises from the way Claude Code stores secrets locally to enable the \"Don't Ask Again\" feature. When developers approve a shell command by agreeing \"Yes, and don’t ask again,\" the command is saved permanently in a configuration file (.claude/settings.local.json), potentially exposing credentials, passwords, and API tokens.\n\nThe problem is compounded by the fact that the rule is not included in the repository's .gitignore, meaning it is not excluded from the project when cloned or committed. This oversight leaves the secrets vulnerable, as the file may be transferred to other machines or become part of a new repository.\n\nApiiro discovered 2,282 secrets in total, including cloud API keys, production passwords, access tokens, and npm tokens, affecting 63 organizations. Unfortunately, generic secret scanners like gitleaks and TruffleHog were unable to detect all the exposed secrets, as they were embedded within shell commands.\n\nThe security gap extends beyond the configuration file, as Claude Code stores transcripts, memory files, handoff notes, and agent chat transcripts, which could potentially contain the same sensitive information. Apiiro also warns that this vulnerability could provide malware with a list of systems the developer can reach and access, making it a significant security concern.\n\nGitGuardian corroborated Apiiro's findings, identifying 31,088 secrets in Claude Code’s .claude/settings.local.json on public GitHub, with 5,343 still valid at the time of detection. Additionally, the security firm found 613 secrets in Docker Hub images.\n\nThe issue has sparked discussions within the developer community, with some users opting to exclude AI-related files from their projects and turn off AI memory features. Apiiro recommends removing the file from version control using git rm --cached .claude/settings.local.json, adding it to the repo's .gitignore, rotating credentials, and inspecting the file to delete any rules containing secrets. Instead of directly typing secrets, the researchers advise using environment variables.",
  "summary": "Agentic security firm Apiiro found that Claude Code has been exposing secrets in public repositories due to how it stores them in local file on developers' machines to implement \"Don't Ask Again\". The company identified 1,122 secrets in claude/settings.local.json files and another 1,160 in git history, in the shared settings.json, and in agent chat transcripts stored in repos. By Sergio De Simone",
  "key_points": [
    "Claude Code leaks secrets through \"Don't Ask Again\" feature.",
    "Secrets include cloud API keys, passwords, and tokens.",
    "Apiiro identifies 2,282 secrets in 63 organizations."
  ],
  "editors_take": "Automating command approvals through local configuration files creates a massive security blind spot that bypasses standard detection tools and exposes sensitive credentials to anyone accessing public repositories.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}