@openai/codex-security 0.1.5 → 0.1.6

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 (94) hide show
  1. package/README.md +79 -8
  2. package/_bundled_plugin/.codex-plugin/plugin.json +1 -1
  3. package/_bundled_plugin/.mcp.json +8 -1
  4. package/_bundled_plugin/mcp/mcp-app.html.br +0 -0
  5. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  6. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  7. package/_bundled_plugin/preflight/capability-profiles.toml +0 -57
  8. package/_bundled_plugin/references/config-preflight.md +1 -1
  9. package/_bundled_plugin/references/final-report.md +15 -7
  10. package/_bundled_plugin/references/scan-artifacts.md +11 -9
  11. package/_bundled_plugin/references/scan-contract.md +3 -1
  12. package/_bundled_plugin/schemas/definitions/artifact-common.schema.json +42 -0
  13. package/_bundled_plugin/schemas/definitions/discovery-candidate.schema.json +100 -0
  14. package/_bundled_plugin/schemas/tools/candidate-attack-paths.schema.json +181 -0
  15. package/_bundled_plugin/schemas/tools/candidate-validations.schema.json +166 -0
  16. package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +120 -0
  17. package/_bundled_plugin/schemas/tools/discovery-candidates.schema.json +83 -0
  18. package/_bundled_plugin/schemas/tools/review-items.schema.json +80 -0
  19. package/_bundled_plugin/schemas/tools/scan-draft.schema.json +572 -0
  20. package/_bundled_plugin/schemas/tools/worker-threat-model.schema.json +18 -0
  21. package/_bundled_plugin/scripts/deep_scan_config.py +11 -3
  22. package/_bundled_plugin/scripts/deep_scan_workbench.py +153 -133
  23. package/_bundled_plugin/scripts/finalize_scan_contract.py +21 -0
  24. package/_bundled_plugin/scripts/generate_in_scope_files.py +134 -0
  25. package/_bundled_plugin/scripts/workbench_cli.py +33 -1
  26. package/_bundled_plugin/scripts/workbench_db.py +127 -117
  27. package/_bundled_plugin/scripts/workbench_feedback.py +2 -0
  28. package/_bundled_plugin/scripts/workbench_native_indexes.py +5 -49
  29. package/_bundled_plugin/scripts/workbench_progress.py +86 -3
  30. package/_bundled_plugin/scripts/workbench_remediation.py +19 -1
  31. package/_bundled_plugin/scripts/workbench_scan_history.py +7 -1
  32. package/_bundled_plugin/scripts/workbench_scan_start.py +11 -5
  33. package/_bundled_plugin/scripts/workbench_scan_usage.py +557 -0
  34. package/_bundled_plugin/scripts/workbench_schema.py +501 -0
  35. package/_bundled_plugin/scripts/workbench_validation.py +117 -13
  36. package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +4 -4
  37. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +34 -28
  38. package/_bundled_plugin/skills/finding-discovery/SKILL.md +1 -1
  39. package/_bundled_plugin/skills/security-diff-scan/SKILL.md +11 -8
  40. package/_bundled_plugin/skills/security-scan/SKILL.md +16 -9
  41. package/_bundled_plugin/skills/security-scan/references/repository-wide-scan.md +26 -14
  42. package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +1 -1
  43. package/_bundled_plugin/skills/threat-model/SKILL.md +2 -2
  44. package/_bundled_plugin/skills/validation/SKILL.md +5 -5
  45. package/_bundled_plugin/skills/vulnerability-writeup/SKILL.md +145 -227
  46. package/_bundled_plugin/skills/vulnerability-writeup/references/report-format.md +53 -68
  47. package/dist/api.d.ts +29 -7
  48. package/dist/api.d.ts.map +1 -1
  49. package/dist/api.js +323 -47
  50. package/dist/api.js.map +1 -1
  51. package/dist/auth.js +1 -1
  52. package/dist/auth.js.map +1 -1
  53. package/dist/cli.d.ts +3 -2
  54. package/dist/cli.d.ts.map +1 -1
  55. package/dist/cli.js +458 -40
  56. package/dist/cli.js.map +1 -1
  57. package/dist/config.d.ts +28 -0
  58. package/dist/config.d.ts.map +1 -1
  59. package/dist/config.js +39 -2
  60. package/dist/config.js.map +1 -1
  61. package/dist/cost.d.ts +7 -0
  62. package/dist/cost.d.ts.map +1 -1
  63. package/dist/cost.js +345 -17
  64. package/dist/cost.js.map +1 -1
  65. package/dist/index.d.ts +3 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/multiscan.d.ts +1 -0
  69. package/dist/multiscan.d.ts.map +1 -1
  70. package/dist/multiscan.js +3 -0
  71. package/dist/multiscan.js.map +1 -1
  72. package/dist/runtime.d.ts +16 -0
  73. package/dist/runtime.d.ts.map +1 -1
  74. package/dist/runtime.js +540 -25
  75. package/dist/runtime.js.map +1 -1
  76. package/dist/scan-activity.d.ts +13 -0
  77. package/dist/scan-activity.d.ts.map +1 -0
  78. package/dist/scan-activity.js +319 -0
  79. package/dist/scan-activity.js.map +1 -0
  80. package/dist/scan-dashboard.d.ts +47 -0
  81. package/dist/scan-dashboard.d.ts.map +1 -0
  82. package/dist/scan-dashboard.js +444 -0
  83. package/dist/scan-dashboard.js.map +1 -0
  84. package/dist/scan-history-renderer.d.ts.map +1 -1
  85. package/dist/scan-history-renderer.js +4 -1
  86. package/dist/scan-history-renderer.js.map +1 -1
  87. package/dist/version.d.ts +1 -1
  88. package/dist/version.js +1 -1
  89. package/dist/version.js.map +1 -1
  90. package/dist/worker-progress.d.ts +7 -0
  91. package/dist/worker-progress.d.ts.map +1 -1
  92. package/dist/worker-progress.js +68 -0
  93. package/dist/worker-progress.js.map +1 -1
  94. package/package.json +3 -3
