Skip to content

Conversation

@bbakersmith
Copy link

Currently, configuration files under ~/.mcp-auth/ are created with 644 permissions which allows all users to read the contents. These files contain OAuth tokens and PKCEs which should not be accessible to anyone but the user they belong to.

This PR changes those file permissions to 600 so that only the current user can read them.

Copy link

@clouatre clouatre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested locally on macOS.

Testing:

  • ✅ All unit tests pass (44/44)
  • ✅ Build succeeds without errors
  • ✅ Code change is minimal and correct
  • ✅ Verified current files are indeed 644 (world-readable)

Security Assessment:
This fixes a real security issue. OAuth tokens in ~/.mcp-auth/ are currently
world-readable (644), allowing any local user to steal credentials and access
Atlassian instances.

Code Quality:

  • Follows Node.js fs.writeFile API correctly
  • Applied consistently to both writeJsonFile and writeTextFile
  • No breaking changes
  • Matches security best practices for credential storage

LGTM! This should be merged, especially for users on shared/corporate systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants