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

Function isSessionMemoryPath

src/utils/permissions/filesystem.ts:274–278  ·  view source on GitHub ↗
(absolutePath: string)

Source from the content-addressed store, hash-verified

272
273// Check if file is within the session memory directory
274function isSessionMemoryPath(absolutePath: string): boolean {
275 // SECURITY: Normalize to prevent path traversal bypasses via .. segments
276 const normalizedPath = normalize(absolutePath)
277 return normalizedPath.startsWith(getSessionMemoryDir())
278}
279
280/**
281 * Check if file is within the current project's directory.

Callers 1

Calls 2

getSessionMemoryDirFunction · 0.85
normalizeFunction · 0.50

Tested by

no test coverage detected