A Model File Is Part of the Software Supply Chain
Object Reconstruction Can Execute Behaviour
BOTIE
Python programmers wanted to save an object and reconstruct it later, including the state its class needed. Pickle saves those objects. Rebuilding an object is more powerful than reading a list of numbers: reconstruction can invoke Python behaviour. A saved preprocessing object therefore brings a different loading question from a plain table of coefficients.
The 2003 PEP 307 proposal extended the pickle protocol and explicitly rejected earlier checks that had suggested untrusted unpickling could be made safe. Its warning was to avoid loading pickles from untrusted or unauthenticated sources. That history matters when a model file arrives as an apparently passive download. We will check its bytes against an independently trusted expectation before loading anything; a matching digest still leaves the choice and constraints of the loader to be reviewed.