mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 10:18:35 +00:00
fix(security): bind system.run approvals to argv identity
This commit is contained in:
@@ -21,6 +21,10 @@ describe("system run command helpers", () => {
|
||||
expect(formatExecCommand(["echo", "hi there"])).toBe('echo "hi there"');
|
||||
});
|
||||
|
||||
test("formatExecCommand preserves trailing whitespace in argv tokens", () => {
|
||||
expect(formatExecCommand(["runner "])).toBe('"runner "');
|
||||
});
|
||||
|
||||
test("extractShellCommandFromArgv extracts sh -lc command", () => {
|
||||
expect(extractShellCommandFromArgv(["/bin/sh", "-lc", "echo hi"])).toBe("echo hi");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user