fix(tar): surface traversal extraction failures as blocked entries

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-03 17:30:43 +09:00
parent a4f436c116
commit 2b43558349
-5
View File
@@ -51,7 +51,6 @@ export async function extractTarGz(
if (isTarTraversalErrorOutput(stderr)) {
throw new Error(`Unsafe archive entry: path contains path traversal (${archivePath})`)
}
throw new Error(`tar extraction failed (exit ${exitCode}): ${stderr}`);
}
}
@@ -116,10 +115,6 @@ async function listTarEntries(archivePath: string, cwd?: string): Promise<Archiv
}
if (exitCode !== 0) {
if (/Member name contains '\.\.'/i.test(stderr) || /Removing leading [`']\.\.\//i.test(stderr)) {
throw new Error(`tar archive contains path traversal entries: ${stderr}`)
}
throw new Error(`tar entry listing failed (exit ${exitCode}): ${stderr}`)
}