@openai/codex-security 0.1.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.
Files changed (178) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +306 -0
  3. package/_bundled_plugin/.app.json +20 -0
  4. package/_bundled_plugin/.codex-plugin/plugin.json +41 -0
  5. package/_bundled_plugin/.mcp.json +20 -0
  6. package/_bundled_plugin/assets/logo.png +0 -0
  7. package/_bundled_plugin/examples/completed-scan/coverage.json +22 -0
  8. package/_bundled_plugin/examples/completed-scan/findings.json +51 -0
  9. package/_bundled_plugin/examples/completed-scan/scan-manifest.json +43 -0
  10. package/_bundled_plugin/mcp/mcp-app.html.br +0 -0
  11. package/_bundled_plugin/mcp/server.mjs +24 -0
  12. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  13. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  14. package/_bundled_plugin/preflight/capability-profiles.toml +179 -0
  15. package/_bundled_plugin/references/config-preflight.md +115 -0
  16. package/_bundled_plugin/references/final-report.md +205 -0
  17. package/_bundled_plugin/references/finding-detail-fields.md +162 -0
  18. package/_bundled_plugin/references/sarif-adapter.md +26 -0
  19. package/_bundled_plugin/references/scan-artifacts.md +116 -0
  20. package/_bundled_plugin/references/scan-contract.md +164 -0
  21. package/_bundled_plugin/references/security-guidance.md +15 -0
  22. package/_bundled_plugin/references/shared-hard-rules.md +15 -0
  23. package/_bundled_plugin/references/static-finding-assessment.md +75 -0
  24. package/_bundled_plugin/schemas/coverage.schema.json +228 -0
  25. package/_bundled_plugin/schemas/findings.schema.json +359 -0
  26. package/_bundled_plugin/schemas/scan-manifest.schema.json +332 -0
  27. package/_bundled_plugin/scripts/config_preflight.py +901 -0
  28. package/_bundled_plugin/scripts/deep_scan_config.py +108 -0
  29. package/_bundled_plugin/scripts/deep_scan_workbench.py +1547 -0
  30. package/_bundled_plugin/scripts/filesystem_identity.py +30 -0
  31. package/_bundled_plugin/scripts/finalize_scan_contract.py +2208 -0
  32. package/_bundled_plugin/scripts/finding_preview.py +270 -0
  33. package/_bundled_plugin/scripts/generate_rank_input.py +1013 -0
  34. package/_bundled_plugin/scripts/normalize_candidates.py +320 -0
  35. package/_bundled_plugin/scripts/rank_preview.py +968 -0
  36. package/_bundled_plugin/scripts/report_projection.py +844 -0
  37. package/_bundled_plugin/scripts/resolve_security_md.py +158 -0
  38. package/_bundled_plugin/scripts/snapshot_sqlite.py +26 -0
  39. package/_bundled_plugin/scripts/validate_report_format.py +138 -0
  40. package/_bundled_plugin/scripts/validate_scan_contract.py +108 -0
  41. package/_bundled_plugin/scripts/validate_tracking_source.py +92 -0
  42. package/_bundled_plugin/scripts/windows_scan_local_files.py +612 -0
  43. package/_bundled_plugin/scripts/workbench/__init__.py +1 -0
  44. package/_bundled_plugin/scripts/workbench/handoff.py +238 -0
  45. package/_bundled_plugin/scripts/workbench_cli.py +325 -0
  46. package/_bundled_plugin/scripts/workbench_constants.py +81 -0
  47. package/_bundled_plugin/scripts/workbench_db.py +3728 -0
  48. package/_bundled_plugin/scripts/workbench_native_indexes.py +242 -0
  49. package/_bundled_plugin/scripts/workbench_progress.py +226 -0
  50. package/_bundled_plugin/scripts/workbench_remediation.py +125 -0
  51. package/_bundled_plugin/scripts/workbench_scan_history.py +829 -0
  52. package/_bundled_plugin/scripts/workbench_scan_start.py +149 -0
  53. package/_bundled_plugin/scripts/workbench_schema.py +714 -0
  54. package/_bundled_plugin/scripts/workbench_source_excerpt.py +99 -0
  55. package/_bundled_plugin/scripts/workbench_target.py +469 -0
  56. package/_bundled_plugin/scripts/workbench_target_state.py +63 -0
  57. package/_bundled_plugin/scripts/workbench_validation.py +294 -0
  58. package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +117 -0
  59. package/_bundled_plugin/skills/attack-path-analysis/agents/openai.yaml +4 -0
  60. package/_bundled_plugin/skills/attack-path-analysis/references/attack-path-facts.md +76 -0
  61. package/_bundled_plugin/skills/attack-path-analysis/references/severity-policy.md +153 -0
  62. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +166 -0
  63. package/_bundled_plugin/skills/deep-security-scan/agents/openai.yaml +4 -0
  64. package/_bundled_plugin/skills/define-security-policy/SKILL.md +93 -0
  65. package/_bundled_plugin/skills/define-security-policy/agents/openai.yaml +4 -0
  66. package/_bundled_plugin/skills/finding-discovery/SKILL.md +155 -0
  67. package/_bundled_plugin/skills/finding-discovery/agents/openai.yaml +4 -0
  68. package/_bundled_plugin/skills/fix-finding/SKILL.md +112 -0
  69. package/_bundled_plugin/skills/fix-finding/agents/openai.yaml +4 -0
  70. package/_bundled_plugin/skills/propose-security-hardening/SKILL.md +240 -0
  71. package/_bundled_plugin/skills/propose-security-hardening/agents/openai.yaml +4 -0
  72. package/_bundled_plugin/skills/propose-security-hardening/references/proposal-format.md +424 -0
  73. package/_bundled_plugin/skills/security-diff-scan/SKILL.md +167 -0
  74. package/_bundled_plugin/skills/security-diff-scan/agents/openai.yaml +4 -0
  75. package/_bundled_plugin/skills/security-scan/SKILL.md +42 -0
  76. package/_bundled_plugin/skills/security-scan/agents/openai.yaml +4 -0
  77. package/_bundled_plugin/skills/security-scan/references/repository-wide-scan.md +48 -0
  78. package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +85 -0
  79. package/_bundled_plugin/skills/threat-model/SKILL.md +59 -0
  80. package/_bundled_plugin/skills/threat-model/agents/openai.yaml +4 -0
  81. package/_bundled_plugin/skills/threat-model/references/threat-model-guidance.md +48 -0
  82. package/_bundled_plugin/skills/track-findings/SKILL.md +222 -0
  83. package/_bundled_plugin/skills/track-findings/agents/openai.yaml +6 -0
  84. package/_bundled_plugin/skills/track-findings/references/github-security-advisories.md +54 -0
  85. package/_bundled_plugin/skills/track-findings/references/jira.md +77 -0
  86. package/_bundled_plugin/skills/triage-finding/SKILL.md +342 -0
  87. package/_bundled_plugin/skills/triage-finding/agents/openai.yaml +4 -0
  88. package/_bundled_plugin/skills/triage-finding/references/github-rest-intake.md +168 -0
  89. package/_bundled_plugin/skills/triage-finding/references/ticket-intake.md +62 -0
  90. package/_bundled_plugin/skills/triage-finding/references/triage-result-contract.md +108 -0
  91. package/_bundled_plugin/skills/validation/SKILL.md +110 -0
  92. package/_bundled_plugin/skills/validation/agents/openai.yaml +4 -0
  93. package/_bundled_plugin/skills/validation/references/validation-guidance.md +122 -0
  94. package/_bundled_plugin/skills/vulnerability-writeup/SKILL.md +263 -0
  95. package/_bundled_plugin/skills/vulnerability-writeup/agents/openai.yaml +4 -0
  96. package/_bundled_plugin/skills/vulnerability-writeup/references/report-format.md +104 -0
  97. package/bin/codex-security.mjs +26 -0
  98. package/dist/api.d.ts +112 -0
  99. package/dist/api.d.ts.map +1 -0
  100. package/dist/api.js +1051 -0
  101. package/dist/api.js.map +1 -0
  102. package/dist/auth.d.ts +29 -0
  103. package/dist/auth.d.ts.map +1 -0
  104. package/dist/auth.js +246 -0
  105. package/dist/auth.js.map +1 -0
  106. package/dist/bulk-scan-discovery.d.ts +35 -0
  107. package/dist/bulk-scan-discovery.d.ts.map +1 -0
  108. package/dist/bulk-scan-discovery.js +217 -0
  109. package/dist/bulk-scan-discovery.js.map +1 -0
  110. package/dist/cli.d.ts +67 -0
  111. package/dist/cli.d.ts.map +1 -0
  112. package/dist/cli.js +2128 -0
  113. package/dist/cli.js.map +1 -0
  114. package/dist/config.d.ts +19 -0
  115. package/dist/config.d.ts.map +1 -0
  116. package/dist/config.js +199 -0
  117. package/dist/config.js.map +1 -0
  118. package/dist/contract.d.ts +21 -0
  119. package/dist/contract.d.ts.map +1 -0
  120. package/dist/contract.js +848 -0
  121. package/dist/contract.js.map +1 -0
  122. package/dist/cost.d.ts +30 -0
  123. package/dist/cost.d.ts.map +1 -0
  124. package/dist/cost.js +280 -0
  125. package/dist/cost.js.map +1 -0
  126. package/dist/errors.d.ts +38 -0
  127. package/dist/errors.d.ts.map +1 -0
  128. package/dist/errors.js +52 -0
  129. package/dist/errors.js.map +1 -0
  130. package/dist/index.d.ts +22 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/index.js +11 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/knowledge-base.d.ts +7 -0
  135. package/dist/knowledge-base.d.ts.map +1 -0
  136. package/dist/knowledge-base.js +181 -0
  137. package/dist/knowledge-base.js.map +1 -0
  138. package/dist/models.d.ts +231 -0
  139. package/dist/models.d.ts.map +1 -0
  140. package/dist/models.js +3 -0
  141. package/dist/models.js.map +1 -0
  142. package/dist/multiscan.d.ts +30 -0
  143. package/dist/multiscan.d.ts.map +1 -0
  144. package/dist/multiscan.js +397 -0
  145. package/dist/multiscan.js.map +1 -0
  146. package/dist/result.d.ts +39 -0
  147. package/dist/result.d.ts.map +1 -0
  148. package/dist/result.js +71 -0
  149. package/dist/result.js.map +1 -0
  150. package/dist/runtime.d.ts +69 -0
  151. package/dist/runtime.d.ts.map +1 -0
  152. package/dist/runtime.js +997 -0
  153. package/dist/runtime.js.map +1 -0
  154. package/dist/scan-comparison.d.ts +42 -0
  155. package/dist/scan-comparison.d.ts.map +1 -0
  156. package/dist/scan-comparison.js +153 -0
  157. package/dist/scan-comparison.js.map +1 -0
  158. package/dist/scan-history-renderer.d.ts +13 -0
  159. package/dist/scan-history-renderer.d.ts.map +1 -0
  160. package/dist/scan-history-renderer.js +297 -0
  161. package/dist/scan-history-renderer.js.map +1 -0
  162. package/dist/targets.d.ts +39 -0
  163. package/dist/targets.d.ts.map +1 -0
  164. package/dist/targets.js +295 -0
  165. package/dist/targets.js.map +1 -0
  166. package/dist/trusted-executable.d.ts +6 -0
  167. package/dist/trusted-executable.d.ts.map +1 -0
  168. package/dist/trusted-executable.js +77 -0
  169. package/dist/trusted-executable.js.map +1 -0
  170. package/dist/version.d.ts +6 -0
  171. package/dist/version.d.ts.map +1 -0
  172. package/dist/version.js +42 -0
  173. package/dist/version.js.map +1 -0
  174. package/dist/worker-progress.d.ts +13 -0
  175. package/dist/worker-progress.d.ts.map +1 -0
  176. package/dist/worker-progress.js +113 -0
  177. package/dist/worker-progress.js.map +1 -0
  178. package/package.json +74 -0
