Lion Cipher Lab

Gate every model your team downloads: scan a model folder with ModelScan and fail the build on unsafe code

Why it matters

Teams download pre-trained models the way they install packages: from a public hub, by name, often straight into a notebook or a build. Many common model formats are serialized Python objects, and loading one can run whatever code the author put inside. That makes every downloaded model a piece of untrusted software. The fix is the same one teams use for dependencies: scan at the door, automatically, and stop the pipeline when something looks wrong. ModelScan, an open-source scanner from Protect AI, checks model files for unsafe code across pickle, H5 and SavedModel formats without loading…

What you'll learn

Steps in this lab

  1. Why a model file is untrusted code
  2. Set up a throwaway workspace
  3. Build three test files, and load none of them
  4. Scan one file at a time and watch the exit code
  5. Scan a whole folder and see what was skipped
  6. Save a JSON report for the record
  7. Look at the rules, and resist loosening them
  8. Write a fail-closed gate a CI job can call
  9. What a clean scan does not prove
  10. Clean up

Open the full interactive lab →

Keep learning