OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
refactor(mcp): validate artifact requests at tool boundaries (#1489)
mldangelo-oaib8f53ad1c827
diff --git a/plugins/codex-security/mcp-app/src/artifact-attack-path.ts b/plugins/codex-security/mcp-app/src/artifact-attack-path.tsindex 305559efc..534c42ff6 100644--- a/plugins/codex-security/mcp-app/src/artifact-attack-path.ts+++ b/plugins/codex-security/mcp-app/src/artifact-attack-path.ts@@ -50,13 +50,6 @@ interface CandidateAttackPathsPayload {attackPaths: CandidateAttackPathUpdate[];}-/** The stored JSON Schema is the sole source of the nested attack-path contract. */-const candidateAttackPathsPayloadSchema = loadArtifactZodSchema(- documents,- attackPathSchema.$id,- "updatesPayload",-) as z.ZodType<CandidateAttackPathsPayload>;-/** The checked-in public schema controls both tools/list and call validation. */export const candidateAttackPathsInputSchema = loadArtifactZodSchema(documents,@@ -87,7 +80,8 @@ export async function recordCodexSecurityCandidateAttackPaths();}- const { attackPaths } = candidateAttackPathsPayloadSchema.parse(input);+ // The MCP registry validates this request before invoking the writer.+ const { attackPaths } = input;const updates = new Map<string, CandidateAttackPathRecord>();for (const update of attackPaths) {if (updates.has(update.candidateId)) {diff --git a/plugins/codex-security/mcp-app/src/artifact-discovery.ts b/plugins/codex-security/mcp-app/src/artifact-discovery.tsindex de57eb78b..f5a0e7202 100644--- a/plugins/codex-security/mcp-app/src/artifact-discovery.ts+++ b/plugins/codex-security/mcp-app/src/artifact-discovery.ts@@ -17,6 +17,7 @@ import discoveryCandidatesToolSchema from "../../schemas/tools/discovery-candidaimport type { ArtifactContext } from "./artifact-context.js";import {artifactDestination,+ type ArtifactPage,paginateArtifactRows,readArtifactJsonl,artifactSourcePath,@@ -64,11 +65,6 @@ export interface DiscoveryCandidatesInput {candidates: RawDiscoveryCandidate[];}-export interface ListCodexSecurityCandidatesInput {- cursor?: string;- limit?: number;-}-export type CompactDiscoveryCandidate = z.infer<typeof candidateSchemaV1> &Record<string, unknown>;@@ -79,37 +75,28 @@ export const compactDiscoveryCandidateSchema = loadArtifactZodSchema("discoveryCandidate",) as z.ZodType<CompactDiscoveryCandidate>;-export const discoveryCandidatesInputSchema = loadArtifactZodSchema(- discoverySchemaDocuments,- discoveryCandidatesToolSchema.$id,- "recordDiscoveryCandidatesInput",-) as z.ZodType<DiscoveryCandidatesInput>;-export const workbenchDiscoveryCandidatesInputSchema = loadArtifactZodSchema(discoverySchemaDocuments,discoveryCandidatesToolSchema.$id,"workbenchRecordDiscoveryCandidatesInput",) as z.ZodType<DiscoveryCandidatesInput & { scanId: string }>;-export const listCodexSecurityCandidatesInputSchema = loadArtifactZodSchema(- discoverySchemaDocuments,- discoveryCandidatesToolSchema.$id,- "listCandidatesInput",-) as z.ZodType<ListCodexSecurityCandidatesInput>;-export const workbenchListCodexSecurityCandidatesInputSchema =loadArtifactZodSchema(discoverySchemaDocuments,discoveryCandidatesToolSchema.$id,"workbenchListCandidatesInput",- ) as z.ZodType<ListCodexSecurityCandidatesInput & { scanId: string }>;+ ) as z.ZodType<ArtifactPage & { scanId: string }>;-/** Normalize in memory and replace the bound canonical candidate ledger. */+/**+ * Normalize in memory and replace the bound canonical candidate ledger.+ * The MCP registry validates the request before invoking this writer.+ */export async function recordCodexSecurityDiscoveryCandidates(input: DiscoveryCandidatesInput,context: ArtifactContext,) {- const { candidates } = discoveryCandidatesInputSchema.parse(input);+ const { candidates } = input;const inventoryComponents = [...discoveryComponents, "in_scope_files.txt"];const inventory = await artifactSourcePath(context,@@ -233,15 +220,15 @@ except subprocess.CalledProcessError as error:/** Read the actual compact ledger, including records added by later shared phases. */export async function listCodexSecurityCandidates(- input: ListCodexSecurityCandidatesInput,+ input: ArtifactPage,context: ArtifactContext,) {- const page = listCodexSecurityCandidatesInputSchema.parse(input);+ // The MCP registry validates paging before invoking this reader.const rows = await readArtifactJsonl(context,[...discoveryComponents, "candidate_ledger.jsonl"],discoveryLabel,compactDiscoveryCandidateSchema,);- return paginateArtifactRows(rows, page, discoveryLabel);+ return paginateArtifactRows(rows, input, discoveryLabel);}diff --git a/plugins/codex-security/mcp-app/src/artifact-io.ts b/plugins/codex-security/mcp-app/src/artifact-io.tsindex e78f9b680..9d163d45e 100644--- a/plugins/codex-security/mcp-app/src/artifact-io.ts+++ b/plugins/codex-security/mcp-app/src/artifact-io.ts@@ -184,20 +184,13 @@ export function paginateArtifactRows<Row>(page: ArtifactPage,label: string,): ArtifactPageResult<Row> {- const cursor = page.cursor ?? "0";- if (!/^(?:0|[1-9][0-9]*)$/u.test(cursor)) {- throw new Error(label + ": cursor must be a non-negative integer string.");- }- const start = Number(cursor);+ // The MCP tool schemas validate cursor syntax and limit bounds.+ const start = Number(page.cursor ?? "0");if (!Number.isSafeInteger(start) || start > rows.length) {throw new Error(label + ": cursor is outside the available rows.");}const limit = page.limit ?? 200;- if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1000) {- throw new Error(label + ": limit must be an integer from 1 through 1000.");- }-const end = Math.min(rows.length, start + limit);return {rows: rows.slice(start, end),diff --git a/plugins/codex-security/mcp-app/src/artifact-validation-phase.ts b/plugins/codex-security/mcp-app/src/artifact-validation-phase.tsindex 44364dc39..47aa2fcb6 100644--- a/plugins/codex-security/mcp-app/src/artifact-validation-phase.ts+++ b/plugins/codex-security/mcp-app/src/artifact-validation-phase.ts@@ -42,13 +42,6 @@ interface CandidateValidationUpdates {validations: CandidateValidationUpdate[];}-/** The nested validation record used by compact Deep candidate validation. */-const candidateValidationUpdatesSchema = loadArtifactZodSchema(- documents,- validationSchema.$id,- "updatesPayload",-) as z.ZodType<CandidateValidationUpdates>;-/** Public workbench input; the bound context, never the caller, selects the artifact. */export const candidateValidationsInputSchema = loadArtifactZodSchema(documents,@@ -78,7 +71,8 @@ export async function recordCodexSecurityCandidateValidations();}- const { validations } = candidateValidationUpdatesSchema.parse(input);+ // The MCP registry validates this request before invoking the writer.+ const { validations } = input;const rows = await readArtifactJsonl(context,candidateLedgerComponents,diff --git a/plugins/codex-security/mcp-app/src/server/compact-artifact-tools.ts b/plugins/codex-security/mcp-app/src/server/compact-artifact-tools.tsindex cb01ffdbe..5dea2670e 100644--- a/plugins/codex-security/mcp-app/src/server/compact-artifact-tools.ts+++ b/plugins/codex-security/mcp-app/src/server/compact-artifact-tools.ts@@ -117,7 +117,7 @@ export function registerCompactArtifactTools(readOnly: false,handler: async (input, requestContext) => {return recordCodexSecurityDiscoveryCandidates(- { candidates: input.candidates },+ input,await phaseScanContext(input, options, requestContext, "diff"),);},@@ -131,10 +131,7 @@ export function registerCompactArtifactTools(readOnly: true,handler: async (input, requestContext) => {return listCodexSecurityCandidates(- {- ...(input.cursor === undefined ? {} : { cursor: input.cursor }),- ...(input.limit === undefined ? {} : { limit: input.limit }),- },+ input,await phaseScanContext(input, options, requestContext),);},@@ -150,7 +147,7 @@ export function registerCompactArtifactTools(handler: async (input, requestContext) => {return recordCodexSecurityCandidateValidations(await phaseScanContext(input, options, requestContext),- { validations: input.validations },+ input,);},});@@ -165,7 +162,7 @@ export function registerCompactArtifactTools(handler: async (input, requestContext) => {return recordCodexSecurityCandidateAttackPaths(await phaseScanContext(input, options, requestContext),- { attackPaths: input.attackPaths },+ input,);},});diff --git a/plugins/codex-security/mcp-app/tests/test_artifact_attack_path.ts b/plugins/codex-security/mcp-app/tests/test_artifact_attack_path.tsindex c34e10812..859bea80f 100644--- a/plugins/codex-security/mcp-app/tests/test_artifact_attack_path.ts+++ b/plugins/codex-security/mcp-app/tests/test_artifact_attack_path.ts@@ -23,7 +23,6 @@ try {await testUnknownAndDuplicateCandidatesDoNotChangeLedger();await testMissingEligibleCandidateDoesNotChangeLedger();await testIneligibleCandidatesDoNotChangeLedger();- await testInvalidAttackPathsDoNotChangeLedger();await testDuplicateStoredCandidatesDoNotChangeLedger();await testMalformedLedgerIsNotReplaced();await testEmptyLedgerAcceptsAnEmptyBatch();@@ -41,7 +40,6 @@ async function testSchemaMatchesDocumentedAttackPathDecisions() {assert.deepEqual(schema.$defs.input.required, ["scanId", "attackPaths"]);assert.equal(schema.$defs.input.additionalProperties, false);assert.equal(schema.$ref, "#/$defs/input");- assert.deepEqual(schema.$defs.updatesPayload.required, ["attackPaths"]);assert.deepEqual(schema.$defs.reportableAttackPath.properties.severity.enum, ["critical","high",@@ -194,35 +192,6 @@ async function testIneligibleCandidatesDoNotChangeLedger() {}}-async function testInvalidAttackPathsDoNotChangeLedger() {- const fixture = await createFixture("invalid attack judgments", [- candidate("candidate-1", "reportable"),- ]);- const invalid = [- { ...attackPath(), severity: "moderate" },- { ...attackPath(), decision: "ignore" },- { ...attackPath(), decision: "deferred" },- { ...attackPath(), severity_rationale: " " },- ];-- for (const value of invalid) {- const payload = {- attackPaths: [{ candidateId: "candidate-1", attackPath: value }],- };- assert.equal(- candidateAttackPathsInputSchema.safeParse({- scanId,- ...payload,- }).success,- false,- );- await assert.rejects(- recordCodexSecurityCandidateAttackPaths(fixture.context, payload),- );- await assertUnchanged(fixture);- }-}-async function testDuplicateStoredCandidatesDoNotChangeLedger() {const fixture = await createFixture("duplicate ledger rows", [candidate("candidate-1", "reportable"),diff --git a/plugins/codex-security/mcp-app/tests/test_artifact_discovery.ts b/plugins/codex-security/mcp-app/tests/test_artifact_discovery.tsindex acc3e75f6..ab6802d3c 100644--- a/plugins/codex-security/mcp-app/tests/test_artifact_discovery.ts+++ b/plugins/codex-security/mcp-app/tests/test_artifact_discovery.ts@@ -23,9 +23,7 @@ import { importSource } from "./import-module.ts";const {compactDiscoveryCandidateSchema,- discoveryCandidatesInputSchema,listCodexSecurityCandidates,- listCodexSecurityCandidatesInputSchema,recordCodexSecurityDiscoveryCandidates,workbenchDiscoveryCandidatesInputSchema,workbenchListCodexSecurityCandidatesInputSchema,@@ -80,9 +78,6 @@ assert.equal(false,);assert.equal(definitions.$defs.discoveryCandidate.additionalProperties, true);-assert.deepEqual(toolSchemas.$defs.recordDiscoveryCandidatesInput.required, [- "candidates",-]);assert.deepEqual(toolSchemas.$defs.workbenchRecordDiscoveryCandidatesInput.required,["scanId", "candidates"],@@ -128,7 +123,10 @@ try {async function verifyInputSchema() {const parseCandidate = (value: unknown) =>- discoveryCandidatesInputSchema.safeParse({ candidates: [value] });+ workbenchDiscoveryCandidatesInputSchema.safeParse({+ scanId: "scan-fixture",+ candidates: [value],+ });const candidate = rawCandidate();assert.equal(parseCandidate(candidate).success, true);assert.equal(@@ -181,17 +179,9 @@ async function verifyInputSchema() {false,);assert.equal(- discoveryCandidatesInputSchema.safeParse({ candidates: [] }).success,- true,- );- assert.equal(- discoveryCandidatesInputSchema.safeParse({ rows: [candidate] }).success,- false,- );- assert.equal(- discoveryCandidatesInputSchema.safeParse({+ workbenchDiscoveryCandidatesInputSchema.safeParse({scanId: "scan-fixture",- candidates: [],+ rows: [candidate],}).success,false,);@@ -208,16 +198,6 @@ async function verifyInputSchema() {}).success,false,);- assert.equal(- listCodexSecurityCandidatesInputSchema.safeParse({}).success,- true,- );- assert.equal(- listCodexSecurityCandidatesInputSchema.safeParse({- scanId: "scan-fixture",- }).success,- false,- );assert.equal(workbenchListCodexSecurityCandidatesInputSchema.safeParse({scanId: "scan-fixture",@@ -229,15 +209,24 @@ async function verifyInputSchema() {false,);assert.equal(- listCodexSecurityCandidatesInputSchema.safeParse({ cursor: "01" }).success,+ workbenchListCodexSecurityCandidatesInputSchema.safeParse({+ scanId: "scan-fixture",+ cursor: "01",+ }).success,false,);assert.equal(- listCodexSecurityCandidatesInputSchema.safeParse({ limit: 0 }).success,+ workbenchListCodexSecurityCandidatesInputSchema.safeParse({+ scanId: "scan-fixture",+ limit: 0,+ }).success,false,);assert.equal(- listCodexSecurityCandidatesInputSchema.safeParse({ limit: 1001 }).success,+ workbenchListCodexSecurityCandidatesInputSchema.safeParse({+ scanId: "scan-fixture",+ limit: 1001,+ }).success,false,);}diff --git a/plugins/codex-security/mcp-app/tests/test_artifact_foundation.ts b/plugins/codex-security/mcp-app/tests/test_artifact_foundation.tsindex c66115c50..bf0288776 100644--- a/plugins/codex-security/mcp-app/tests/test_artifact_foundation.ts+++ b/plugins/codex-security/mcp-app/tests/test_artifact_foundation.ts@@ -474,18 +474,10 @@ async function testBoundedPagination() {io.paginateArtifactRows(rows, { cursor: "2", limit: 2 }, "review_items"),{ rows: rows.slice(2) },);- assert.throws(- () => io.paginateArtifactRows(rows, { cursor: "-1" }, "review_items"),- /non-negative integer/,- );assert.throws(() => io.paginateArtifactRows(rows, { cursor: "4" }, "review_items"),/outside the available rows/,);- assert.throws(- () => io.paginateArtifactRows(rows, { limit: 1001 }, "review_items"),- /1 through 1000/,- );}async function testUnsafeArtifacts() {diff --git a/plugins/codex-security/mcp-app/tests/test_artifact_inventory.ts b/plugins/codex-security/mcp-app/tests/test_artifact_inventory.tsindex e5bf77567..86082c9f3 100644--- a/plugins/codex-security/mcp-app/tests/test_artifact_inventory.ts+++ b/plugins/codex-security/mcp-app/tests/test_artifact_inventory.ts@@ -30,7 +30,7 @@ try {await testPrepareUsesOnlyAuthoritativeDiffChanges();await testPrepareIncludesStagedAndUnstagedChanges();await testWorkerReadsItsOwnBoundInventory();- await testCursorAndLimitAreValidated();+ await testCursorDoesNotExceedInventory();await testEmptyInventoryIsValid();await testUnsafeInventoryRowsAreRejected();await testSymlinkedInventoryIsRejected();@@ -351,26 +351,14 @@ async function testWorkerReadsItsOwnBoundInventory() {);}-async function testCursorAndLimitAreValidated() {+async function testCursorDoesNotExceedInventory() {const fixture = await createFixture("inventory paging");await writeInventory(fixture.scanInventory, "./src/a.ts\n./src/b.ts\n");- await assert.rejects(- inventory.listCodexSecurityReviewItems(fixture.scan, { cursor: "-1" }),- /cursor/i,- );await assert.rejects(inventory.listCodexSecurityReviewItems(fixture.scan, { cursor: "3" }),/cursor/i,);- await assert.rejects(- inventory.listCodexSecurityReviewItems(fixture.scan, { limit: 0 }),- /limit/i,- );- await assert.rejects(- inventory.listCodexSecurityReviewItems(fixture.scan, { limit: 1001 }),- /limit/i,- );}async function testEmptyInventoryIsValid() {diff --git a/plugins/codex-security/mcp-app/tests/test_artifact_validation_phase.ts b/plugins/codex-security/mcp-app/tests/test_artifact_validation_phase.tsindex a4b0964d7..ff6c1aa4d 100644--- a/plugins/codex-security/mcp-app/tests/test_artifact_validation_phase.ts+++ b/plugins/codex-security/mcp-app/tests/test_artifact_validation_phase.ts@@ -157,24 +157,6 @@ try {},/repeats candidate candidate-b/,);- await assertNoMutation(- context,- ledger,- {- validations: [- {- candidateId: "candidate-a",- validation: {- ...firstValidation,- confidence: "certain",- },- },- updates[0],- ],- },- /confidence/,- );-await assertNoMutation({ ...context, layout: "worker" },ledger,diff --git a/plugins/codex-security/mcp-app/tests/test_compact_artifact_server.ts b/plugins/codex-security/mcp-app/tests/test_compact_artifact_server.tsindex ae019c10d..0a68a7e20 100644--- a/plugins/codex-security/mcp-app/tests/test_compact_artifact_server.ts+++ b/plugins/codex-security/mcp-app/tests/test_compact_artifact_server.ts@@ -138,7 +138,7 @@ async function testCompactDiffScanCompletion(mode: "diff",diffTarget: { kind: "range", baseRevision, headRevision },};- const { scanId, handoffClaimToken } = await startScan(+ const { scanId, scanDir, handoffClaimToken } = await startScan(call,ownerThread,selection,@@ -158,6 +158,24 @@ async function testCompactDiffScanCompletion(`${runtimeLabel}: authenticate compact diff owner`,);+ for (const name of [+ "list_codex_security_review_items",+ "list_codex_security_candidates",+ ]) {+ for (const page of [+ { cursor: "-1" },+ { cursor: "01" },+ { limit: 0 },+ { limit: 1001 },+ ]) {+ requireToolError(+ await call(name, { scanId, ...page }),+ /Input validation error/,+ `${runtimeLabel}: reject invalid ${name} paging`,+ );+ }+ }+for (const reserved of ["artifacts/02_discovery/candidate_ledger.jsonl","artifacts/02_discovery/in_scope_files.txt",@@ -197,22 +215,35 @@ async function testCompactDiffScanCompletion({ path: "src/handler.py" },]);+ const candidateInput = {+ cwe_ids: [],+ locations: [+ { path: "src/handler.py", start_line: 1, role: "root_control" },+ ],+ summary: "The changed handler may rely on the removed guard.",+ evidence: "The selected change removes a neighboring guard.",+ };requireSuccessfulTool(await call("record_codex_security_discovery_candidates", {scanId,- candidates: [- {- cwe_ids: [],- locations: [- { path: "src/handler.py", start_line: 1, role: "root_control" },- ],- summary: "The changed handler may rely on the removed guard.",- evidence: "The selected change removes a neighboring guard.",- },- ],+ candidates: [candidateInput],}),`${runtimeLabel}: record a diff candidate alongside a deleted file`,);+ const ledger = path.join(+ scanDir,+ "artifacts/02_discovery/candidate_ledger.jsonl",+ );+ const before = await readFile(ledger, "utf8");+ requireToolError(+ await call("record_codex_security_discovery_candidates", {+ scanId,+ candidates: [candidateInput, { ...candidateInput, evidence: " " }],+ }),+ /Input validation error/,+ `${runtimeLabel}: reject a malformed mixed discovery batch`,+ );+ assert.equal(await readFile(ledger, "utf8"), before);const candidates = requireSuccessfulTool<{rows: { candidate_id: string }[];}>(@@ -1033,6 +1064,43 @@ async function testClaimedParentArtifactOperations(});const originalLedger = await readFile(ledgerPath, "utf8");+ const { validation, attack_path: attackPath } = JSON.parse(originalLedger);+ const validationLedger = `${originalLedger}${JSON.stringify({+ ...seededCandidate,+ candidate_id: "candidate-valid",+ })}\n`;+ await writeFile(ledgerPath, validationLedger);+ requireToolError(+ await call("record_codex_security_candidate_validations", {+ scanId,+ validations: [+ { candidateId, validation: { ...validation, confidence: "certain" } },+ { candidateId: "candidate-valid", validation },+ ],+ }),+ /confidence/,+ `${runtimeLabel}: reject invalid validation confidence`,+ );+ assert.equal(await readFile(ledgerPath, "utf8"), validationLedger);+ await writeFile(ledgerPath, originalLedger);+ for (const invalid of [+ { severity: "moderate" },+ { decision: "ignore" },+ { decision: "deferred" },+ { severity_rationale: " " },+ ]) {+ requireToolError(+ await call("record_candidate_attack_paths", {+ scanId,+ attackPaths: [+ { candidateId, attackPath: { ...attackPath, ...invalid } },+ ],+ }),+ /Input validation error/,+ `${runtimeLabel}: reject invalid attack-path judgment`,+ );+ assert.equal(await readFile(ledgerPath, "utf8"), originalLedger);+ }for (const [name, arguments_] of phaseCalls) {requireToolError(await call(name, arguments_, otherThread),diff --git a/plugins/codex-security/schemas/definitions/artifact-common.schema.json b/plugins/codex-security/schemas/definitions/artifact-common.schema.jsonindex 635103a98..6a286b8fc 100644--- a/plugins/codex-security/schemas/definitions/artifact-common.schema.json+++ b/plugins/codex-security/schemas/definitions/artifact-common.schema.json@@ -22,21 +22,6 @@"minLength": 1,"maxLength": 512,"pattern": "^(?!\\.{1,2}$)(?!.*[\\u0000-\\u001f\\u007f])(?=.*\\S)[^/\\\\]+$"- },- "page": {- "type": "object",- "properties": {- "cursor": {- "type": "string",- "pattern": "^(?:0|[1-9][0-9]*)$"- },- "limit": {- "type": "integer",- "minimum": 1,- "maximum": 1000- }- },- "additionalProperties": false}}}diff --git a/plugins/codex-security/schemas/tools/candidate-attack-paths.schema.json b/plugins/codex-security/schemas/tools/candidate-attack-paths.schema.jsonindex 63695fe8f..122edcb13 100644--- a/plugins/codex-security/schemas/tools/candidate-attack-paths.schema.json+++ b/plugins/codex-security/schemas/tools/candidate-attack-paths.schema.json@@ -20,16 +20,6 @@}}},- "updatesPayload": {- "type": "object",- "additionalProperties": false,- "required": ["attackPaths"],- "properties": {- "attackPaths": {- "$ref": "#/$defs/input/properties/attackPaths"- }- }- },"attackPathUpdate": {"type": "object","additionalProperties": false,diff --git a/plugins/codex-security/schemas/tools/candidate-validations.schema.json b/plugins/codex-security/schemas/tools/candidate-validations.schema.jsonindex 41528ab62..6135af5c9 100644--- a/plugins/codex-security/schemas/tools/candidate-validations.schema.json+++ b/plugins/codex-security/schemas/tools/candidate-validations.schema.json@@ -20,16 +20,6 @@}}},- "updatesPayload": {- "type": "object",- "additionalProperties": false,- "required": ["validations"],- "properties": {- "validations": {- "$ref": "#/$defs/input/properties/validations"- }- }- },"validationUpdate": {"type": "object","additionalProperties": false,diff --git a/plugins/codex-security/schemas/tools/discovery-candidates.schema.json b/plugins/codex-security/schemas/tools/discovery-candidates.schema.jsonindex e69f51cb0..d758a4374 100644--- a/plugins/codex-security/schemas/tools/discovery-candidates.schema.json+++ b/plugins/codex-security/schemas/tools/discovery-candidates.schema.json@@ -2,9 +2,10 @@"$schema": "https://json-schema.org/draft/2020-12/schema","$id": "codex-security://schemas/tools/discovery-candidates.schema.json","$defs": {- "recordDiscoveryCandidatesInput": {+ "workbenchRecordDiscoveryCandidatesInput": {"type": "object","properties": {+ "scanId": { "type": "string", "pattern": "\\S" },"candidates": {"type": "array","items": {@@ -12,31 +13,9 @@}}},- "required": ["candidates"],- "additionalProperties": false- },- "workbenchRecordDiscoveryCandidatesInput": {- "type": "object",- "properties": {- "scanId": { "type": "string", "pattern": "\\S" },- "candidates": {- "$ref": "#/$defs/recordDiscoveryCandidatesInput/properties/candidates"- }- },"required": ["scanId", "candidates"],"additionalProperties": false},- "listCandidatesInput": {- "type": "object",- "properties": {- "cursor": {- "type": "string",- "pattern": "^(?:0|[1-9][0-9]*)$"- },- "limit": { "type": "integer", "minimum": 1, "maximum": 1000 }- },- "additionalProperties": false- },"workbenchListCandidatesInput": {"type": "object","properties": {