AI GitHub
PickleScan for screening Python pickle artifacts
Inspect pickle opcodes for risky imports and related indicators.
Key Takeaways
- PickleScan analyzes serialized data instead of instantiating the object it describes.
- Select the artifact sources and file types the intake process accepts.
- Scan a safe test fixture and a deliberately flagged one from a controlled test corpus.
- A clean scan is limited to the patterns the scanner knows.
How it works
PickleScan analyzes serialized data instead of instantiating the object it describes. It can surface references to globals that deserve review before a checkpoint enters an application.
What you need
Select the artifact sources and file types the intake process accepts. Decide how scan errors, unsupported files and explicit findings enter the human review path.
What to try first
Scan a safe test fixture and a deliberately flagged one from a controlled test corpus. Confirm your pipeline distinguishes a detected issue from a parsing failure.
Inspect the finding details before allowing an artifact through. Some checkpoint classes may produce alerts for expected imports, and exceptions need a documented reason.
Where to look for failures
A clean scan is limited to the patterns the scanner knows. Prefer artifact formats and loading paths that minimize executable serialization where possible.
Related Franklin pages
Separate artifact screening from execution. Test how your intake pipeline handles a flagged file or unknown format before passing a model to any inference runtime.
- Execute exported ONNX models with execution providers suited to the target device. ONNX Runtime for portable inference
- Look for suspicious operations in supported serialized model artifacts before loading them. ModelScan for inspecting serialized model files
For broader questions about the risks of deploying AI systems, see Franklin’s glossary. AI safety
Project documentation
Try it for your workflow
Explore the project’s documentation for setup and usage, or save this page to a collection for later.
Read the project documentation ↗