{"record":{"id":"c35993c0369d6580","repo":"can1357/oh-my-pi","slug":"disposition-requires-scan-id-finding-id-statu","errorCode":null,"errorMessage":"disposition requires <scan-id> <finding-id> <status> [rationale]","messagePattern":"disposition requires <scan-id> <finding-id> <status> \\[rationale\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/slash-commands/helpers/security.ts","lineNumber":337,"sourceCode":"\t\t\tconst bundle = await pullCodexSecurityCloudResults({\n\t\t\t\tclient,\n\t\t\t\tconfigurationId: options.configurationId,\n\t\t\t\tstore,\n\t\t\t});\n\t\t\tawait runtime.output(\n\t\t\t\t`Imported ${bundle.findings.length} Codex Security cloud finding(s) as security scan ${bundle.scan.id}.`,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tdefault:\n\t\t\tthrow new Error(\"Usage: /security cloud <scans|start|status|pull>\");\n\t}\n}\n\nasync function updateDisposition(runtime: SlashCommandRuntime, rest: string): Promise<void> {\n\tconst [scanId, findingId, status, ...rationaleParts] = parseCommandArgs(rest);\n\tif (!scanId || !findingId || !status) {\n\t\tthrow new Error(\"disposition requires <scan-id> <finding-id> <status> [rationale]\");\n\t}\n\tif (!DISPOSITIONS.has(status as SecurityDispositionStatus)) throw new Error(`Unknown disposition: ${status}`);\n\tconst rationale = rationaleParts.join(\" \").trim();\n\tif (status !== \"open\" && !rationale) throw new Error(`${status} requires a rationale`);\n\tconst store = await SecurityStore.openForCwd(runtime.cwd);\n\tconst finding = await store.updateDisposition(scanId, findingId, {\n\t\tstatus: status as SecurityDispositionStatus,\n\t\trationale: rationale || undefined,\n\t\tupdatedAt: new Date().toISOString(),\n\t\tactor: \"operator\",\n\t});\n\tawait runtime.output(`Finding ${finding.id} disposition is now ${finding.disposition.status}.`);\n}\n\nexport async function handleSecurityCommand(\n\tcommand: ParsedSlashCommand,\n\truntime: SlashCommandRuntime,\n): Promise<SlashCommandResult> {","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/slash-commands/helpers/security.ts#L319-L355","documentation":"Thrown by updateDisposition when fewer than three positional arguments are present. The /security disposition command requires scan-id, finding-id, and status; an optional rationale follows. parseCommandArgs splits the argument string and the handler checks all three required slots before touching the store.","triggerScenarios":"Run `/security disposition scan_1` or `/security disposition scan_1 finding_2` — missing the status or more. Quoted rationale strings that swallow following tokens can also leave slots empty.","commonSituations":"Forgetting the status word; ids containing spaces without quotes confusing token order; copying an example truncated at three words.","solutions":["Provide all three: `/security disposition <scan-id> <finding-id> <status>`.","Append a rationale when the status is not `open` (see the related rationale error).","Quote the rationale if it contains spaces: `\"false positive: dependency\"`.","Find valid scan/finding ids via `/security scans` and the scan's findings output."],"exampleFix":"// before\n/security disposition secscan_1 finding_7\n// after\n/security disposition secscan_1 finding_7 triaged \"dup of finding_3\"","handlingStrategy":"validation","validationCode":"const tokens = rest.match(/(?:[^\\s\"]+|\"[^\"]*\")+|[^\\s]+/g) ?? [];\nif (tokens.length < 3) throw new Error(\"usage: /security disposition <scan-id> <finding-id> <status> [rationale]\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include scan-id, finding-id, and status in that order.","Quote rationales containing spaces so they don't shift token positions.","Keep ids handy from `/security scans` output before running disposition."],"tags":["cli","missing-argument","usage"],"backgroundTag":"missing-required-argument","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}