mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 21:50:43 +00:00
Harden macOS shell wrapper allowlist parsing [AI] (#78518)
* fix: harden shell wrapper allowlist parsing * fix: harden shell wrapper approval binding * docs: add changelog entry for PR merge --------- Co-authored-by: Ishaan <ishaan@Ishaans-Mac-mini.local>
This commit is contained in:
committed by
GitHub
parent
eabae023eb
commit
fc065b2693
@@ -38,6 +38,20 @@ describe("resolveInlineCommandMatch", () => {
|
||||
opts: { allowCombinedC: true },
|
||||
expected: { command: "echo hi", valueTokenIndex: 1 },
|
||||
},
|
||||
{
|
||||
name: "keeps post-c no-argument shell flags separate from the command",
|
||||
argv: ["bash", "-cx", "echo hi"],
|
||||
flags: POSIX_INLINE_COMMAND_FLAGS,
|
||||
opts: { allowCombinedC: true },
|
||||
expected: { command: "echo hi", valueTokenIndex: 2 },
|
||||
},
|
||||
{
|
||||
name: "keeps post-c stdin shell flags separate from the command",
|
||||
argv: ["bash", "-cs", "echo hi"],
|
||||
flags: POSIX_INLINE_COMMAND_FLAGS,
|
||||
opts: { allowCombinedC: true },
|
||||
expected: { command: "echo hi", valueTokenIndex: 2 },
|
||||
},
|
||||
{
|
||||
name: "rejects combined -c forms when disabled",
|
||||
argv: ["sh", "-cecho hi"],
|
||||
|
||||
Reference in New Issue
Block a user