{"record":{"id":"137c1c9b37c16be2","repo":"diegosouzapw/OmniRoute","slug":"security-001-137c1c","errorCode":"SECURITY_001","errorMessage":"Request blocked: potential prompt injection detected","messagePattern":"Request blocked: potential prompt injection detected","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"src/app/api/v1/responses/route.ts","lineNumber":156,"sourceCode":"    } catch (error) {\n      console.error(\"[SECURITY] Injection guard error:\", error);\n      return finishAdmission(\n        new Response(JSON.stringify({ error: \"Security check failed\" }), {\n          status: 500,\n          headers: { \"Content-Type\": \"application/json\" },\n        })\n      );\n    }\n\n    const { blocked, result } = guardResult;\n    if (blocked) {\n      return finishAdmission(\n        new Response(\n          JSON.stringify({\n            error: {\n              message: \"Request blocked: potential prompt injection detected\",\n              type: \"injection_detected\",\n              code: \"SECURITY_001\",\n              detections: result.detections.length,\n            },\n          }),\n          { status: 400, headers: { ...CORS_HEADERS, \"Content-Type\": \"application/json\" } }\n        )\n      );\n    }\n    if (result.flagged) {\n      try {\n        request.headers.set(\"X-Injection-Flagged\", \"true\");\n        request.headers.set(\"X-Injection-Detections\", String(result.detections.length));\n      } catch {\n        // Detection already ran; metadata propagation is best-effort.\n      }\n    }\n\n    // Codex CLI (wire_api=\"responses\") consumes this endpoint over SSE and its reqwest\n    // client drops the connection if no bytes arrive within ~5s. Keep the connection","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/api/v1/responses/route.ts#L138-L174","documentation":"Error \"Request blocked: potential prompt injection detected\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/api/v1/responses/route.ts:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}