How should I handle importing third-party AI models or weights?
Answered
Treat third-party models and serialised weights as untrusted third-party code that could enable remote code execution. Scan them and use isolation/sandboxing on import. Evaluate external libraries and model providers’ security posture before you rely on them.
From the guidance
Primary (how) NCSC: Secure design (AI systems)
Section: Design your system for security as well as functionality and performance
Read this in NCSC: Secure design (AI systems) (opens in new tab)
Related questions
- When should we use third-party conformity assessment for AI? Delivery, assurance and operations
- Who is responsible for security when we use third-party AI components? Buying and building
- What does Secure by Design require when buying third-party technology? Buying and building
- How should I handle prompt injection and other generative AI-specific threats?
- Can attackers steal my model or training data through the API?