mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-08 07:41:08 +00:00
Security: block exec host overrides under auto target
This commit is contained in:
committed by
Peter Steinberger
parent
5874a387ae
commit
dae6632da1
@@ -47,19 +47,15 @@ describe("resolveExecTarget", () => {
|
||||
({ resolveExecTarget } = await import("./bash-tools.exec-runtime.js"));
|
||||
});
|
||||
|
||||
it("treats auto as a default strategy rather than a host allowlist", () => {
|
||||
expect(
|
||||
it("rejects host overrides when configured host is auto", () => {
|
||||
expect(() =>
|
||||
resolveExecTarget({
|
||||
configuredTarget: "auto",
|
||||
requestedTarget: "node",
|
||||
elevatedRequested: false,
|
||||
sandboxAvailable: false,
|
||||
}),
|
||||
).toMatchObject({
|
||||
configuredTarget: "auto",
|
||||
selectedTarget: "node",
|
||||
effectiveHost: "node",
|
||||
});
|
||||
).toThrow("exec host not allowed");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user