We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47c9c99 commit 0a9e2dbCopy full SHA for 0a9e2db
src/mcp_agent/cli/auth/main.py
@@ -16,7 +16,12 @@ def save_credentials(credentials: UserCredentials) -> None:
16
None
17
"""
18
credentials_path = os.path.expanduser(DEFAULT_CREDENTIALS_PATH)
19
- os.makedirs(os.path.dirname(credentials_path), exist_ok=True)
+ cred_dir = os.path.dirname(credentials_path)
20
+ os.makedirs(cred_dir, exist_ok=True)
21
+ try:
22
+ os.chmod(cred_dir, 0o700)
23
+ except OSError:
24
+ pass
25
26
# Create file with restricted permissions (0600) to prevent leakage
27
fd = os.open(credentials_path, os.O_WRONLY | os.O_CREAT, 0o600)
0 commit comments