MCPcopy Create free account
hub / github.com/Noumena-Network/code / commandHasAnyGit

Function commandHasAnyGit

src/tools/BashTool/readOnlyValidation.ts:1850–1854  ·  view source on GitHub ↗

* Checks if a compound command contains any git command. * * @param command The full command string to check * @returns true if any subcommand is a git command

(command: string)

Source from the content-addressed store, hash-verified

1848 * @returns true if any subcommand is a git command
1849 */
1850function commandHasAnyGit(command: string): boolean {
1851 return splitCommand_DEPRECATED(command).some(subcmd =>
1852 isNormalizedGitCommand(subcmd.trim()),
1853 )
1854}
1855
1856/**
1857 * Git-internal path patterns that can be exploited for sandbox escape.

Callers 1

checkReadOnlyConstraintsFunction · 0.85

Calls 2

splitCommand_DEPRECATEDFunction · 0.85
isNormalizedGitCommandFunction · 0.85

Tested by

no test coverage detected