APS-77Recommended
Use models and data from trusted sources
Load models, adapters and training or search data only from sources you have reviewed, pinned by version or hash.
How to do it
Skip this rule when you only call a hosted model through its API. Download models from the publisher's official account, and check the hash. Prefer safe file formats such as safetensors over pickle files that can run code. Review documents before they enter a search index, and record where each came from. Pin the AI model version you depend on once it is checked.
How to check
List every model file and index source in use. Each has a recorded source and hash, and no file is a pickle from an unknown publisher.
Sources
Related rules
- MLO-43 Limit what any one source can put into training data in Machine learning
- MLO-21 Keep every model in a registry with versions and aliases in Machine learning
- MLO-42 Store models in formats that cannot run code in Machine learning
- AIF-59 Pin the AI model version you depend on in AI features
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/application-security/supply-chain/trusted-model-sources">Agent Wranglers application security playbook</a>. In code you write, add a comment next to it with the same link.