-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
area:securityarea:toolsbugSomething isn't workingSomething isn't workingplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
Claude Code does not respect .gitignore when reading files. It reads .env containing sensitive credentials (tokens, passwords), then hardcodes
them directly into inline Python scripts shown in conversation history.
Expected behavior: Files listed in .gitignore (especially .env) should be treated as sensitive. Claude Code should never read credentials and
paste them into scripts or conversation output.
Actual behavior: Claude Code freely reads .env, extracts secrets, and embeds them in plaintext commands.
What Should Happen?
ask me how to do
Error Messages/Logs
Steps to Reproduce
Afetr 3 time plam , jsut tell any thing you needd totdo read some data. hi willl directy ren .env
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.34
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:securityarea:toolsbugSomething isn't workingSomething isn't workingplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS