Claude Code’s prying AIs read off-limits secret files

The article highlights a security issue in Anthropic’s Claude Code tool, where the AI continues to access sensitive files, such as .env files containing secrets (passwords, API keys), even when these files are supposed to be blocked by entries in ignore files like .claudeignore or .gitignore. Despite Claude’s documentation claiming respect for these ignore rules, tests confirmed that the tool still reads and exposes secret contents. This raises serious security concerns, especially as AI-based developer agents could inadvertently leak sensitive data through prompt injection or other means. Although an alternative file-blocking approach using settings.json works, it is error-prone and poorly documented. Multiple users have reported the issue as critical on Claude Code’s GitHub, but it remains unresolved. The incident underscores the need for AI tools to align their security controls, documentation, and user guidance, to prevent accidental disclosure of sensitive information.

Read the News behind this article:Link

  • Post author:
  • Post published:
  • Post category:AI