{"record":{"id":"127bf9f67961b328","repo":"paperclipai/paperclip","slug":"device-login-export-refused-to-remove-a-path-outs","errorCode":null,"errorMessage":"device-login export: refused to remove a path outside the proof root","messagePattern":"device-login export: refused to remove a path outside the proof root","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/codex-local/src/server/device-login-export.ts","lineNumber":288,"sourceCode":"\n/**\n * Removes the proof home. Refuses a path outside the company-scoped proof root,\n * so a cleanup can never delete the shared, the default, or a managed home. A\n * missing proof home is a benign no-op.\n */\nexport async function removeProofHome(\n  proofHome: string,\n  input: RemoveProofHomeInput = {},\n): Promise<void> {\n  const env = input.env ?? process.env;\n  const companyId = requireSafeSegment(\n    input.companyId ?? nonEmpty(env.PAPERCLIP_COMPANY_ID) ?? \"\",\n    \"companyId\",\n  );\n  const resolved = path.resolve(proofHome);\n  const root = resolveProofHomeRoot(env, companyId);\n  if (!resolved.startsWith(root + path.sep)) {\n    throw new Error(\"device-login export: refused to remove a path outside the proof root\");\n  }\n  await rm(resolved, { recursive: true, force: true });\n}\n","sourceCodeStart":270,"sourceCodeEnd":292,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/adapters/codex-local/src/server/device-login-export.ts#L270-L292","documentation":"Error \"device-login export: refused to remove a path outside the proof root\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapters/codex-local/src/server/device-login-export.ts:288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep cleanup paths inside the proof root; do not remove paths outside it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}