{"record":{"id":"cfda5e0ac93cdf50","repo":"paperclipai/paperclip","slug":"daytona-syncout-refusing-unparseable-or-ambiguous","errorCode":null,"errorMessage":"Daytona syncOut refusing unparseable or ambiguous symlink entry: ${line}","messagePattern":"Daytona syncOut refusing unparseable or ambiguous symlink entry: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/file-sync.ts","lineNumber":251,"sourceCode":"  const first = field.indexOf(delimiter);\n  if (first === -1) return null;\n  if (field.indexOf(delimiter, first + delimiter.length) !== -1) return null;\n  return { name: field.slice(0, first), target: field.slice(first + delimiter.length) };\n}\n\n/**\n * Reject a sandbox-authored tarball before extraction if any member would land\n * outside the extraction dir. The archive is produced by the (untrusted) sandbox,\n * so `tar -xf` on the host must never be handed an archive whose entries carry\n * absolute paths or `../` traversal, nor a symlink/hardlink member whose target\n * escapes the tree — the latter would let a follow-up member be written through\n * the link to an arbitrary host path. Legitimate in-tree relative links (targets\n * that resolve back inside the archive, e.g. `shortcut -> nested/data.txt`) are\n * preserved. Parses the `-tvf` verbose listing so both member names and link\n * targets are inspected; any unparseable line fails closed.\n */\nasync function assertTarballEntriesConfined(archivePath: string): Promise<void> {\n  const { stdout } = await execFileAsync(\"tar\", [\"-tvf\", archivePath], {\n    env: { ...process.env, COPYFILE_DISABLE: \"1\" },\n    maxBuffer: 32 * 1024 * 1024,\n  });\n  const lines = stdout.split(\"\\n\").filter((line) => line.trim().length > 0);\n  for (const line of lines) {\n    const parsed = parseTarVerboseListingLine(line);\n    if (!parsed) {\n      throw new Error(`Daytona syncOut refusing tarball with an unparseable entry listing: ${line}`);\n    }\n    const typeFlag = parsed.typeFlag;\n    let name = parsed.rest;\n    let linkTarget: string | null = null;\n    if (typeFlag === \"l\") {\n      const split = splitLinkEntryOnce(name, \" -> \");\n      if (!split) throw new Error(`Daytona syncOut refusing unparseable or ambiguous symlink entry: ${line}`);\n      name = split.name;\n      linkTarget = split.target;\n    } else if (typeFlag === \"h\") {","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/plugins/sandbox-providers/daytona/src/file-sync.ts#L233-L269","documentation":"Fail-closed check in assertTarballEntriesConfined: a tar member whose type flag is 'l' (symlink) did not split cleanly on exactly one ' -> ' separator, so its name and link target are ambiguous. Since the target cannot be verified to stay inside the extraction dir, the syncOut is refused outright.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/daytona/src/file-sync.ts:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix or exclude the ambiguous symlink entry in the tarball."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}