@@ -0,0 +1,332 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openai.com/codex-security/schemas/scan-manifest.schema.json",
4
+ "title": "Codex Security completed scan manifest",
5
+ "type": "object",
6
+ "required": [
7
+ "documentType",
8
+ "schemaVersion",
9
+ "scan"
10
+ ],
11
+ "properties": {
12
+ "documentType": {
13
+ "const": "codex-security.scan-manifest"
14
+ },
15
+ "schemaVersion": {
16
+ "const": "1.0"
17
+ },
18
+ "scan": {
19
+ "type": "object",
20
+ "required": [
21
+ "id",
22
+ "producer",
23
+ "status",
24
+ "startedAt",
25
+ "completedAt",
26
+ "sealedAt",
27
+ "target",
28
+ "scope",
29
+ "coverageRef",
30
+ "findingsRef",
31
+ "artifacts"
32
+ ],
33
+ "properties": {
34
+ "id": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "producer": {
39
+ "type": "object",
40
+ "required": [
41
+ "name",
42
+ "version"
43
+ ],
44
+ "properties": {
45
+ "name": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ },
49
+ "version": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ }
53
+ }
54
+ },
55
+ "status": {
56
+ "const": "completed"
57
+ },
58
+ "startedAt": {
59
+ "type": "string",
60
+ "format": "date-time"
61
+ },
62
+ "completedAt": {
63
+ "type": "string",
64
+ "format": "date-time"
65
+ },
66
+ "sealedAt": {
67
+ "type": "string",
68
+ "format": "date-time"
69
+ },
70
+ "target": {
71
+ "type": "object",
72
+ "required": [
73
+ "kind",
74
+ "targetId",
75
+ "displayName"
76
+ ],
77
+ "properties": {
78
+ "kind": {
79
+ "enum": [
80
+ "git_revision",
81
+ "git_worktree",
82
+ "git_diff",
83
+ "directory_snapshot"
84
+ ]
85
+ },
86
+ "targetId": {
87
+ "type": "string",
88
+ "minLength": 1
89
+ },
90
+ "displayName": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ },
94
+ "remote": {
95
+ "type": "string",
96
+ "pattern": "^(?![^:/?#]+://[^/?#]*@)[^?#]+$"
97
+ },
98
+ "revision": {
99
+ "type": "string"
100
+ },
101
+ "baseRevision": {
102
+ "type": "string"
103
+ },
104
+ "headRevision": {
105
+ "type": "string"
106
+ },
107
+ "snapshotDigest": {
108
+ "type": "string",
109
+ "pattern": "^codex-security-snapshot/v1:sha256:[a-f0-9]{64}$"
110
+ }
111
+ },
112
+ "allOf": [
113
+ {
114
+ "if": {
115
+ "properties": {
116
+ "kind": {
117
+ "const": "git_revision"
118
+ }
119
+ }
120
+ },
121
+ "then": {
122
+ "required": [
123
+ "revision"
124
+ ]
125
+ }
126
+ },
127
+ {
128
+ "if": {
129
+ "properties": {
130
+ "kind": {
131
+ "enum": [
132
+ "git_worktree",
133
+ "git_diff",
134
+ "directory_snapshot"
135
+ ]
136
+ }
137
+ }
138
+ },
139
+ "then": {
140
+ "required": [
141
+ "snapshotDigest"
142
+ ]
143
+ }
144
+ }
145
+ ]
146
+ },
147
+ "scope": {
148
+ "type": "object",
149
+ "required": [
150
+ "includePaths",
151
+ "excludePaths"
152
+ ],
153
+ "properties": {
154
+ "includePaths": {
155
+ "type": "array",
156
+ "items": {
157
+ "type": "string"
158
+ }
159
+ },
160
+ "excludePaths": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string"
164
+ }
165
+ },
166
+ "summary": {
167
+ "type": "string",
168
+ "minLength": 1
169
+ },
170
+ "artifactsReviewed": {
171
+ "type": "array",
172
+ "items": {
173
+ "type": "string",
174
+ "minLength": 1
175
+ }
176
+ },
177
+ "runtimeStatus": {
178
+ "type": "string",
179
+ "minLength": 1
180
+ },
181
+ "validationMode": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ },
185
+ "context": {
186
+ "type": "string",
187
+ "minLength": 1
188
+ },
189
+ "limitations": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ }
195
+ }
196
+ }
197
+ },
198
+ "threatModel": {
199
+ "type": "object",
200
+ "required": [
201
+ "summary"
202
+ ],
203
+ "properties": {
204
+ "summary": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ },
208
+ "assets": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string",
212
+ "minLength": 1
213
+ }
214
+ },
215
+ "trustBoundaries": {
216
+ "type": "array",
217
+ "items": {
218
+ "type": "string",
219
+ "minLength": 1
220
+ }
221
+ },
222
+ "attackerCapabilities": {
223
+ "type": "array",
224
+ "items": {
225
+ "type": "string",
226
+ "minLength": 1
227
+ }
228
+ },
229
+ "securityObjectives": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "string",
233
+ "minLength": 1
234
+ }
235
+ },
236
+ "assumptions": {
237
+ "type": "array",
238
+ "items": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ }
242
+ }
243
+ }
244
+ },
245
+ "hardening": {
246
+ "type": "object",
247
+ "required": [
248
+ "portfolioPath"
249
+ ],
250
+ "properties": {
251
+ "portfolioPath": {
252
+ "const": "hardening/hardening.md"
253
+ }
254
+ }
255
+ },
256
+ "coverageRef": {
257
+ "const": "coverage.json"
258
+ },
259
+ "findingsRef": {
260
+ "const": "findings.json"
261
+ },
262
+ "artifacts": {
263
+ "type": "array",
264
+ "minItems": 1,
265
+ "items": {
266
+ "type": "object",
267
+ "required": [
268
+ "path",
269
+ "sha256",
270
+ "mediaType"
271
+ ],
272
+ "properties": {
273
+ "path": {
274
+ "type": "string",
275
+ "minLength": 1,
276
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
277
+ },
278
+ "sha256": {
279
+ "type": "string",
280
+ "pattern": "^[a-f0-9]{64}$"
281
+ },
282
+ "mediaType": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ }
286
+ }
287
+ }
288
+ }
289
+ },
290
+ "allOf": [
291
+ {
292
+ "properties": {
293
+ "artifacts": {
294
+ "contains": {
295
+ "type": "object",
296
+ "required": [
297
+ "path"
298
+ ],
299
+ "properties": {
300
+ "path": {
301
+ "const": "findings.json"
302
+ }
303
+ }
304
+ },
305
+ "minContains": 1,
306
+ "maxContains": 1
307
+ }
308
+ }
309
+ },
310
+ {
311
+ "properties": {
312
+ "artifacts": {
313
+ "contains": {
314
+ "type": "object",
315
+ "required": [
316
+ "path"
317
+ ],
318
+ "properties": {
319
+ "path": {
320
+ "const": "coverage.json"
321
+ }
322
+ }
323
+ },
324
+ "minContains": 1,
325
+ "maxContains": 1
326
+ }
327
+ }
328
+ }
329
+ ]
330
+ }
331
+ }
332
+ }