MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / hasTraversal

Function hasTraversal

sdk/src/tools/apply-patch.ts:47–50  ·  view source on GitHub ↗
(targetPath: string)

Source from the content-addressed store, hash-verified

45]
46
47function hasTraversal(targetPath: string): boolean {
48 const normalized = path.normalize(targetPath)
49 return path.isAbsolute(normalized) || normalized.startsWith('..')
50}
51
52function normalizeLineEndings(input: string): string {
53 return input.replace(/\r\n/g, '\n')

Callers 1

applyPatchToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected