From a full-repo review (line refs from ecb7fe0). Complementary to #13 (which covers the split-tar stream crash — this issue is about extraction safety on all paths, including the working xs path).
src/openmhc/_dataset.py:295-297: tarfile.extractall(...) without filter="data" — on Python < 3.14 (no safe default) a malicious/tampered archive can path-traverse outside the target dir. Applies to the outer download and every nested tarball.
- No checksum or size validation of downloaded files against the Dataverse manifest — a truncated/corrupted download is only detected (if at all) by downstream failures.
Suggested fix: pass filter="data" on every extractall (both the current xs path and the full path being fixed in #13), and verify Dataverse-provided MD5s (the datafile API exposes them) before extraction, failing loud on mismatch.
From a full-repo review (line refs from
ecb7fe0). Complementary to #13 (which covers the split-tar stream crash — this issue is about extraction safety on all paths, including the working xs path).src/openmhc/_dataset.py:295-297:tarfile.extractall(...)withoutfilter="data"— on Python < 3.14 (no safe default) a malicious/tampered archive can path-traverse outside the target dir. Applies to the outer download and every nested tarball.Suggested fix: pass
filter="data"on everyextractall(both the current xs path and the full path being fixed in #13), and verify Dataverse-provided MD5s (the datafile API exposes them) before extraction, failing loud on mismatch.