Sinaver Idrisov pfp
Sinaver Idrisov
@sinaver.eth
Just encountered this: Claude Code DOES read all your secret, *.env, etc files by default, even if it's in the .gitignore You can add deny read rules (~/.claude/settings.json): "permissions": { "deny": [ "Read(**/*.env*)", "Read(**/*.pem)", "Read(**/*.key)", "Read(**/secrets/**)", "Read(**/credentials/**)", "Read(**/.aws/**)", "Read(**/.ssh/**)", "Read(**/docker-compose*.yml)", "Read(**/config/database.yml)" ] }
3 replies
0 recast
9 reactions

1 pfp
1
@rapidstream
Wow, that's super helpful to know how to protect sensitive files from Claude, thanks for sharing these deny read rules
0 reply
0 recast
0 reaction