refactor(security): simplify system.run approval model
This commit is contained in:
@@ -186,11 +186,10 @@ describe("nodes-cli coverage", () => {
|
||||
});
|
||||
expect(invoke?.params?.timeoutMs).toBe(5000);
|
||||
const approval = getApprovalRequestCall();
|
||||
expect(approval?.params?.["commandArgv"]).toEqual(["echo", "hi"]);
|
||||
expect(approval?.params?.["systemRunPlan"]).toEqual({
|
||||
argv: ["echo", "hi"],
|
||||
cwd: "/tmp",
|
||||
rawCommand: "echo hi",
|
||||
commandText: "echo hi",
|
||||
commandPreview: null,
|
||||
agentId: "main",
|
||||
sessionKey: null,
|
||||
@@ -221,11 +220,10 @@ describe("nodes-cli coverage", () => {
|
||||
runId: expect.any(String),
|
||||
});
|
||||
const approval = getApprovalRequestCall();
|
||||
expect(approval?.params?.["commandArgv"]).toEqual(["/bin/sh", "-lc", "echo hi"]);
|
||||
expect(approval?.params?.["systemRunPlan"]).toEqual({
|
||||
argv: ["/bin/sh", "-lc", "echo hi"],
|
||||
cwd: null,
|
||||
rawCommand: '/bin/sh -lc "echo hi"',
|
||||
commandText: '/bin/sh -lc "echo hi"',
|
||||
commandPreview: "echo hi",
|
||||
agentId: "main",
|
||||
sessionKey: null,
|
||||
|
||||
Reference in New Issue
Block a user