refactor: route inline eval through command analysis

This commit is contained in:
Peter Steinberger
2026-05-03 13:22:54 +01:00
parent 99176e1950
commit bd0e10a2f6
15 changed files with 94 additions and 66 deletions

View File

@@ -1212,7 +1212,7 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {
});
it("requires explicit approval for strict inline-eval carriers", async () => {
// The full carrier matrix lives in exec-inline-eval.test.ts; this is the
// The full carrier matrix lives in command-analysis tests; this is the
// handle-level smoke for strictInlineEval denial wiring.
const cases = [
{

View File

@@ -1,6 +1,10 @@
import crypto from "node:crypto";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import type { GatewayClient } from "../gateway/client.js";
import {
describeInterpreterInlineEval,
type InterpreterInlineEvalHit,
} from "../infra/command-analysis/inline-eval.js";
import { detectPolicyInlineEval } from "../infra/command-analysis/policy.js";
import {
addDurableCommandApproval,
@@ -15,10 +19,6 @@ import {
type ExecSecurity,
} from "../infra/exec-approvals.js";
import type { ExecHostRequest, ExecHostResponse, ExecHostRunResult } from "../infra/exec-host.js";
import {
describeInterpreterInlineEval,
type InterpreterInlineEvalHit,
} from "../infra/exec-inline-eval.js";
import { resolveExecSafeBinRuntimePolicy } from "../infra/exec-safe-bin-runtime-policy.js";
import {
extractEnvAssignmentKeysFromDispatchWrappers,