Skip to content

Commit cc83a1f

Browse files
committed
refactor(deep-scan)!: run plugin Deep Scans through the SDK
1 parent dbd6160 commit cc83a1f

58 files changed

Lines changed: 5171 additions & 12038 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.

‎docs/project-configuration.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,3 +348,11 @@ and applies its severity policy to recovered findings.
348348
Workflow identity records explicitly requested deep settings, not ambient values
349349
or shipped defaults, so changing those defaults does not prevent resumption.
350350
Changing the explicit request still requires a different workflow ID.
351+
352+
### Native executable selection
353+
354+
Native plugin sessions use `CODEX_CLI_PATH` when supplied, or a real `codex`
355+
executable on `PATH` (`codex.exe` on Windows). The selected executable must be
356+
outside the scan target. Windows npm shims, managed-package directories and
357+
desktop cache directories are no longer searched; set `CODEX_CLI_PATH` to the
358+
installed executable when it is not directly on `PATH`.
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
});

0 commit comments

Comments
 (0)