(path: string)
| 37 | } |
| 38 | |
| 39 | export 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 | |
| 45 | export async function prepareOwnerComputer(env: SandboxComputerBindings, owner: ComputerOwner) { |
| 46 | const sandbox = await getOwnerComputer(env, owner); |
no outgoing calls
no test coverage detected