@openai/codex-security 0.1.31 → 0.2.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/README.md +295 -32
- package/_bundled_plugin/.mcp.json +1 -0
- package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +4 -4
- package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-musl/unix.node +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/server.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
- package/_bundled_plugin/references/artifact-storage.md +4 -4
- package/_bundled_plugin/references/config-preflight.md +1 -1
- package/_bundled_plugin/references/core-scan.md +14 -2
- package/_bundled_plugin/references/final-report.md +4 -2
- package/_bundled_plugin/references/scan-artifacts.md +2 -2
- package/_bundled_plugin/references/scan-contract.md +2 -2
- package/_bundled_plugin/references/threat-model.md +2 -2
- package/_bundled_plugin/schemas/coverage.schema.json +22 -0
- package/_bundled_plugin/schemas/scan-manifest.schema.json +100 -85
- package/_bundled_plugin/schemas/tools/scan-draft.schema.json +116 -102
- package/_bundled_plugin/scripts/config_preflight.py +4 -8
- package/_bundled_plugin/scripts/deep_scan_workbench.py +83 -217
- package/_bundled_plugin/scripts/filesystem_identity.py +1 -5
- package/_bundled_plugin/scripts/finalize_scan_contract.py +441 -166
- package/_bundled_plugin/scripts/finding_preview.py +42 -82
- package/_bundled_plugin/scripts/generate_in_scope_files.py +30 -34
- package/_bundled_plugin/scripts/generate_rank_input.py +58 -99
- package/_bundled_plugin/scripts/launch_codex_security_mcp +5 -1
- package/_bundled_plugin/scripts/rank_preview.py +85 -68
- package/_bundled_plugin/scripts/report_projection.py +37 -58
- package/_bundled_plugin/scripts/threat_model_projection.py +164 -0
- package/_bundled_plugin/scripts/windows_scan_local_files.py +11 -6
- package/_bundled_plugin/scripts/workbench/storage.py +11 -0
- package/_bundled_plugin/scripts/workbench_cli.py +11 -17
- package/_bundled_plugin/scripts/workbench_constants.py +6 -14
- package/_bundled_plugin/scripts/workbench_db.py +116 -228
- package/_bundled_plugin/scripts/workbench_finding_index.py +1 -6
- package/_bundled_plugin/scripts/workbench_native_indexes.py +1 -4
- package/_bundled_plugin/scripts/workbench_progress.py +12 -34
- package/_bundled_plugin/scripts/workbench_publication.py +47 -62
- package/_bundled_plugin/scripts/workbench_remediation.py +2 -20
- package/_bundled_plugin/scripts/workbench_saved_results.py +1246 -230
- package/_bundled_plugin/scripts/workbench_scan_start.py +4 -11
- package/_bundled_plugin/scripts/workbench_scan_usage.py +7 -15
- package/_bundled_plugin/scripts/workbench_schema.py +86 -271
- package/_bundled_plugin/scripts/workbench_severity.py +3 -0
- package/_bundled_plugin/scripts/workbench_source_excerpt.py +5 -6
- package/_bundled_plugin/scripts/workbench_target.py +98 -10
- package/_bundled_plugin/scripts/workbench_target_state.py +1 -5
- package/_bundled_plugin/scripts/workbench_validation.py +6 -20
- package/_bundled_plugin/skills/deep-security-scan/SKILL.md +3 -3
- package/_bundled_plugin/skills/security-diff-scan/SKILL.md +3 -3
- package/_bundled_plugin/skills/security-scan/SKILL.md +2 -2
- package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +2 -2
- package/_bundled_plugin/skills/threat-model/SKILL.md +2 -2
- package/dist/api.d.ts +3 -5
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +201 -207
- package/dist/api.js.map +1 -1
- package/dist/artifact-export.d.ts +70 -0
- package/dist/artifact-export.d.ts.map +1 -0
- package/dist/artifact-export.js +277 -0
- package/dist/artifact-export.js.map +1 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +8 -3
- package/dist/auth.js.map +1 -1
- package/dist/bulk-scan-discovery.d.ts +1 -0
- package/dist/bulk-scan-discovery.d.ts.map +1 -1
- package/dist/bulk-scan-discovery.js +8 -9
- package/dist/bulk-scan-discovery.js.map +1 -1
- package/dist/classify-scan-severity.d.ts.map +1 -1
- package/dist/classify-scan-severity.js +2 -5
- package/dist/classify-scan-severity.js.map +1 -1
- package/dist/classify-severity.d.ts +2 -8
- package/dist/classify-severity.d.ts.map +1 -1
- package/dist/classify-severity.js +3 -5
- package/dist/classify-severity.js.map +1 -1
- package/dist/cli-help.d.ts +3 -0
- package/dist/cli-help.d.ts.map +1 -0
- package/dist/cli-help.js +281 -0
- package/dist/cli-help.js.map +1 -0
- package/dist/cli.d.ts +19 -22
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +631 -714
- package/dist/cli.js.map +1 -1
- package/dist/cloud-publish.d.ts.map +1 -1
- package/dist/cloud-publish.js +1 -8
- package/dist/cloud-publish.js.map +1 -1
- package/dist/codex-prompt.d.ts.map +1 -1
- package/dist/codex-prompt.js +1 -2
- package/dist/codex-prompt.js.map +1 -1
- package/dist/codex-sdk-environment.d.ts +2 -0
- package/dist/codex-sdk-environment.d.ts.map +1 -0
- package/dist/codex-sdk-environment.js +30 -0
- package/dist/codex-sdk-environment.js.map +1 -0
- package/dist/component-plan.d.ts.map +1 -1
- package/dist/component-plan.js +2 -6
- package/dist/component-plan.js.map +1 -1
- package/dist/component-scan.d.ts +1 -0
- package/dist/component-scan.d.ts.map +1 -1
- package/dist/component-scan.js +31 -9
- package/dist/component-scan.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +32 -33
- package/dist/config.js.map +1 -1
- package/dist/contract.d.ts +2 -1
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +63 -122
- package/dist/contract.js.map +1 -1
- package/dist/cost-model.d.ts.map +1 -1
- package/dist/cost-model.js +65 -34
- package/dist/cost-model.js.map +1 -1
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +15 -31
- package/dist/cost.js.map +1 -1
- package/dist/custom-validation-prompt.js +4 -4
- package/dist/custom-validation-prompt.js.map +1 -1
- package/dist/custom-validation.d.ts.map +1 -1
- package/dist/custom-validation.js +17 -16
- package/dist/custom-validation.js.map +1 -1
- package/dist/deduplication/checkpointed-review.d.ts.map +1 -1
- package/dist/deduplication/checkpointed-review.js +10 -11
- package/dist/deduplication/checkpointed-review.js.map +1 -1
- package/dist/deduplication/codex-review.d.ts +2 -0
- package/dist/deduplication/codex-review.d.ts.map +1 -1
- package/dist/deduplication/codex-review.js +3 -3
- package/dist/deduplication/codex-review.js.map +1 -1
- package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
- package/dist/deduplication/deduplication-reviewer.js +2 -0
- package/dist/deduplication/deduplication-reviewer.js.map +1 -1
- package/dist/deduplication/deduplication.js +40 -62
- package/dist/deduplication/deduplication.js.map +1 -1
- package/dist/deduplication/records-protocol.d.ts.map +1 -1
- package/dist/deduplication/records-protocol.js +1 -4
- package/dist/deduplication/records-protocol.js.map +1 -1
- package/dist/deduplication/records.d.ts +2 -1
- package/dist/deduplication/records.d.ts.map +1 -1
- package/dist/deduplication/records.js +24 -6
- package/dist/deduplication/records.js.map +1 -1
- package/dist/deduplication/review.d.ts +7 -0
- package/dist/deduplication/review.d.ts.map +1 -1
- package/dist/deduplication/review.js.map +1 -1
- package/dist/deduplication/scan.js +3 -7
- package/dist/deduplication/scan.js.map +1 -1
- package/dist/deep-config.d.ts.map +1 -1
- package/dist/deep-config.js +3 -19
- package/dist/deep-config.js.map +1 -1
- package/dist/deep-progress.d.ts +0 -1
- package/dist/deep-progress.d.ts.map +1 -1
- package/dist/deep-progress.js +22 -40
- package/dist/deep-progress.js.map +1 -1
- package/dist/errors.d.ts +3 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +5 -7
- package/dist/errors.js.map +1 -1
- package/dist/finding-catalogue.d.ts.map +1 -1
- package/dist/finding-catalogue.js +22 -22
- package/dist/finding-catalogue.js.map +1 -1
- package/dist/finding-workflow.d.ts.map +1 -1
- package/dist/finding-workflow.js +4 -7
- package/dist/finding-workflow.js.map +1 -1
- package/dist/findings-import.d.ts.map +1 -1
- package/dist/findings-import.js +7 -17
- package/dist/findings-import.js.map +1 -1
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +2 -3
- package/dist/github.js.map +1 -1
- package/dist/import-scan.js +2 -2
- package/dist/import-scan.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/knowledge-base.js +2 -2
- package/dist/knowledge-base.js.map +1 -1
- package/dist/linear.d.ts.map +1 -1
- package/dist/linear.js +2 -3
- package/dist/linear.js.map +1 -1
- package/dist/models.d.ts +24 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js.map +1 -1
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +36 -31
- package/dist/multiscan.js.map +1 -1
- package/dist/owner-evidence.d.ts.map +1 -1
- package/dist/owner-evidence.js +2 -6
- package/dist/owner-evidence.js.map +1 -1
- package/dist/patch-tui.d.ts.map +1 -1
- package/dist/patch-tui.js +2 -4
- package/dist/patch-tui.js.map +1 -1
- package/dist/project-config-schema.d.ts +10 -0
- package/dist/project-config-schema.d.ts.map +1 -1
- package/dist/project-config-schema.js +1 -0
- package/dist/project-config-schema.js.map +1 -1
- package/dist/project-config.d.ts +1 -0
- package/dist/project-config.d.ts.map +1 -1
- package/dist/project-config.js +2 -0
- package/dist/project-config.js.map +1 -1
- package/dist/prompt-files.d.ts +0 -1
- package/dist/prompt-files.d.ts.map +1 -1
- package/dist/prompt-files.js +2 -4
- package/dist/prompt-files.js.map +1 -1
- package/dist/publication-events.d.ts.map +1 -1
- package/dist/publication-events.js +15 -29
- package/dist/publication-events.js.map +1 -1
- package/dist/publication-store.d.ts.map +1 -1
- package/dist/publication-store.js +9 -13
- package/dist/publication-store.js.map +1 -1
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +11 -14
- package/dist/publication.js.map +1 -1
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +31 -41
- package/dist/publish.js.map +1 -1
- package/dist/record.d.ts +2 -0
- package/dist/record.d.ts.map +1 -0
- package/dist/record.js +4 -0
- package/dist/record.js.map +1 -0
- package/dist/result.d.ts +4 -1
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +7 -0
- package/dist/result.js.map +1 -1
- package/dist/runtime.d.ts +10 -13
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +203 -131
- package/dist/runtime.js.map +1 -1
- package/dist/saved-scan.d.ts.map +1 -1
- package/dist/saved-scan.js +10 -20
- package/dist/saved-scan.js.map +1 -1
- package/dist/scan-activity.d.ts.map +1 -1
- package/dist/scan-activity.js +8 -22
- package/dist/scan-activity.js.map +1 -1
- package/dist/scan-comparison.d.ts +3 -3
- package/dist/scan-comparison.d.ts.map +1 -1
- package/dist/scan-comparison.js +38 -73
- package/dist/scan-comparison.js.map +1 -1
- package/dist/scan-dashboard.d.ts +0 -1
- package/dist/scan-dashboard.d.ts.map +1 -1
- package/dist/scan-dashboard.js +10 -19
- package/dist/scan-dashboard.js.map +1 -1
- package/dist/scan-history-renderer.d.ts.map +1 -1
- package/dist/scan-history-renderer.js +1 -2
- package/dist/scan-history-renderer.js.map +1 -1
- package/dist/scan-logs.d.ts.map +1 -1
- package/dist/scan-logs.js +2 -6
- package/dist/scan-logs.js.map +1 -1
- package/dist/scan-sessions.d.ts.map +1 -1
- package/dist/scan-sessions.js +1 -3
- package/dist/scan-sessions.js.map +1 -1
- package/dist/scan-settings.d.ts +5 -0
- package/dist/scan-settings.d.ts.map +1 -1
- package/dist/scan-settings.js +4 -0
- package/dist/scan-settings.js.map +1 -1
- package/dist/security-policy-cli.d.ts.map +1 -1
- package/dist/security-policy-cli.js +8 -6
- package/dist/security-policy-cli.js.map +1 -1
- package/dist/security-policy.d.ts +8 -4
- package/dist/security-policy.d.ts.map +1 -1
- package/dist/security-policy.js +98 -84
- package/dist/security-policy.js.map +1 -1
- package/dist/server/dashboard/app.js +5 -5
- package/dist/server/embeddings.d.ts.map +1 -1
- package/dist/server/embeddings.js +1 -0
- package/dist/server/embeddings.js.map +1 -1
- package/dist/server/routes.d.ts +3 -2
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +19 -7
- package/dist/server/routes.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +2 -3
- package/dist/server/server.js.map +1 -1
- package/dist/server/sqlite-store.d.ts.map +1 -1
- package/dist/server/sqlite-store.js +4 -14
- package/dist/server/sqlite-store.js.map +1 -1
- package/dist/severity-store.js +8 -15
- package/dist/severity-store.js.map +1 -1
- package/dist/suggest-owners.d.ts +2 -3
- package/dist/suggest-owners.d.ts.map +1 -1
- package/dist/suggest-owners.js +4 -5
- package/dist/suggest-owners.js.map +1 -1
- package/dist/targets.d.ts +1 -0
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +24 -21
- package/dist/targets.js.map +1 -1
- package/dist/trusted-executable.d.ts +5 -0
- package/dist/trusted-executable.d.ts.map +1 -1
- package/dist/trusted-executable.js +22 -5
- package/dist/trusted-executable.js.map +1 -1
- package/dist/value.d.ts +2 -0
- package/dist/value.d.ts.map +1 -0
- package/dist/value.js +20 -0
- package/dist/value.js.map +1 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -6
- package/dist/version.js.map +1 -1
- package/dist/windows-path.d.ts.map +1 -1
- package/dist/windows-path.js +1 -2
- package/dist/windows-path.js.map +1 -1
- package/dist/worker-progress.d.ts +1 -0
- package/dist/worker-progress.d.ts.map +1 -1
- package/dist/worker-progress.js +13 -34
- package/dist/worker-progress.js.map +1 -1
- package/docs/dedupe-records.md +24 -0
- package/package.json +11 -10
- package/schemas/project-config.schema.json +5 -0
- package/_bundled_plugin/scripts/normalize_candidates.py +0 -338
- package/dist/server/findings-service.d.ts +0 -20
- package/dist/server/findings-service.d.ts.map +0 -1
- package/dist/server/findings-service.js +0 -31
- package/dist/server/findings-service.js.map +0 -1
|
@@ -40,10 +40,7 @@
|
|
|
40
40
|
"$ref": "#/$defs/text"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"required": [
|
|
44
|
-
"path",
|
|
45
|
-
"startLine"
|
|
46
|
-
],
|
|
43
|
+
"required": ["path", "startLine"],
|
|
47
44
|
"additionalProperties": true
|
|
48
45
|
},
|
|
49
46
|
"identity": {
|
|
@@ -58,22 +55,14 @@
|
|
|
58
55
|
"pattern": "^[a-z0-9][a-z0-9._/-]*$"
|
|
59
56
|
}
|
|
60
57
|
},
|
|
61
|
-
"required": [
|
|
62
|
-
"anchor"
|
|
63
|
-
],
|
|
58
|
+
"required": ["anchor"],
|
|
64
59
|
"additionalProperties": true
|
|
65
60
|
},
|
|
66
61
|
"severity": {
|
|
67
62
|
"type": "object",
|
|
68
63
|
"properties": {
|
|
69
64
|
"level": {
|
|
70
|
-
"enum": [
|
|
71
|
-
"critical",
|
|
72
|
-
"high",
|
|
73
|
-
"medium",
|
|
74
|
-
"low",
|
|
75
|
-
"informational"
|
|
76
|
-
]
|
|
65
|
+
"enum": ["critical", "high", "medium", "low", "informational"]
|
|
77
66
|
},
|
|
78
67
|
"score": {
|
|
79
68
|
"type": "number",
|
|
@@ -93,29 +82,20 @@
|
|
|
93
82
|
"$ref": "#/$defs/text"
|
|
94
83
|
}
|
|
95
84
|
},
|
|
96
|
-
"required": [
|
|
97
|
-
"level"
|
|
98
|
-
],
|
|
85
|
+
"required": ["level"],
|
|
99
86
|
"additionalProperties": true
|
|
100
87
|
},
|
|
101
88
|
"confidence": {
|
|
102
89
|
"type": "object",
|
|
103
90
|
"properties": {
|
|
104
91
|
"level": {
|
|
105
|
-
"enum": [
|
|
106
|
-
"high",
|
|
107
|
-
"medium",
|
|
108
|
-
"low"
|
|
109
|
-
]
|
|
92
|
+
"enum": ["high", "medium", "low"]
|
|
110
93
|
},
|
|
111
94
|
"rationale": {
|
|
112
95
|
"$ref": "#/$defs/text"
|
|
113
96
|
}
|
|
114
97
|
},
|
|
115
|
-
"required": [
|
|
116
|
-
"level",
|
|
117
|
-
"rationale"
|
|
118
|
-
],
|
|
98
|
+
"required": ["level", "rationale"],
|
|
119
99
|
"additionalProperties": true
|
|
120
100
|
},
|
|
121
101
|
"taxonomy": {
|
|
@@ -130,10 +110,7 @@
|
|
|
130
110
|
"description": "Copy the reviewed candidate's exact cwe_ids array. Use an empty array when no CWE is established; do not invent one."
|
|
131
111
|
}
|
|
132
112
|
},
|
|
133
|
-
"required": [
|
|
134
|
-
"category",
|
|
135
|
-
"cwe"
|
|
136
|
-
],
|
|
113
|
+
"required": ["category", "cwe"],
|
|
137
114
|
"additionalProperties": true
|
|
138
115
|
},
|
|
139
116
|
"codeEvidence": {
|
|
@@ -171,14 +148,7 @@
|
|
|
171
148
|
"$ref": "#/$defs/text"
|
|
172
149
|
}
|
|
173
150
|
},
|
|
174
|
-
"required": [
|
|
175
|
-
"id",
|
|
176
|
-
"label",
|
|
177
|
-
"path",
|
|
178
|
-
"startLine",
|
|
179
|
-
"code",
|
|
180
|
-
"explanation"
|
|
181
|
-
],
|
|
151
|
+
"required": ["id", "label", "path", "startLine", "code", "explanation"],
|
|
182
152
|
"additionalProperties": true
|
|
183
153
|
},
|
|
184
154
|
"legacyCodeEvidence": {
|
|
@@ -191,10 +161,7 @@
|
|
|
191
161
|
"$ref": "#/$defs/text"
|
|
192
162
|
}
|
|
193
163
|
},
|
|
194
|
-
"required": [
|
|
195
|
-
"id",
|
|
196
|
-
"code"
|
|
197
|
-
],
|
|
164
|
+
"required": ["id", "code"],
|
|
198
165
|
"additionalProperties": true
|
|
199
166
|
},
|
|
200
167
|
"findingAssessment": {
|
|
@@ -469,9 +436,7 @@
|
|
|
469
436
|
"pattern": "^findings/([a-z0-9][a-z0-9._-]*)/\\1\\.md$"
|
|
470
437
|
}
|
|
471
438
|
},
|
|
472
|
-
"required": [
|
|
473
|
-
"reportPath"
|
|
474
|
-
],
|
|
439
|
+
"required": ["reportPath"],
|
|
475
440
|
"additionalProperties": true
|
|
476
441
|
},
|
|
477
442
|
"codeEvidence": {
|
|
@@ -507,9 +472,7 @@
|
|
|
507
472
|
"$ref": "#/$defs/textList"
|
|
508
473
|
}
|
|
509
474
|
},
|
|
510
|
-
"required": [
|
|
511
|
-
"summary"
|
|
512
|
-
],
|
|
475
|
+
"required": ["summary"],
|
|
513
476
|
"additionalProperties": true
|
|
514
477
|
}
|
|
515
478
|
]
|
|
@@ -576,7 +539,9 @@
|
|
|
576
539
|
"properties": {
|
|
577
540
|
"sourceFindingIds": {
|
|
578
541
|
"type": "array",
|
|
579
|
-
"items": {
|
|
542
|
+
"items": {
|
|
543
|
+
"$ref": "#/$defs/text"
|
|
544
|
+
},
|
|
580
545
|
"uniqueItems": true,
|
|
581
546
|
"description": "Host-provided source finding references represented by this Deep reduction. Preserve every assigned reference exactly once."
|
|
582
547
|
},
|
|
@@ -585,8 +550,13 @@
|
|
|
585
550
|
"items": {
|
|
586
551
|
"type": "object",
|
|
587
552
|
"properties": {
|
|
588
|
-
"id": {
|
|
589
|
-
|
|
553
|
+
"id": {
|
|
554
|
+
"$ref": "#/$defs/text"
|
|
555
|
+
},
|
|
556
|
+
"finding": {
|
|
557
|
+
"type": "object",
|
|
558
|
+
"additionalProperties": true
|
|
559
|
+
}
|
|
590
560
|
},
|
|
591
561
|
"required": ["id", "finding"],
|
|
592
562
|
"additionalProperties": false
|
|
@@ -598,9 +568,7 @@
|
|
|
598
568
|
"description": "The actual finding producer. Use local_plugin only for a finding discovered by this plugin."
|
|
599
569
|
}
|
|
600
570
|
},
|
|
601
|
-
"required": [
|
|
602
|
-
"source"
|
|
603
|
-
],
|
|
571
|
+
"required": ["source"],
|
|
604
572
|
"additionalProperties": true
|
|
605
573
|
},
|
|
606
574
|
"extensions": {
|
|
@@ -648,31 +616,76 @@
|
|
|
648
616
|
"additionalProperties": true
|
|
649
617
|
},
|
|
650
618
|
"threatModel": {
|
|
651
|
-
"
|
|
652
|
-
"
|
|
653
|
-
|
|
654
|
-
"
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
619
|
+
"description": "Retained threat-model content. Existing structured models remain supported; Markdown documents preserve their complete original body.",
|
|
620
|
+
"anyOf": [
|
|
621
|
+
{
|
|
622
|
+
"type": "object",
|
|
623
|
+
"properties": {
|
|
624
|
+
"summary": {
|
|
625
|
+
"$ref": "#/$defs/text"
|
|
626
|
+
},
|
|
627
|
+
"assets": {
|
|
628
|
+
"$ref": "#/$defs/textList"
|
|
629
|
+
},
|
|
630
|
+
"trustBoundaries": {
|
|
631
|
+
"$ref": "#/$defs/textList"
|
|
632
|
+
},
|
|
633
|
+
"attackerCapabilities": {
|
|
634
|
+
"$ref": "#/$defs/textList"
|
|
635
|
+
},
|
|
636
|
+
"securityObjectives": {
|
|
637
|
+
"$ref": "#/$defs/textList"
|
|
638
|
+
},
|
|
639
|
+
"assumptions": {
|
|
640
|
+
"$ref": "#/$defs/textList"
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
"required": ["summary"],
|
|
644
|
+
"additionalProperties": true
|
|
667
645
|
},
|
|
668
|
-
|
|
669
|
-
"
|
|
646
|
+
{
|
|
647
|
+
"type": "object",
|
|
648
|
+
"properties": {
|
|
649
|
+
"format": {
|
|
650
|
+
"const": "markdown"
|
|
651
|
+
},
|
|
652
|
+
"content": {
|
|
653
|
+
"$ref": "#/$defs/text"
|
|
654
|
+
},
|
|
655
|
+
"scope": {
|
|
656
|
+
"type": "object",
|
|
657
|
+
"description": "The modeled source scope, which may differ from the scan scope. Omit when unknown.",
|
|
658
|
+
"properties": {
|
|
659
|
+
"includePaths": {
|
|
660
|
+
"type": "array",
|
|
661
|
+
"items": {
|
|
662
|
+
"type": "string",
|
|
663
|
+
"minLength": 1
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"excludePaths": {
|
|
667
|
+
"type": "array",
|
|
668
|
+
"items": {
|
|
669
|
+
"type": "string",
|
|
670
|
+
"minLength": 1
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"summary": {
|
|
674
|
+
"type": "string",
|
|
675
|
+
"minLength": 1
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"required": ["includePaths"],
|
|
679
|
+
"additionalProperties": true
|
|
680
|
+
},
|
|
681
|
+
"origin": {
|
|
682
|
+
"enum": ["generated", "provided", "reconciled", "recovered"]
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"required": ["format", "content"],
|
|
686
|
+
"additionalProperties": true
|
|
670
687
|
}
|
|
671
|
-
|
|
672
|
-
"required": [
|
|
673
|
-
"summary"
|
|
674
|
-
],
|
|
675
|
-
"additionalProperties": true
|
|
688
|
+
]
|
|
676
689
|
},
|
|
677
690
|
"surface": {
|
|
678
691
|
"type": "object",
|
|
@@ -710,10 +723,7 @@
|
|
|
710
723
|
"$ref": "#/$defs/text"
|
|
711
724
|
}
|
|
712
725
|
},
|
|
713
|
-
"required": [
|
|
714
|
-
"label",
|
|
715
|
-
"disposition"
|
|
716
|
-
],
|
|
726
|
+
"required": ["label", "disposition"],
|
|
717
727
|
"additionalProperties": true
|
|
718
728
|
},
|
|
719
729
|
"coverage": {
|
|
@@ -728,11 +738,7 @@
|
|
|
728
738
|
"receiptRefs": false,
|
|
729
739
|
"completeness": {
|
|
730
740
|
"description": "Use partial if any work is deferred or any surface needs follow-up; use complete only when no such work remains.",
|
|
731
|
-
"enum": [
|
|
732
|
-
"complete",
|
|
733
|
-
"partial",
|
|
734
|
-
"unknown"
|
|
735
|
-
]
|
|
741
|
+
"enum": ["complete", "partial", "unknown"]
|
|
736
742
|
},
|
|
737
743
|
"inventoryStrategy": false,
|
|
738
744
|
"surfaces": {
|
|
@@ -753,14 +759,12 @@
|
|
|
753
759
|
"$ref": "#/$defs/text"
|
|
754
760
|
}
|
|
755
761
|
},
|
|
756
|
-
"required": [
|
|
757
|
-
"pattern",
|
|
758
|
-
"reason"
|
|
759
|
-
],
|
|
762
|
+
"required": ["pattern", "reason"],
|
|
760
763
|
"additionalProperties": true
|
|
761
764
|
}
|
|
762
765
|
},
|
|
763
766
|
"deferred": {
|
|
767
|
+
"description": "Each supplied id identifies one task and must be unique within this draft. Reuse saved IDs in later updates.",
|
|
764
768
|
"type": "array",
|
|
765
769
|
"items": {
|
|
766
770
|
"type": "object",
|
|
@@ -781,10 +785,28 @@
|
|
|
781
785
|
"$ref": "#/$defs/textList"
|
|
782
786
|
}
|
|
783
787
|
},
|
|
788
|
+
"required": ["reason"],
|
|
789
|
+
"additionalProperties": true
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
"resolvedDeferred": {
|
|
793
|
+
"description": "On final Standard or diff drafts, close generic tasks by saved ID and completion reason. Reuse saved surface IDs for updates. Candidate tasks need findings or dispositions; redundant closure entries for those outcomes are ignored.",
|
|
794
|
+
"type": "array",
|
|
795
|
+
"items": {
|
|
796
|
+
"type": "object",
|
|
797
|
+
"properties": {
|
|
798
|
+
"id": {
|
|
799
|
+
"$ref": "#/$defs/text"
|
|
800
|
+
},
|
|
801
|
+
"reason": {
|
|
802
|
+
"$ref": "#/$defs/text"
|
|
803
|
+
}
|
|
804
|
+
},
|
|
784
805
|
"required": [
|
|
806
|
+
"id",
|
|
785
807
|
"reason"
|
|
786
808
|
],
|
|
787
|
-
"additionalProperties":
|
|
809
|
+
"additionalProperties": false
|
|
788
810
|
}
|
|
789
811
|
},
|
|
790
812
|
"openQuestions": {
|
|
@@ -804,9 +826,7 @@
|
|
|
804
826
|
"$ref": "#/$defs/text"
|
|
805
827
|
}
|
|
806
828
|
},
|
|
807
|
-
"required": [
|
|
808
|
-
"question"
|
|
809
|
-
],
|
|
829
|
+
"required": ["question"],
|
|
810
830
|
"additionalProperties": true
|
|
811
831
|
}
|
|
812
832
|
]
|
|
@@ -850,11 +870,7 @@
|
|
|
850
870
|
"$ref": "#/$defs/coverage"
|
|
851
871
|
}
|
|
852
872
|
},
|
|
853
|
-
"required": [
|
|
854
|
-
"scanId",
|
|
855
|
-
"findings",
|
|
856
|
-
"coverage"
|
|
857
|
-
],
|
|
873
|
+
"required": ["scanId", "findings", "coverage"],
|
|
858
874
|
"additionalProperties": false
|
|
859
875
|
},
|
|
860
876
|
"completedScanInput": {
|
|
@@ -867,9 +883,7 @@
|
|
|
867
883
|
"$ref": "#/$defs/handoffClaimToken"
|
|
868
884
|
}
|
|
869
885
|
},
|
|
870
|
-
"required": [
|
|
871
|
-
"scanId"
|
|
872
|
-
],
|
|
886
|
+
"required": ["scanId"],
|
|
873
887
|
"additionalProperties": false
|
|
874
888
|
}
|
|
875
889
|
},
|
|
@@ -17,6 +17,10 @@ try:
|
|
|
17
17
|
except ModuleNotFoundError: # pragma: no cover - Python 3.10 only
|
|
18
18
|
import tomli as tomllib
|
|
19
19
|
|
|
20
|
+
# Some plugin hosts launch Python with safe-path isolation enabled.
|
|
21
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
22
|
+
from workbench_constants import positive_int
|
|
23
|
+
|
|
20
24
|
PLUGIN_ROOT = Path(__file__).resolve().parents[1]
|
|
21
25
|
DEFAULT_REGISTRY = PLUGIN_ROOT / "preflight" / "capability-profiles.toml"
|
|
22
26
|
DEFAULT_CODEX_HOME = Path(os.environ.get("CODEX_HOME", "~/.codex")).expanduser()
|
|
@@ -147,13 +151,6 @@ def parse_bool(value: str) -> bool:
|
|
|
147
151
|
raise ValueError(f"expected true or false, got {value!r}")
|
|
148
152
|
|
|
149
153
|
|
|
150
|
-
def positive_int(value: str) -> int:
|
|
151
|
-
parsed = int(value)
|
|
152
|
-
if parsed < 1:
|
|
153
|
-
raise argparse.ArgumentTypeError("expected a positive integer")
|
|
154
|
-
return parsed
|
|
155
|
-
|
|
156
|
-
|
|
157
154
|
def parse_assignment(raw: str) -> tuple[str, str]:
|
|
158
155
|
key, separator, value = raw.partition("=")
|
|
159
156
|
if not separator or not key or not value:
|
|
@@ -865,7 +862,6 @@ def evaluate(args: argparse.Namespace) -> dict[str, Any]:
|
|
|
865
862
|
if path in project_config_paths_set:
|
|
866
863
|
# Codex strips project-local profile selection and definitions before
|
|
867
864
|
# resolving the merged config. Mirror that denylist here.
|
|
868
|
-
config = dict(config)
|
|
869
865
|
config.pop("profile", None)
|
|
870
866
|
config.pop("profiles", None)
|
|
871
867
|
config_layers.append((path, config))
|