Harden archive scanning, add loads(), migrate packaging to uv, and add tests - #50
Open
vijaypanchal wants to merge 5 commits into
Open
vijaypanchal wants to merge 5 commits into
vijaypanchal wants to merge 5 commits into
Conversation
- Replace requirements.txt and setup.py with Poetry configuration - Rename safer_pickle to saferpickle in README and code - Update CLI dependencies and type imports
Update all imports from safer_pickle to saferpickle for consistent naming. Replace absl-based CLI with click and add new dependencies (click, colorama).
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Harden SaferPickle's handling of untrusted archives, add the missing
loads()API, migrate packaging touv, and introduce a test suite.Changes
Security hardening
check_magic_bytesinto nested bz2/lzma/gzip streams so innerpayloads are scanned, not just the outer container.
unsafe(previously they could fallthrough to
safe).New API
saferpickle.loads()as the string-based counterpart toload()(this was already documented in the README but missing from the module).
CLI
was inspected).
run()entry point and wire it to thesafer_pickle_cliconsolescript.
Packaging
setup.py/requirements.txttopyproject.toml+uv.lock.lib/__init__.pyandthird_party/__init__.pypackage markers.black,isort, andpytestinpyproject.toml.Tests
conftest.py,test_saferpickle.py,test_load.py,test_cli.py) — 22 tests pass.Docs
README.md.Notes
black/isort; vendoredthird_party/files are excluded and untouched.pytest -q→ 22 passed;uv buildsucceeds.