Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

fix(deep-scan): run report comparisons without interactive tools (#2304)

Michael D'Angelo3e3cf3b5ebd5
diff --git a/plugins/codex-security/mcp-app/src/deep-scan/executor.ts b/plugins/codex-security/mcp-app/src/deep-scan/executor.ts
index 64e92ba1f..8c5b45a6d 100644
--- a/plugins/codex-security/mcp-app/src/deep-scan/executor.ts
+++ b/plugins/codex-security/mcp-app/src/deep-scan/executor.ts
@@ -226,6 +226,10 @@ export class CodexSdkWorkerExecutor implements CodexWorkerExecutor {
: {
web_search: "disabled",
project_doc_max_bytes: 0,
+ tools: {
+ experimental_request_user_input: { enabled: false },
+ update_plan: { enabled: false },
+ },
features: {
...(isRecord(runtimeSettings.config.features) &&
runtimeSettings.config.features),
@@ -234,6 +238,8 @@ export class CodexSdkWorkerExecutor implements CodexWorkerExecutor {
shell_tool: false,
view_image: false,
image_generation: false,
+ goals: false,
+ request_permissions_tool: false,
computer_use: false,
unified_exec: false,
code_mode: false,
diff --git a/sdk/typescript/tests-ts/cli-skill-native-config.test.ts b/sdk/typescript/tests-ts/cli-skill-native-config.test.ts
index d429eb54a..015b03970 100644
--- a/sdk/typescript/tests-ts/cli-skill-native-config.test.ts
+++ b/sdk/typescript/tests-ts/cli-skill-native-config.test.ts
@@ -540,7 +540,7 @@ test.each(["omitted", "omitted with changed gates", "explicit"] as const)(
};
try {
const { baseUrl } = await response();
- await writeCodexConfig(join(sharedHome, "config.toml"), {
+ const workerConfig = {
model_catalog_json: modelCatalog,
openai_base_url: baseUrl,
mcp_servers: {
@@ -549,7 +549,8 @@ test.each(["omitted", "omitted with changed gates", "explicit"] as const)(
cli_auth_credentials_store: "file",
features: { plugins: false },
analytics: { enabled: false },
- });
+ };
+ await writeCodexConfig(join(sharedHome, "config.toml"), workerConfig);
// The first worker initializes the executor's per-scan snapshot.
const { threadId, resumed, ...baseline } = await worker("discovery");
expect(threadId).toBeString();
@@ -564,6 +565,7 @@ test.each(["omitted", "omitted with changed gates", "explicit"] as const)(
);
expect(await worker("compare")).toMatchObject({
...baseline,
+ tools: [],
resumed: false,
});
const features =
@@ -585,8 +587,16 @@ test.each(["omitted", "omitted with changed gates", "explicit"] as const)(
resumed: true,
threadId,
});
+ await writeCodexConfig(join(sharedHome, "config.toml"), {
+ ...workerConfig,
+ mcp_servers: {
+ "codex-security": { url: `${baseUrl}/mcp`, enabled: false },
+ "fixture.catalog": { command: process.execPath, enabled: false },
+ },
+ });
expect(await worker("compare")).toMatchObject({
...baseline,
+ tools: [],
resumed: false,
});
} finally {
diff --git a/sdk/typescript/tests-ts/fixtures/stored-daybreak-workers.mjs b/sdk/typescript/tests-ts/fixtures/stored-daybreak-workers.mjs
index 9f70a2688..f8b88008f 100644
--- a/sdk/typescript/tests-ts/fixtures/stored-daybreak-workers.mjs
+++ b/sdk/typescript/tests-ts/fixtures/stored-daybreak-workers.mjs
@@ -97,6 +97,9 @@ try {
JSON.stringify({
threadId,
resumed: workerArgs.includes("resume"),
+ ...(request.kind === "compare" && {
+ tools: requests.at(-1)?.tools ?? [],
+ }),
program: requests.at(-1)?.access_programs?.cyber,
daybreak: config.daybreak ?? null,
daybreakFeatures: Object.fromEntries(