Skip to content

Commit a3e4c7a

Browse files
authored
Fix "Could not save the Codex Security scan" (#67)
Fix Windows security scans by enabling the unelevated sandbox backend in the default Codex configuration. This allows named filesystem permission profiles to access the target repository and write scan artifacts while preserving explicit sandbox overrides. Adds regression coverage for the default and override behavior.
1 parent 30af437 commit a3e4c7a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

sdk/typescript/src/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ export const DEFAULT_CODEX_CONFIG: Readonly<JsonObject> = {
3333
max_concurrent_threads_per_session: 9,
3434
},
3535
},
36+
// Named filesystem profiles need an active Windows sandbox backend.
37+
windows: {
38+
sandbox: "unelevated",
39+
},
3640
};
3741

3842
deepFreezeJson(DEFAULT_CODEX_CONFIG);

sdk/typescript/tests-ts/config.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ describe("Codex configuration", () => {
3232
codexOverrides: {
3333
features: { multi_agent_v2: { max_concurrent_threads_per_session: 4 } },
3434
model_reasoning_effort: "high",
35+
windows: { sandbox: "elevated" },
3536
},
3637
});
3738
expect(merged["features"]).toEqual({
@@ -45,6 +46,7 @@ describe("Codex configuration", () => {
4546
expect(merged["agents"]).toBeUndefined();
4647
expect(merged["model"]).toBe("gpt-5.6-sol");
4748
expect(merged["model_reasoning_effort"]).toBe("high");
49+
expect(merged["windows"]).toEqual({ sandbox: "elevated" });
4850
});
4951

5052
test("rejects prototype-bearing override keys", async () => {
@@ -92,6 +94,9 @@ describe("Codex configuration", () => {
9294
expect(await mergedCodexConfig({})).toMatchObject({
9395
model: "gpt-5.6-sol",
9496
model_reasoning_effort: "xhigh",
97+
windows: {
98+
sandbox: "unelevated",
99+
},
95100
});
96101
});
97102

0 commit comments

Comments
 (0)