diff --git a/src/infra/exec-approvals-allowlist.ts b/src/infra/exec-approvals-allowlist.ts index 3b496a95b55..7f404c7b0ce 100644 --- a/src/infra/exec-approvals-allowlist.ts +++ b/src/infra/exec-approvals-allowlist.ts @@ -698,7 +698,10 @@ function hasSegmentExecutableMatch( const execution = resolveExecutionTargetResolution(segment.resolution); const candidates = [execution?.executableName, execution?.rawExecutable, segment.argv[0]]; for (const candidate of candidates) { - const trimmed = candidate?.trim(); + if (typeof candidate !== "string") { + continue; + } + const trimmed = candidate.trim(); if (!trimmed) { continue; }