MCPcopy Create free account
hub / github.com/SethGammon/Citadel / isSafeFilePath

Function isSafeFilePath

hooks_src/permission-request.js:81–85  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

79 return relative === '' || (
80 relative !== '..'
81 && !relative.startsWith(`..${path.sep}`)
82 && !path.isAbsolute(relative)
83 );
84}
85
86const CANONICAL_PROJECT_ROOT = canonicalizePath(PROJECT_ROOT);
87
88const SAFE_FILE_PREFIXES = [

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected