Skip to content

pickle-sentry 0.4.1

Choose a tag to compare

@Sun-Wukhan Sun-Wukhan released this 27 Nov 20:42
· 1 commit to main since this release

pickle-sentry 0.4.1 — standalone archives are now actually inspected

A routing fix, found by the published benchmark (docs/BENCHMARK.md, miss category 1): eight of Picklescan's malicious fixtures — a zip, six zip variants and a 7z — previously received no findings at all, because the CLI never routed their extensions to the inspector that already knew how to peel them.

  • pickle-sentry <path> now routes .zip, .tar, .tgz, .gz, .bz2, .xz and .7z files to the inspector, and .bin joins the inspected set (torch / Hugging Face .bin files are pickle streams or torch zips; hub mode already inspected them).
  • Magic-byte sniffing for files whose extension routes nowhere: zip, 7z, gzip, bzip2, xz and tar signatures and the pickle protocol marker are recognised from the first 512 bytes, so a container hiding behind a wrong extension is inspected instead of skipped.
  • Benchmark, same corpus, same criteria: malicious caught 71 → 75 / 96, benign false flags unchanged (5 / 24), zero regressions. The five damaged/encrypted zip variants now report a medium finding instead of silence; details in the benchmark's 0.4.1 re-run section.
  • 15 new routing tests, all fixtures generated in-test, including a canary proving a hostile payload inside a zip is flagged, never executed. 94 tests total, zero dependencies, Python 3.9+.

Install: pip install pickle-sentry==0.4.1