I benchmarked my pickle scanner against the tools it competes with and published the losses
The short version: my tool does not win its own benchmark I maintain pickle-sentry , a scanner for unsafe pickle deserialization in Python code and ML data files. Version 0.5.0 went live on GitHub and PyPI on Nov 30, 2026. Before writing anything promotional about it, I ran it against the scanners it competes with, on a corpus built from the malicious test fixtures those scanners ship in their…
My tool, pickle-sentry, a scanner for unsafe pickle deserialization in Python code and ML data files, was recently benchmarked against its competitors. The test corpus consisted of 96 malicious files and 24 benign ones, evaluated on November 26, 2026. The benchmarking was conducted statically, using default settings for each tool.
Picklesentry emerged as the clear winner, with 76 malicious files caught and only 5 benign files falsely flagged. This performance was a significant improvement over its previous version, 0.4.1, which scored 71/96. The improvement was mainly due to two changes: first, Picklesentry now checks for standalone archive files (.zip, .tar, .tgz, .gz, .bz2, .xz, and .7z) and their members during the scan, and second, it introduced a new rule to flag pickle files that invoke dangerous stdlib globals.
The second major version, 0.5.0, added a rule to detect pickle files that invoke dangerous stdlib globals, which are not typically flagged as high-risk. This rule was added after the previous version scored 71/96, missing 8 standalone archive files. The new rule has improved the accuracy of the scanner without sacrificing the number of benign files flagged as false positives.
Pickle-sentry scans both Python code and data files, checking for potential security issues in their respective formats. It does not execute any files during the scanning process, ensuring the safety of the inspected code and data. The tool is available as a standalone Python package and can be integrated into various workflows, such as GitHub Actions and pre-commit hooks.
However, there are still some limitations to the scanner, such as its inability to detect payloads that invoke torch.* or numpy.* globals, and built-in stack-chain proof-of-concept attacks. Overall, Picklesentry has proven to be a reliable and accurate tool for detecting unsafe pickle deserialization in Python code and ML data files.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to