Repository navigation
Warn when .env can be read by other users (roadmap 4.10) - #30
Merged
Merged
Conversation
The file holds every API key and the web password. Loading a loose one prints one warning to stderr with the fix, and never the file's contents. Story: PDX-37 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Story: PDX-37
Loading a
.envthat group or others can access prints one warning to stderr with thechmod 600fix, and never the contents. The file still loads. Platforms without POSIX modes skip the check.Limits
It's a warning, not a refusal. A container's
env_fileis read by Docker, so this doesn't see it. On Docker Desktop or mounted filesystems modes can read as loose, which would give a false warning.Tested
Full suite passes locally; see CI for other versions. Tests cover 600 (quiet), 644, 640 and 604 (one warning, no contents, still loads), and no POSIX modes (quiet). With the warning removed the test fails, and it passes with the code intact. Live on the real CLI with a temp home: warned at 644, quiet at 600. With a 644 file,
paradox mcpanswered a ping with protocol-only stdout.Not tested
Real Windows, or a mounted filesystem.
🤖 Generated with Claude Code