MCPcopy Create free account
hub / github.com/backnotprop/plannotator / validateFilePath

Function validateFilePath

packages/shared/code-nav.ts:8–12  ·  view source on GitHub ↗

* Search-based code navigation — shared types and pure logic. * * Runtime-agnostic: both Bun and Node servers provide their own * CodeNavRuntime implementation to run subprocess commands.

(filePath: string)

Source from the content-addressed store, hash-verified

6 */
7
8function validateFilePath(filePath: string): void {
9 if (filePath.includes("..") || filePath.startsWith("/")) {
10 throw new Error("Invalid file path");
11 }
12}
13
14// ---------------------------------------------------------------------------
15// Types

Callers 3

validateCodeNavRequestFunction · 0.70
fetchFunction · 0.50
startReviewServerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected