MCPcopy Index your code
hub / github.com/codeaashu/claude-code / commandHasAnyGit

Function commandHasAnyGit

src/tools/BashTool/readOnlyValidation.ts:1760–1764  ·  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

1758 * @returns true if any subcommand is a git command
1759 */
1760function commandHasAnyGit(command: string): boolean {
1761 return splitCommand_DEPRECATED(command).some(subcmd =>
1762 isNormalizedGitCommand(subcmd.trim()),
1763 )
1764}
1765
1766/**
1767 * 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