@openai/codex-security 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundled_plugin/.codex-plugin/plugin.json +5 -5
- package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
- package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
- package/_bundled_plugin/mcp/permission-profile-preflight.mjs +13 -20
- package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
- package/_bundled_plugin/references/final-report.md +1 -1
- package/_bundled_plugin/schemas/coverage.schema.json +45 -126
- package/_bundled_plugin/schemas/findings.schema.json +140 -427
- package/_bundled_plugin/schemas/patch-risk-assessment.schema.json +106 -119
- package/_bundled_plugin/schemas/scan-manifest.schema.json +73 -188
- package/_bundled_plugin/scripts/finalize_scan_contract.py +7 -6
- package/_bundled_plugin/scripts/generate_rank_input.py +25 -106
- package/_bundled_plugin/scripts/report_projection.py +35 -13
- package/_bundled_plugin/scripts/workbench_cli.py +9 -6
- package/_bundled_plugin/scripts/workbench_db.py +51 -16
- package/_bundled_plugin/scripts/workbench_publication.py +216 -247
- package/_bundled_plugin/scripts/workbench_scan_usage.py +173 -10
- package/_bundled_plugin/scripts/workbench_validation.py +15 -1
- package/_bundled_plugin/shared/workbench-migrations.json +17 -0
- package/_bundled_plugin/skills/deep-security-scan/SKILL.md +1 -1
- package/_bundled_plugin/skills/deep-security-scan/agents/openai.yaml +1 -1
- package/_bundled_plugin/skills/security-diff-scan/agents/openai.yaml +1 -1
- package/_bundled_plugin/skills/security-scan/SKILL.md +1 -1
- package/_bundled_plugin/skills/security-scan/agents/openai.yaml +1 -1
- package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +1 -1
- package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +2 -0
- package/_bundled_plugin/skills/track-findings/SKILL.md +8 -4
- package/_bundled_plugin/skills/track-findings/agents/openai.yaml +1 -1
- package/_bundled_plugin/skills/track-findings/references/github-security-advisories.md +1 -1
- package/dist/api.d.ts +3 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +212 -3
- package/dist/api.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +15 -5
- package/dist/cli.js.map +1 -1
- package/dist/component-plan.js +1 -1
- package/dist/component-plan.js.map +1 -1
- package/dist/component-scan.d.ts.map +1 -1
- package/dist/component-scan.js +5 -4
- package/dist/component-scan.js.map +1 -1
- package/dist/contract.d.ts +1 -0
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +4 -3
- package/dist/contract.js.map +1 -1
- package/dist/custom-validation-prompt.js +1 -1
- package/dist/custom-validation-prompt.js.map +1 -1
- package/dist/deduplication/codex-review.d.ts +1 -5
- package/dist/deduplication/codex-review.d.ts.map +1 -1
- package/dist/deduplication/codex-review.js +2 -2
- package/dist/deduplication/codex-review.js.map +1 -1
- package/dist/deduplication/deduplication-reviewer.d.ts +1 -1
- package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
- package/dist/deduplication/deduplication-reviewer.js +1 -1
- package/dist/deduplication/deduplication-reviewer.js.map +1 -1
- package/dist/deduplication/records-protocol.d.ts +3 -8
- package/dist/deduplication/records-protocol.d.ts.map +1 -1
- package/dist/deduplication/records-protocol.js +11 -171
- package/dist/deduplication/records-protocol.js.map +1 -1
- package/dist/deep-progress.d.ts +15 -1
- package/dist/deep-progress.d.ts.map +1 -1
- package/dist/deep-progress.js +15 -16
- package/dist/deep-progress.js.map +1 -1
- package/dist/executable-path.d.ts +2 -0
- package/dist/executable-path.d.ts.map +1 -0
- package/dist/executable-path.js +12 -0
- package/dist/executable-path.js.map +1 -0
- package/dist/feedback.d.ts +1 -4
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +1 -1
- package/dist/feedback.js.map +1 -1
- package/dist/host-protocol.d.ts +19 -0
- package/dist/host-protocol.d.ts.map +1 -0
- package/dist/host-protocol.js +270 -0
- package/dist/host-protocol.js.map +1 -0
- package/dist/hosted-scan-protocol.d.ts +4 -0
- package/dist/hosted-scan-protocol.d.ts.map +1 -0
- package/dist/hosted-scan-protocol.js +25 -0
- package/dist/hosted-scan-protocol.js.map +1 -0
- package/dist/hosted-scan.d.ts +117 -0
- package/dist/hosted-scan.d.ts.map +1 -0
- package/dist/hosted-scan.js +260 -0
- package/dist/hosted-scan.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +47 -9
- package/dist/multiscan.js.map +1 -1
- package/dist/publication-store.d.ts.map +1 -1
- package/dist/publication-store.js +73 -63
- package/dist/publication-store.js.map +1 -1
- package/dist/publication.d.ts +0 -2
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +0 -5
- package/dist/publication.js.map +1 -1
- package/dist/runtime.d.ts +5 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +5 -38
- package/dist/runtime.js.map +1 -1
- package/dist/scan-executor.d.ts +104 -0
- package/dist/scan-executor.d.ts.map +1 -0
- package/dist/scan-executor.js +62 -0
- package/dist/scan-executor.js.map +1 -0
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +17 -25
- package/dist/targets.js.map +1 -1
- package/dist/worker-progress.d.ts +43 -11
- package/dist/worker-progress.d.ts.map +1 -1
- package/dist/worker-progress.js +21 -37
- package/dist/worker-progress.js.map +1 -1
- package/docs/cli.md +12 -2
- package/docs/hosted-scans.md +242 -0
- package/package.json +9 -7
- package/schemas/hosted-scan-v2.fixture.json +145 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-security",
|
|
3
3
|
"version": "0.1.95",
|
|
4
|
-
"description": "Codex Security
|
|
4
|
+
"description": "Codex Security workflows for security scans, analysis, and investigation.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "OpenAI"
|
|
7
7
|
},
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"workerProviderSnapshot": 4
|
|
24
24
|
},
|
|
25
25
|
"interface": {
|
|
26
|
-
"displayName": "Codex Security
|
|
26
|
+
"displayName": "Codex Security",
|
|
27
27
|
"shortDescription": "Security scanning for your codebase",
|
|
28
|
-
"longDescription": "Codex Security
|
|
28
|
+
"longDescription": "Codex Security packages reusable workflows for security scans, analysis, validation, and investigation across code, diffs, and related artifacts.",
|
|
29
29
|
"developerName": "OpenAI",
|
|
30
30
|
"category": "Security",
|
|
31
31
|
"capabilities": ["Interactive", "Read", "Write"],
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"privacyPolicyURL": "https://openai.com/policies/row-privacy-policy/",
|
|
34
34
|
"termsOfServiceURL": "https://openai.com/policies/row-terms-of-use/",
|
|
35
35
|
"defaultPrompt": [
|
|
36
|
-
"Run a Codex Security
|
|
37
|
-
"Run a Codex Security
|
|
36
|
+
"Run a Codex Security scan on this repository.",
|
|
37
|
+
"Run a Codex Security diff scan on this PR, commit, branch diff, or working-tree patch.",
|
|
38
38
|
"Triage existing security findings against this repository."
|
|
39
39
|
],
|
|
40
40
|
"brandColor": "#111111",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -23,7 +23,7 @@ var DeepScanNonRetryableError = class extends Error {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
// src/
|
|
26
|
+
// src/executable-path.ts
|
|
27
27
|
import { win32 } from "node:path";
|
|
28
28
|
function executablePathForSpawn(command) {
|
|
29
29
|
if (process.platform !== "win32" || !win32.isAbsolute(command))
|
|
@@ -183,16 +183,8 @@ var AppServerPreflightClient = class {
|
|
|
183
183
|
crlfDelay: Infinity
|
|
184
184
|
});
|
|
185
185
|
this.stdoutLines.on("line", (line) => this.consumeStdoutLine(line));
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
options.codexPath,
|
|
189
|
-
options.context
|
|
190
|
-
);
|
|
191
|
-
failure.message += "\n" + error.message;
|
|
192
|
-
this.fail(failure);
|
|
193
|
-
};
|
|
194
|
-
this.stdoutLines.on("error", onStdioError);
|
|
195
|
-
this.child.stdin.on("error", onStdioError);
|
|
186
|
+
this.stdoutLines.on("error", this.onStdioError);
|
|
187
|
+
this.child.stdin.on("error", this.onStdioError);
|
|
196
188
|
this.child.on("error", (error) => {
|
|
197
189
|
this.fail(
|
|
198
190
|
codexExecutableStartError(options.codexPath, error, options.context)
|
|
@@ -228,6 +220,14 @@ var AppServerPreflightClient = class {
|
|
|
228
220
|
closed = false;
|
|
229
221
|
childClosed = false;
|
|
230
222
|
removeAbortListener;
|
|
223
|
+
onStdioError = (error) => {
|
|
224
|
+
const failure = codexExecutableStdioError(
|
|
225
|
+
this.options.codexPath,
|
|
226
|
+
this.options.context
|
|
227
|
+
);
|
|
228
|
+
failure.message += "\n" + error.message;
|
|
229
|
+
this.fail(failure);
|
|
230
|
+
};
|
|
231
231
|
get stderrText() {
|
|
232
232
|
return Buffer.concat(this.stderr).toString("utf8");
|
|
233
233
|
}
|
|
@@ -235,7 +235,7 @@ var AppServerPreflightClient = class {
|
|
|
235
235
|
await this.request("initialize", {
|
|
236
236
|
clientInfo: {
|
|
237
237
|
name: "codex_security_deep_scan",
|
|
238
|
-
title: "Codex Security
|
|
238
|
+
title: "Codex Security Deep Scan",
|
|
239
239
|
version
|
|
240
240
|
},
|
|
241
241
|
capabilities: { experimentalApi: true }
|
|
@@ -327,14 +327,7 @@ var AppServerPreflightClient = class {
|
|
|
327
327
|
}
|
|
328
328
|
this.child.stdin.write(`${JSON.stringify(message)}
|
|
329
329
|
`, (error) => {
|
|
330
|
-
if (error)
|
|
331
|
-
const failure = codexExecutableStdioError(
|
|
332
|
-
this.options.codexPath,
|
|
333
|
-
this.options.context
|
|
334
|
-
);
|
|
335
|
-
failure.message += "\n" + error.message;
|
|
336
|
-
this.fail(failure);
|
|
337
|
-
}
|
|
330
|
+
if (error) this.onStdioError(error);
|
|
338
331
|
});
|
|
339
332
|
}
|
|
340
333
|
consumeStdoutLine(line) {
|
|
Binary file
|
|
Binary file
|
|
@@ -30,7 +30,7 @@ During a host-backed scan, checkpoint saved findings and pending candidates with
|
|
|
30
30
|
|
|
31
31
|
On a confirmed failure or explicit cancellation, the workbench preserves saved results without marking the scan successful. Report validated findings separately from pending candidates and describe scope limitations and remaining work. Use the retained report and exports; do not start additional model work after cancellation or replace saved results with a no-findings response.
|
|
32
32
|
|
|
33
|
-
After `complete_codex_security_scan` succeeds, include its returned `usage.totalTokens`, `usage.inputTokens`, and `usage.cachedInputTokens`
|
|
33
|
+
After `complete_codex_security_scan` succeeds, include its returned `usage.totalTokens`, `usage.inputTokens`, and `usage.cachedInputTokens` only when `usage.coverage` is `complete`. When `usage.completion.finalized` is `false`, leave the token total to the host: it finalizes usage after this turn ends, including the final response. Do not quote the preliminary count as a final total or an "at least" estimate. For other partial or unavailable measurements, say that the full token count is unavailable rather than reporting zero or estimating a cost. Token usage is workbench metadata, not a reason to modify sealed scan artifacts or the deterministic report.
|
|
34
34
|
|
|
35
35
|
Before workbench-owned Standard or workbench-backed diff completion, require `record_codex_security_scan_draft` to succeed. Before Deep completion, require the coordinator to return the parent scan's already-authored canonical manifest; do not submit another draft or rerun worker phases. Explicitly SDK-owned workflows verify their canonical JSON before the SDK finalizes it. Completion validates and seals existing canonical artifacts and generates `report.md`; it does not create missing artifacts or run skipped scan phases.
|
|
36
36
|
|
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
2
|
"$id": "https://openai.com/codex-security/schemas/coverage.schema.json",
|
|
4
3
|
"title": "Codex Security scan coverage",
|
|
4
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": [
|
|
7
|
-
"documentType",
|
|
8
|
-
"schemaVersion",
|
|
9
|
-
"scanId",
|
|
10
|
-
"mode",
|
|
11
|
-
"inventoryStrategy",
|
|
12
|
-
"includePaths",
|
|
13
|
-
"excludePaths",
|
|
14
|
-
"surfaces",
|
|
15
|
-
"explicitExclusions",
|
|
16
|
-
"deferred"
|
|
17
|
-
],
|
|
18
6
|
"properties": {
|
|
19
|
-
"documentType": {
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
"schemaVersion": {
|
|
23
|
-
"const": "1.0"
|
|
24
|
-
},
|
|
25
|
-
"scanId": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"minLength": 1
|
|
28
|
-
},
|
|
7
|
+
"documentType": { "const": "codex-security.coverage" },
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"scanId": { "type": "string", "minLength": 1 },
|
|
29
10
|
"mode": {
|
|
30
11
|
"enum": [
|
|
31
12
|
"repository",
|
|
@@ -38,45 +19,17 @@
|
|
|
38
19
|
]
|
|
39
20
|
},
|
|
40
21
|
"inventoryStrategy": {
|
|
41
|
-
"enum": [
|
|
42
|
-
"repository",
|
|
43
|
-
"scoped_path",
|
|
44
|
-
"diff",
|
|
45
|
-
"directory",
|
|
46
|
-
"custom"
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
"includePaths": {
|
|
50
|
-
"type": "array",
|
|
51
|
-
"items": {
|
|
52
|
-
"type": "string"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"excludePaths": {
|
|
56
|
-
"type": "array",
|
|
57
|
-
"items": {
|
|
58
|
-
"type": "string"
|
|
59
|
-
}
|
|
22
|
+
"enum": ["repository", "scoped_path", "diff", "directory", "custom"]
|
|
60
23
|
},
|
|
24
|
+
"includePaths": { "type": "array", "items": { "type": "string" } },
|
|
25
|
+
"excludePaths": { "type": "array", "items": { "type": "string" } },
|
|
61
26
|
"surfaces": {
|
|
62
27
|
"type": "array",
|
|
63
28
|
"items": {
|
|
64
29
|
"type": "object",
|
|
65
|
-
"required": [
|
|
66
|
-
"id",
|
|
67
|
-
"label",
|
|
68
|
-
"disposition",
|
|
69
|
-
"receiptRefs"
|
|
70
|
-
],
|
|
71
30
|
"properties": {
|
|
72
|
-
"id": {
|
|
73
|
-
|
|
74
|
-
"minLength": 1
|
|
75
|
-
},
|
|
76
|
-
"label": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"minLength": 1
|
|
79
|
-
},
|
|
31
|
+
"id": { "type": "string", "minLength": 1 },
|
|
32
|
+
"label": { "type": "string", "minLength": 1 },
|
|
80
33
|
"disposition": {
|
|
81
34
|
"enum": [
|
|
82
35
|
"reported",
|
|
@@ -94,111 +47,77 @@
|
|
|
94
47
|
"pattern": "^(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)artifacts/.+$"
|
|
95
48
|
}
|
|
96
49
|
},
|
|
97
|
-
"riskArea": {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"notes": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"minLength": 1
|
|
104
|
-
}
|
|
105
|
-
}
|
|
50
|
+
"riskArea": { "type": "string", "minLength": 1 },
|
|
51
|
+
"notes": { "type": "string", "minLength": 1 }
|
|
52
|
+
},
|
|
53
|
+
"required": ["id", "label", "disposition", "receiptRefs"]
|
|
106
54
|
}
|
|
107
55
|
},
|
|
108
56
|
"explicitExclusions": {
|
|
109
57
|
"type": "array",
|
|
110
58
|
"items": {
|
|
111
59
|
"type": "object",
|
|
112
|
-
"required": [
|
|
113
|
-
"pattern",
|
|
114
|
-
"reason"
|
|
115
|
-
],
|
|
116
60
|
"properties": {
|
|
117
|
-
"pattern": {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"reason": {
|
|
122
|
-
"type": "string",
|
|
123
|
-
"minLength": 1
|
|
124
|
-
}
|
|
125
|
-
}
|
|
61
|
+
"pattern": { "type": "string", "minLength": 1 },
|
|
62
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
63
|
+
},
|
|
64
|
+
"required": ["pattern", "reason"]
|
|
126
65
|
}
|
|
127
66
|
},
|
|
128
67
|
"deferred": {
|
|
129
68
|
"type": "array",
|
|
130
69
|
"items": {
|
|
131
70
|
"type": "object",
|
|
132
|
-
"required": [
|
|
133
|
-
"id",
|
|
134
|
-
"reason"
|
|
135
|
-
],
|
|
136
71
|
"properties": {
|
|
137
|
-
"id": {
|
|
138
|
-
|
|
139
|
-
"minLength": 1
|
|
140
|
-
},
|
|
141
|
-
"reason": {
|
|
142
|
-
"type": "string",
|
|
143
|
-
"minLength": 1
|
|
144
|
-
},
|
|
72
|
+
"id": { "type": "string", "minLength": 1 },
|
|
73
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
145
74
|
"paths": {
|
|
146
75
|
"type": "array",
|
|
147
|
-
"items": {
|
|
148
|
-
"type": "string",
|
|
149
|
-
"minLength": 1
|
|
150
|
-
}
|
|
76
|
+
"items": { "type": "string", "minLength": 1 }
|
|
151
77
|
},
|
|
152
78
|
"surfaceIds": {
|
|
153
79
|
"type": "array",
|
|
154
|
-
"items": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"minLength": 1
|
|
157
|
-
}
|
|
80
|
+
"items": { "type": "string", "minLength": 1 }
|
|
158
81
|
}
|
|
159
|
-
}
|
|
82
|
+
},
|
|
83
|
+
"required": ["id", "reason"]
|
|
160
84
|
}
|
|
161
85
|
},
|
|
162
86
|
"resolvedDeferred": {
|
|
163
|
-
"description": "Completed generic review tasks, with their saved IDs and completion reasons.",
|
|
164
87
|
"type": "array",
|
|
165
88
|
"items": {
|
|
166
89
|
"type": "object",
|
|
167
90
|
"properties": {
|
|
168
|
-
"id": {
|
|
169
|
-
|
|
170
|
-
"minLength": 1
|
|
171
|
-
},
|
|
172
|
-
"reason": {
|
|
173
|
-
"type": "string",
|
|
174
|
-
"minLength": 1
|
|
175
|
-
}
|
|
91
|
+
"id": { "type": "string", "minLength": 1 },
|
|
92
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
176
93
|
},
|
|
177
|
-
"required": [
|
|
178
|
-
"id",
|
|
179
|
-
"reason"
|
|
180
|
-
],
|
|
94
|
+
"required": ["id", "reason"],
|
|
181
95
|
"additionalProperties": false
|
|
182
|
-
}
|
|
96
|
+
},
|
|
97
|
+
"description": "Completed generic review tasks, with their saved IDs and completion reasons."
|
|
183
98
|
},
|
|
184
99
|
"openQuestions": {
|
|
185
100
|
"type": "array",
|
|
186
101
|
"items": {
|
|
187
102
|
"type": "object",
|
|
188
|
-
"required": [
|
|
189
|
-
"question"
|
|
190
|
-
],
|
|
191
103
|
"properties": {
|
|
192
|
-
"question": {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
"followUpPrompt": {
|
|
197
|
-
"type": "string",
|
|
198
|
-
"minLength": 1
|
|
199
|
-
}
|
|
200
|
-
}
|
|
104
|
+
"question": { "type": "string", "minLength": 1 },
|
|
105
|
+
"followUpPrompt": { "type": "string", "minLength": 1 }
|
|
106
|
+
},
|
|
107
|
+
"required": ["question"]
|
|
201
108
|
}
|
|
202
109
|
}
|
|
203
|
-
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"documentType",
|
|
113
|
+
"schemaVersion",
|
|
114
|
+
"scanId",
|
|
115
|
+
"mode",
|
|
116
|
+
"inventoryStrategy",
|
|
117
|
+
"includePaths",
|
|
118
|
+
"excludePaths",
|
|
119
|
+
"surfaces",
|
|
120
|
+
"explicitExclusions",
|
|
121
|
+
"deferred"
|
|
122
|
+
]
|
|
204
123
|
}
|