{"record":{"id":"6a2b1a5f279a7fe7","repo":"diegosouzapw/OmniRoute","slug":"api-key-secret-is-required-for-api-key-crc-operati","errorCode":null,"errorMessage":"API_KEY_SECRET is required for API key CRC operations. The startup validator (instrumentation-node.ts) should have set this automatically.","messagePattern":"API_KEY_SECRET is required for API key CRC operations\\. The startup validator \\(instrumentation-node\\.ts\\) should have set this automatically\\.","errorType":"panic","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/shared/utils/apiKey.ts","lineNumber":11,"sourceCode":"import crypto from \"crypto\";\n\n// FASE-01: No hardcoded fallback — enforced by secretsValidator at startup\nif (!process.env.API_KEY_SECRET) {\n  console.error(\"[SECURITY] API_KEY_SECRET is not set. API key CRC validation is disabled.\");\n}\n\nfunction getApiKeySecret(): string {\n  const secret = process.env.API_KEY_SECRET;\n  if (!secret || secret.trim() === \"\") {\n    throw new Error(\n      \"API_KEY_SECRET is required for API key CRC operations. \" +\n        \"The startup validator (instrumentation-node.ts) should have set this automatically.\"\n    );\n  }\n  return secret;\n}\n\n/**\n * Generate 6-char random keyId\n */\nfunction generateKeyId(): string {\n  const chars = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n  let result = \"\";\n  result = crypto.randomBytes(3).toString(\"hex\");\n  return result;\n}\n\n/**","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/shared/utils/apiKey.ts#L1-L29","documentation":"Error \"API_KEY_SECRET is required for API key CRC operations. The startup validator (instrumentation-node.ts) should have set this automatically.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/shared/utils/apiKey.ts:11 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"}