@@ -0,0 +1,181 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-security://schemas/tools/candidate-attack-paths.schema.json",
4
+ "title": "Record Codex Security candidate attack paths",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["scanId", "attackPaths"],
8
+ "properties": {
9
+ "scanId": {
10
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
11
+ },
12
+ "attackPaths": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/$defs/attackPathUpdate"
16
+ }
17
+ }
18
+ },
19
+ "$defs": {
20
+ "input": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["scanId", "attackPaths"],
24
+ "properties": {
25
+ "scanId": {
26
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
27
+ },
28
+ "attackPaths": {
29
+ "type": "array",
30
+ "items": {
31
+ "$ref": "#/$defs/attackPathUpdate"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "updatesPayload": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["attackPaths"],
40
+ "properties": {
41
+ "attackPaths": {
42
+ "type": "array",
43
+ "items": {
44
+ "$ref": "#/$defs/attackPathUpdate"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "attackPathUpdate": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["candidateId", "attackPath"],
53
+ "properties": {
54
+ "candidateId": {
55
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/candidateId"
56
+ },
57
+ "attackPath": {
58
+ "$ref": "#/$defs/attackPath"
59
+ }
60
+ }
61
+ },
62
+ "attackPath": {
63
+ "oneOf": [
64
+ {
65
+ "$ref": "#/$defs/reportableAttackPath"
66
+ },
67
+ {
68
+ "$ref": "#/$defs/ignoredAttackPath"
69
+ },
70
+ {
71
+ "$ref": "#/$defs/deferredAttackPath"
72
+ }
73
+ ]
74
+ },
75
+ "attackPathFields": {
76
+ "dataflow": {
77
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
78
+ },
79
+ "reachability": {
80
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
81
+ },
82
+ "counterevidence": {
83
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
84
+ },
85
+ "impact": {
86
+ "enum": ["high", "medium", "low", "ignore", "unknown"]
87
+ },
88
+ "likelihood": {
89
+ "enum": ["high", "medium", "low", "ignore", "unknown"]
90
+ },
91
+ "severity_rationale": {
92
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
93
+ },
94
+ "change_conditions": {
95
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
96
+ }
97
+ },
98
+ "reportableAttackPath": {
99
+ "type": "object",
100
+ "additionalProperties": true,
101
+ "required": [
102
+ "decision",
103
+ "dataflow",
104
+ "reachability",
105
+ "counterevidence",
106
+ "impact",
107
+ "likelihood",
108
+ "severity",
109
+ "severity_rationale",
110
+ "change_conditions"
111
+ ],
112
+ "properties": {
113
+ "decision": { "const": "reportable" },
114
+ "dataflow": { "$ref": "#/$defs/attackPathFields/dataflow" },
115
+ "reachability": { "$ref": "#/$defs/attackPathFields/reachability" },
116
+ "counterevidence": { "$ref": "#/$defs/attackPathFields/counterevidence" },
117
+ "impact": { "$ref": "#/$defs/attackPathFields/impact" },
118
+ "likelihood": { "$ref": "#/$defs/attackPathFields/likelihood" },
119
+ "severity": { "enum": ["critical", "high", "medium", "low"] },
120
+ "severity_rationale": { "$ref": "#/$defs/attackPathFields/severity_rationale" },
121
+ "change_conditions": { "$ref": "#/$defs/attackPathFields/change_conditions" }
122
+ }
123
+ },
124
+ "ignoredAttackPath": {
125
+ "type": "object",
126
+ "additionalProperties": true,
127
+ "required": [
128
+ "decision",
129
+ "dataflow",
130
+ "reachability",
131
+ "counterevidence",
132
+ "impact",
133
+ "likelihood",
134
+ "severity",
135
+ "severity_rationale",
136
+ "change_conditions"
137
+ ],
138
+ "properties": {
139
+ "decision": { "const": "ignore" },
140
+ "dataflow": { "$ref": "#/$defs/attackPathFields/dataflow" },
141
+ "reachability": { "$ref": "#/$defs/attackPathFields/reachability" },
142
+ "counterevidence": { "$ref": "#/$defs/attackPathFields/counterevidence" },
143
+ "impact": { "$ref": "#/$defs/attackPathFields/impact" },
144
+ "likelihood": { "$ref": "#/$defs/attackPathFields/likelihood" },
145
+ "severity": { "const": "ignore" },
146
+ "severity_rationale": { "$ref": "#/$defs/attackPathFields/severity_rationale" },
147
+ "change_conditions": { "$ref": "#/$defs/attackPathFields/change_conditions" }
148
+ }
149
+ },
150
+ "deferredAttackPath": {
151
+ "type": "object",
152
+ "additionalProperties": true,
153
+ "required": [
154
+ "decision",
155
+ "dataflow",
156
+ "reachability",
157
+ "counterevidence",
158
+ "impact",
159
+ "likelihood",
160
+ "severity",
161
+ "severity_rationale",
162
+ "change_conditions",
163
+ "proof_gap"
164
+ ],
165
+ "properties": {
166
+ "decision": { "const": "deferred" },
167
+ "dataflow": { "$ref": "#/$defs/attackPathFields/dataflow" },
168
+ "reachability": { "$ref": "#/$defs/attackPathFields/reachability" },
169
+ "counterevidence": { "$ref": "#/$defs/attackPathFields/counterevidence" },
170
+ "impact": { "$ref": "#/$defs/attackPathFields/impact" },
171
+ "likelihood": { "$ref": "#/$defs/attackPathFields/likelihood" },
172
+ "severity": { "enum": ["critical", "high", "medium", "low", "unknown"] },
173
+ "severity_rationale": { "$ref": "#/$defs/attackPathFields/severity_rationale" },
174
+ "change_conditions": { "$ref": "#/$defs/attackPathFields/change_conditions" },
175
+ "proof_gap": {
176
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-security://schemas/tools/candidate-validations.schema.json",
4
+ "title": "Record compact Codex Security candidate validations",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["scanId", "validations"],
8
+ "properties": {
9
+ "scanId": {
10
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
11
+ },
12
+ "validations": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/$defs/validationUpdate"
16
+ }
17
+ }
18
+ },
19
+ "$defs": {
20
+ "input": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["scanId", "validations"],
24
+ "properties": {
25
+ "scanId": {
26
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
27
+ },
28
+ "validations": {
29
+ "type": "array",
30
+ "items": {
31
+ "$ref": "#/$defs/validationUpdate"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "updatesPayload": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["validations"],
40
+ "properties": {
41
+ "validations": {
42
+ "type": "array",
43
+ "items": {
44
+ "$ref": "#/$defs/validationUpdate"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "validationUpdate": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["candidateId", "validation"],
53
+ "properties": {
54
+ "candidateId": {
55
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/candidateId"
56
+ },
57
+ "validation": {
58
+ "$ref": "#/$defs/validationRecord"
59
+ }
60
+ }
61
+ },
62
+ "validationRecord": {
63
+ "type": "object",
64
+ "additionalProperties": true,
65
+ "required": [
66
+ "disposition",
67
+ "method",
68
+ "confidence",
69
+ "confidence_rationale",
70
+ "rubric",
71
+ "evidence",
72
+ "counterevidence_or_proof_gap",
73
+ "remaining_uncertainty"
74
+ ],
75
+ "properties": {
76
+ "disposition": {
77
+ "type": "string",
78
+ "enum": ["reportable", "suppressed", "not_applicable", "deferred"]
79
+ },
80
+ "method": {
81
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
82
+ },
83
+ "confidence": {
84
+ "type": "string",
85
+ "enum": ["high", "medium", "low"]
86
+ },
87
+ "confidence_rationale": {
88
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
89
+ },
90
+ "rubric": {
91
+ "anyOf": [
92
+ {
93
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
94
+ },
95
+ {
96
+ "type": "object"
97
+ },
98
+ {
99
+ "type": "array",
100
+ "minItems": 1,
101
+ "items": {
102
+ "anyOf": [
103
+ {
104
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
105
+ },
106
+ {
107
+ "type": "object"
108
+ }
109
+ ]
110
+ }
111
+ }
112
+ ]
113
+ },
114
+ "evidence": {
115
+ "anyOf": [
116
+ {
117
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
118
+ },
119
+ {
120
+ "type": "array",
121
+ "minItems": 1,
122
+ "items": {
123
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
124
+ }
125
+ }
126
+ ]
127
+ },
128
+ "counterevidence_or_proof_gap": {
129
+ "type": "string"
130
+ },
131
+ "remaining_uncertainty": {
132
+ "type": "string"
133
+ },
134
+ "artifact_paths": {
135
+ "type": "array",
136
+ "items": {
137
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
138
+ }
139
+ },
140
+ "source": {
141
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
142
+ },
143
+ "control": {
144
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
145
+ },
146
+ "sink": {
147
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
148
+ },
149
+ "preconditions": {
150
+ "anyOf": [
151
+ {
152
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
153
+ },
154
+ {
155
+ "type": "array",
156
+ "minItems": 1,
157
+ "items": {
158
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
159
+ }
160
+ }
161
+ ]
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-security://schemas/tools/deep-reducer.schema.json",
4
+ "title": "Codex Security Deep Scan semantic reducer operations",
5
+ "$ref": "#/$defs/reductionInput",
6
+ "$defs": {
7
+ "reducerInputs": {
8
+ "type": "object",
9
+ "additionalProperties": false
10
+ },
11
+ "candidateId": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "pattern": "^(?=.*\\S)(?!\\.{1,2}$)[^/\\\\]+$"
15
+ },
16
+ "standardCandidate": {
17
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate",
18
+ "properties": {
19
+ "candidate_id": {
20
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/candidate_id"
21
+ },
22
+ "cwe_ids": {
23
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/cwe_ids"
24
+ },
25
+ "locations": {
26
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/locations"
27
+ },
28
+ "summary": {
29
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/summary"
30
+ },
31
+ "evidence": {
32
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/evidence"
33
+ },
34
+ "context": {
35
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/context"
36
+ },
37
+ "instance": {
38
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate/properties/instance"
39
+ }
40
+ },
41
+ "additionalProperties": false
42
+ },
43
+ "mergeSource": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["workerId", "candidateId"],
47
+ "properties": {
48
+ "workerId": {
49
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
50
+ },
51
+ "candidateId": { "$ref": "#/$defs/candidateId" }
52
+ }
53
+ },
54
+ "merge": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["candidateId", "sources", "remediationSubsumption"],
58
+ "properties": {
59
+ "candidateId": { "$ref": "#/$defs/candidateId" },
60
+ "sources": {
61
+ "type": "array",
62
+ "minItems": 1,
63
+ "items": { "$ref": "#/$defs/mergeSource" }
64
+ },
65
+ "remediationSubsumption": {
66
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
67
+ }
68
+ }
69
+ },
70
+ "reductionInput": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["candidates", "merges"],
74
+ "properties": {
75
+ "candidates": {
76
+ "type": "array",
77
+ "items": { "$ref": "#/$defs/standardCandidate" }
78
+ },
79
+ "merges": {
80
+ "type": "array",
81
+ "items": { "$ref": "#/$defs/merge" }
82
+ }
83
+ }
84
+ },
85
+ "workbenchReducerInputs": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["scanId"],
89
+ "properties": {
90
+ "scanId": {
91
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
92
+ },
93
+ "handoffClaimToken": {
94
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
95
+ }
96
+ }
97
+ },
98
+ "workbenchReductionInput": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["scanId", "candidates", "merges"],
102
+ "properties": {
103
+ "scanId": {
104
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
105
+ },
106
+ "handoffClaimToken": {
107
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
108
+ },
109
+ "candidates": {
110
+ "type": "array",
111
+ "items": { "$ref": "#/$defs/standardCandidate" }
112
+ },
113
+ "merges": {
114
+ "type": "array",
115
+ "items": { "$ref": "#/$defs/merge" }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-security://schemas/tools/discovery-candidates.schema.json",
4
+ "$defs": {
5
+ "recordDiscoveryCandidatesInput": {
6
+ "type": "object",
7
+ "properties": {
8
+ "candidates": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/rawDiscoveryCandidate"
12
+ }
13
+ }
14
+ },
15
+ "required": ["candidates"],
16
+ "additionalProperties": false
17
+ },
18
+ "workbenchRecordDiscoveryCandidatesInput": {
19
+ "type": "object",
20
+ "properties": {
21
+ "scanId": { "type": "string", "pattern": "\\S" },
22
+ "candidates": {
23
+ "type": "array",
24
+ "items": {
25
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/rawDiscoveryCandidate"
26
+ }
27
+ }
28
+ },
29
+ "required": ["scanId", "candidates"],
30
+ "additionalProperties": false
31
+ },
32
+ "listCandidatesInput": {
33
+ "type": "object",
34
+ "properties": {
35
+ "cursor": {
36
+ "type": "string",
37
+ "pattern": "^(?:0|[1-9][0-9]*)$"
38
+ },
39
+ "limit": { "type": "integer", "minimum": 1, "maximum": 1000 }
40
+ },
41
+ "additionalProperties": false
42
+ },
43
+ "workbenchListCandidatesInput": {
44
+ "type": "object",
45
+ "properties": {
46
+ "scanId": { "type": "string", "pattern": "\\S" },
47
+ "cursor": {
48
+ "type": "string",
49
+ "pattern": "^(?:0|[1-9][0-9]*)$"
50
+ },
51
+ "limit": { "type": "integer", "minimum": 1, "maximum": 1000 }
52
+ },
53
+ "required": ["scanId"],
54
+ "additionalProperties": false
55
+ },
56
+ "recordDiscoveryCandidatesResult": {
57
+ "type": "object",
58
+ "properties": {
59
+ "operation": { "const": "replace" },
60
+ "candidatesRecorded": { "type": "integer", "minimum": 0 }
61
+ },
62
+ "required": ["operation", "candidatesRecorded"],
63
+ "additionalProperties": false
64
+ },
65
+ "listCandidatesResult": {
66
+ "type": "object",
67
+ "properties": {
68
+ "rows": {
69
+ "type": "array",
70
+ "items": {
71
+ "$ref": "codex-security://schemas/definitions/discovery-candidate.schema.json#/$defs/discoveryCandidate"
72
+ }
73
+ },
74
+ "nextCursor": {
75
+ "type": "string",
76
+ "pattern": "^(?:0|[1-9][0-9]*)$"
77
+ }
78
+ },
79
+ "required": ["rows"],
80
+ "additionalProperties": false
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "codex-security://schemas/tools/review-items.schema.json",
4
+ "$defs": {
5
+ "prepareInput": {
6
+ "type": "object",
7
+ "properties": {
8
+ "scanId": {
9
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
10
+ },
11
+ "handoffClaimToken": {
12
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
13
+ }
14
+ },
15
+ "required": ["scanId"],
16
+ "additionalProperties": false
17
+ },
18
+ "prepareOutput": {
19
+ "type": "object",
20
+ "properties": {
21
+ "reviewItemsTotal": {
22
+ "type": "integer",
23
+ "minimum": 0
24
+ }
25
+ },
26
+ "required": ["reviewItemsTotal"],
27
+ "additionalProperties": false
28
+ },
29
+ "reviewItemsInput": {
30
+ "type": "object",
31
+ "properties": {
32
+ "scanId": {
33
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
34
+ },
35
+ "handoffClaimToken": {
36
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
37
+ },
38
+ "cursor": {
39
+ "type": "string",
40
+ "pattern": "^(?:0|[1-9][0-9]*)$"
41
+ },
42
+ "limit": {
43
+ "type": "integer",
44
+ "minimum": 1,
45
+ "maximum": 1000
46
+ }
47
+ },
48
+ "required": ["scanId"],
49
+ "additionalProperties": false
50
+ },
51
+ "reviewItemsWorkerInput": {
52
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/page"
53
+ },
54
+ "reviewItem": {
55
+ "type": "object",
56
+ "properties": {
57
+ "path": {
58
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
59
+ }
60
+ },
61
+ "required": ["path"],
62
+ "additionalProperties": false
63
+ },
64
+ "reviewItemsOutput": {
65
+ "type": "object",
66
+ "properties": {
67
+ "items": {
68
+ "type": "array",
69
+ "items": { "$ref": "#/$defs/reviewItem" }
70
+ },
71
+ "nextCursor": {
72
+ "type": "string",
73
+ "pattern": "^(?:0|[1-9][0-9]*)$"
74
+ }
75
+ },
76
+ "required": ["items"],
77
+ "additionalProperties": false
78
+ }
79
+ }
80
+ }