From 742ae02d283b898ffa5e7b38bf1d2f4d83cefcd4 Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Wed, 21 Oct 2026 14:55:26 -0700 Subject: [PATCH] test: update test_ensure_token_dir for 0o700 mode Co-authored-by: Cursor --- .../llms/github_copilot/test_github_copilot_authenticator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/llms/github_copilot/test_github_copilot_authenticator.py b/tests/unit/llms/github_copilot/test_github_copilot_authenticator.py index 21d4901cf81..99b7ca67464 100644 --- a/tests/unit/llms/github_copilot/test_github_copilot_authenticator.py +++ b/tests/unit/llms/github_copilot/test_github_copilot_authenticator.py @@ -56,7 +56,8 @@ class TestGitHubCopilotAuthenticator: patch("os.makedirs") as mock_makedirs, ): auth = Authenticator() - mock_makedirs.assert_called_once_with(auth.token_dir, exist_ok=True) + # credentials dir must not be group/world-accessible + mock_makedirs.assert_called_once_with(auth.token_dir, mode=0o700, exist_ok=True) def test_get_github_headers(self, authenticator): """Test that GitHub headers are correctly generated."""