MCPcopy Create free account
hub / github.com/acoyfellow/cloudbox / assertComputerPath

Function assertComputerPath

src/sandbox-computer.ts:39–43  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

37}
38
39export function assertComputerPath(path: string): void {
40 if (!path.startsWith(`${COMPUTER_HOME}/`) || path.includes("/../") || path.endsWith("/..") || path.includes("\0")) {
41 throw new Error(`path must be inside ${COMPUTER_HOME}/ without traversal segments`);
42 }
43}
44
45export async function prepareOwnerComputer(env: SandboxComputerBindings, owner: ComputerOwner) {
46 const sandbox = await getOwnerComputer(env, owner);

Callers 4

mountPrivateRepoFunction · 0.90
publishBranchFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected