INNER CODE UNIT · TypeScript

boundedErrorData

openai/codex-security · plugins/codex-security/mcp-app/server.ts:2335

function boundedErrorData(error: unknown): { message: string; name: string } {
  const name =
    error instanceof Error && error.name.trim() ? error.name : "UnknownError";
  return {
    name: name.slice(0, 128),
    message: (error instanceof Error
      ? error.message
      : typeof error === "string"
        ? error
        : "Unknown user-input elicitation failure."
    ).slice(0, 1000),
  };
}

function deepScanTerminalResult(run: DeepScanRunState) {
  if (run.status === "succeeded") {
    if (!run.manifestPath) return undefined;
    const instructions = `Deep Scan discovery completed. Independent Standard scans have already performed validation and attack-path analysis and have been consolidated into the canonical scan-manifest.json, findings.json, and coverage.json under ${run.scanDir}. The returned manifestPath is the canonical scan-manifest.json, not a legacy discovery manifest. Any instructions requiring parent candidate listing, centralized validation, attack-path analysis, or another draft apply only to the old discovery-only workflow and must be skipped. The authoritative scan ID is ${run.scanId}. Immediately call complete_codex_security_scan once using that scan ID to seal and publish the scan. Return output only after completion succeeds and generated report.md exists. If completion fails, surface that exact error and return no final, no-findings, structured, or benchmark response.`;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…