mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 12:15:57 +00:00
fix: create explicit CODEX_HOME with secure permissions (#1380)
This commit is contained in:
@@ -222,7 +222,7 @@ function prepareExplicitCodexHome(
|
||||
}
|
||||
|
||||
try {
|
||||
fs.mkdirSync(codexHome, { recursive: true });
|
||||
fs.mkdirSync(codexHome, { mode: 0o700, recursive: true });
|
||||
} catch (err) {
|
||||
const error = err as NodeJS.ErrnoException;
|
||||
if (error.code !== 'EEXIST') {
|
||||
|
||||
@@ -596,7 +596,9 @@ process.exit(0);
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
expect(fs.existsSync(freshCodexHome)).toBe(true);
|
||||
expect(fs.statSync(freshCodexHome).isDirectory()).toBe(true);
|
||||
const codexHomeStat = fs.statSync(freshCodexHome);
|
||||
expect(codexHomeStat.isDirectory()).toBe(true);
|
||||
expect(codexHomeStat.mode & 0o777).toBe(0o700);
|
||||
expect(readLoggedCodexCalls(codexArgsLogPath)).toEqual([
|
||||
['-c', 'model="gpt-5"', '--version'],
|
||||
['-c', 'model_reasoning_effort="high"', 'fix failing tests'],
|
||||
|
||||
Reference in New Issue
Block a user