summaryrefslogtreecommitdiff
path: root/packages/core/src/code_assist/oauth2.ts
diff options
context:
space:
mode:
authorBrian de Alwis <[email protected]>2025-08-08 23:05:30 -0400
committerGitHub <[email protected]>2025-08-09 03:05:30 +0000
commit191cc01bf5833a4c7636f8fc4d9b4c5066982822 (patch)
tree177df5c66e7dea092e949f796a7f5d028c8e52af /packages/core/src/code_assist/oauth2.ts
parentc184ec32247bbbffb41ae96316a18b3a24257f0e (diff)
fix(core): restrict oauth_creds.json file permissions (#5245)
Co-authored-by: cornmander <[email protected]>
Diffstat (limited to 'packages/core/src/code_assist/oauth2.ts')
-rw-r--r--packages/core/src/code_assist/oauth2.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/core/src/code_assist/oauth2.ts b/packages/core/src/code_assist/oauth2.ts
index f1046416..dc1ec490 100644
--- a/packages/core/src/code_assist/oauth2.ts
+++ b/packages/core/src/code_assist/oauth2.ts
@@ -366,7 +366,7 @@ async function cacheCredentials(credentials: Credentials) {
await fs.mkdir(path.dirname(filePath), { recursive: true });
const credString = JSON.stringify(credentials, null, 2);
- await fs.writeFile(filePath, credString);
+ await fs.writeFile(filePath, credString, { mode: 0o600 });
}
function getCachedCredentialPath(): string {