Summary
runDirectCommandWithWitness tokenizes the command input with a regex. Complex commands (nested quotes, pipes, &&) get mangled before witness ever runs.
Proposed Fix
Use a shell to execute (bash -lc) or a proper parser like shell-quote so commands are passed through intact.