MCPcopy Create free account
hub / github.com/antgroup/agent-aegis / tokenizeShellCommand

Function tokenizeShellCommand

src/rules.js:869–872  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

867 return false;
868}
869function tokenizeShellCommand(command) {
870 const tokens = command.match(/"[^"]*"|'[^']*'|`[^`]*`|\S+/g) ?? [];
871 return tokens.map((token) => stripQuotes(token));
872}
873function isRestrictedOpenClawBinary(token) {
874 if (!token) {
875 return false;

Calls 1

stripQuotesFunction · 0.70

Tested by

no test coverage detected