From 68d8e15a2e3f8c873f99882cf495c09b415fd1f2 Mon Sep 17 00:00:00 2001 From: luoyanglang Date: Fri, 3 Apr 2026 00:22:34 +0800 Subject: [PATCH] fix(exec): satisfy allowlist predicate type checks --- src/infra/exec-approvals-allowlist.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }