MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / isSuspiciousPath

Function isSuspiciousPath

lib/properties-validator.ts:123–126  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

121const ALLOWED_SYSTEM_PATHS = ['/usr/bin/ldd'];
122
123function isSuspiciousPath(path: string): boolean {
124 if (ALLOWED_SYSTEM_PATHS.includes(path)) return false;
125 return !VALID_PATH_PREFIXES.some(prefix => path.startsWith(prefix));
126}
127
128/**
129 * Parse a colon-separated list of compiler/group references.

Callers 1

validateRawFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected