{"record":{"id":"5b1b084117526ece","repo":"google-gemini/gemini-cli","slug":"security-validation-timed-out-after-5000ms","errorCode":null,"errorMessage":"Security validation timed out after 5000ms","messagePattern":"Security validation timed out after 5000ms","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/utils/security.ts","lineNumber":331,"sourceCode":"    const powershellPath = getWindowsPowerShellPath();\n\n    const encodedScript = Buffer.from(script, 'utf16le').toString('base64');\n    const res = spawnSync(\n      powershellPath,\n      [\n        '-NoProfile',\n        '-NonInteractive',\n        '-ExecutionPolicy',\n        'Bypass',\n        '-EncodedCommand',\n        encodedScript,\n      ],\n      { encoding: 'utf-8', timeout: 5000 },\n    );\n\n    if (res.error) {\n      if ((res.error as NodeJS.ErrnoException).code === 'ETIMEDOUT') {\n        throw new Error(`Security validation timed out after 5000ms`);\n      }\n      throw res.error;\n    }\n\n    if (res.status !== 0) {\n      throw new Error(\n        `PowerShell execution failed with status ${res.status}: ${res.stderr || res.stdout}`,\n      );\n    }\n\n    const batchResults = parseWindowsBatchSecurityOutput(\n      res.stdout ?? '',\n      uncached,\n    );\n\n    for (const p of uncached) {\n      const parsed = batchResults.get(p) ?? {};\n      let isDir = false;","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/google-gemini/gemini-cli/blob/6a466a7e2fe2b1255752c1e74f69b31f0216084d/packages/core/src/utils/security.ts#L313-L349","documentation":"The synchronous PowerShell child process used for Windows path security validation was killed after its 5000ms spawnSync timeout (ETIMEDOUT). The security check fails closed: a validation that cannot complete is treated as insecure and re-thrown as this sentinel error.","triggerScenarios":"Thrown at packages/core/src/utils/security.ts:331 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the number/size of paths checked per batch","Check system load and PowerShell startup health (profile scripts, AV scanning)","Retry the validation once transient slowness subsides"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6a466a7e2fe2b1255752c1e74f69b31f0216084d","analyzedAt":"2026-09-16T18:14:43.978Z","contentChangedAt":"2026-09-16T18:14:43.978Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}