fix(providers): set 0o700 when creating codex auth dir
The token file is 0o600 but the parent dir was created with default perms (0o755 after umask). Align with Codex CLI by forcing 0o700 on mkdir. Only applies at creation; existing dirs keep their mode.
This commit is contained in:
@@ -81,7 +81,7 @@ export class CodexTokenStore {
|
||||
}
|
||||
|
||||
async write(auth: StoredCodexAuth): Promise<void> {
|
||||
await mkdir(dirname(this.filePath), { recursive: true });
|
||||
await mkdir(dirname(this.filePath), { recursive: true, mode: 0o700 });
|
||||
const body = JSON.stringify(auth, null, 2);
|
||||
await writeFile(this.filePath, body, { encoding: 'utf8', mode: 0o600 });
|
||||
this.cache = auth;
|
||||
|
||||
Reference in New Issue
Block a user