Skip to content

Commit 885bf9b

Browse files
refactor(deep-scan)!: unify execution and durable result recovery (#1123)
Consolidate Deep Scan changes and their reviewed follow-up fixes into the parent topic branch.
1 parent d660627 commit 885bf9b

270 files changed

Lines changed: 36753 additions & 62924 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/node-ci.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,10 @@ jobs:
427427
pnpm --dir plugins/codex-security/mcp-app install --frozen-lockfile
428428
- name: Build and test the standalone host runtime
429429
run: node --test plugins/codex-security/mcp-app/scripts/test_host_build.mjs
430+
- name: Test native executable discovery
431+
run: node --test plugins/codex-security/mcp-app/tests/test_native_executable.mjs
432+
- name: Test native scans and permissions
433+
run: node --test plugins/codex-security/mcp-app/tests/test_native_scan.mjs plugins/codex-security/mcp-app/tests/test_native_permissions.mjs
430434

431435
plugin-source:
432436
name: plugin source contracts

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ packages and releases. Do not edit or commit files in that directory. See the
1616
commands.
1717

1818
Model-based evaluations live in [`evals/`](evals/README.md), outside the plugin
19-
source. Deterministic triage checks and the MCP reducer IPC regression remain
20-
part of normal CI.
19+
source. Deterministic triage checks remain part of normal CI.
2120

2221
Search [existing issues](https://github.com/openai/codex-security/issues)
2322
before opening a new one.

‎docs/project-configuration.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,3 +350,12 @@ and applies its severity policy to recovered findings.
350350
Workflow identity records explicitly requested deep settings, not ambient values
351351
or shipped defaults, so changing those defaults does not prevent resumption.
352352
Changing the explicit request still requires a different workflow ID.
353+
354+
### Native executable selection
355+
356+
Native plugin sessions use `CODEX_CLI_PATH` when supplied. Otherwise they search
357+
for a real `codex` executable on `PATH` (`codex.exe` on Windows). Windows also
358+
supports managed-package installations, npm package binaries beside `PATH`
359+
entries, and desktop package caches. WindowsApps aliases are skipped. The
360+
selected executable must be outside the scan target and reference-document
361+
repositories. Set `CODEX_CLI_PATH` to select an installed executable explicitly.

‎evals/README.md‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ being embedded in its source tree or shipped npm runtime.
55

66
- [Triage finding](triage-finding/README.md): Promptfoo input contracts, OSS
77
calibration, and SastBench. This suite owns its private package and lockfile.
8-
- [Deep reducer](deep-reducer/README.md): optional model evaluation of real IPC
9-
size-limit recovery, pagination, and finding retention. It reuses the MCP
10-
test helpers and dependencies.
11-
- [Secret discovery](secret-discovery/README.md): checks whether the production
12-
core audit finds synthetic credentials in source and keeps them in its final
13-
findings, with deterministic grading and harness checks.
148

9+
- [Secret discovery](secret-discovery/README.md): checks synthetic credential
10+
discovery with deterministic grading and harness checks.
1511
- [Completed-report merge](../sdk/typescript/scripts/merge-eval/README.md):
1612
synthetic grouping quality checks and negative controls.
1713

1814
Model runs are opt-in. CI runs the deterministic triage and secret-discovery
19-
helper checks and the real-IPC reducer regression through the normal MCP test
20-
suite.
15+
helper checks. The SDK test suite includes the completed-report merge oracle
16+
and its negative controls.

‎evals/deep-reducer/.gitignore‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎evals/deep-reducer/README.md‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎evals/deep-reducer/run.mjs‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎plugins/codex-security/mcp-app/artifact-writer-main.ts‎

Lines changed: 0 additions & 110 deletions
This file was deleted.
Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2-
import { createCodexSecurityArtifactWriterServer } from "./artifact-writer-main.js";
32
import { createCodexSecurityServer } from "./server.js";
43

54
async function main(): Promise<void> {
6-
const artifactWriter = process.argv.includes("--artifact-writer");
7-
const server = artifactWriter
8-
? await createCodexSecurityArtifactWriterServer()
9-
: createCodexSecurityServer();
5+
const server = createCodexSecurityServer();
106
await server.connect(new StdioServerTransport());
117
let closing = false;
128
const close = async (exitCode?: number): Promise<void> => {
139
if (closing) return;
1410
closing = true;
1511
if (exitCode !== undefined) process.exitCode = exitCode;
1612
await server.close().catch((error: unknown) => {
17-
console.error(
18-
artifactWriter
19-
? "Codex Security artifact writer failed to close:"
20-
: "Codex Security MCP server failed to close:",
21-
error,
22-
);
13+
console.error("Codex Security MCP server failed to close:", error);
2314
});
2415
};
2516
process.stdin.once("end", () => void close());
@@ -28,11 +19,6 @@ async function main(): Promise<void> {
2819
}
2920

3021
main().catch((error) => {
31-
console.error(
32-
process.argv.includes("--artifact-writer")
33-
? "Codex Security artifact writer failed to start:"
34-
: "Codex Security MCP server failed to start:",
35-
error,
36-
);
22+
console.error("Codex Security MCP server failed to start:", error);
3723
process.exitCode = 1;
3824
});

‎plugins/codex-security/mcp-app/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
},
1212
"dependencies": {
1313
"@modelcontextprotocol/sdk": "^1.30.1",
14-
"@openai/codex-sdk": "0.162.0-alpha.9",
15-
"smol-toml": "1.9.0",
1614
"zod": "^4.6.5"
1715
},
1816
"devDependencies": {
1917
"@types/node": "^26.6.3",
2018
"esbuild": "^0.28.2",
2119
"prettier": "3.9.9",
20+
"smol-toml": "1.9.0",
2221
"typescript": "^7.0.2"
2322
}
2423
}

0 commit comments

Comments
 (0)