Enhancing AI Security: Our Partnership with Protect AI
In an era where artificial intelligence (AI) continues to evolve at a breathtaking pace, ensuring the safety and security of AI models has never been more critical. This is why we are thrilled to announce our partnership with Protect AI, a company dedicated to creating a safer AI-powered world. Through this collaboration, we aim to bolster our commitment to providing a secure platform for the machine learning (ML) community.
Who is Protect AI?
Founded with a mission to enhance AI security, Protect AI is at the forefront of developing innovative tools that empower organizations to safely leverage AI technologies. One of their flagship offerings, Guardian, is designed to enable the rapid advancement of AI while safeguarding against potential security threats. Their community-driven approach and support for open-source initiatives align perfectly with our values, making this partnership a natural fit.
Why a Focus on Security?
As Hugging Face has gained popularity as a hub for model sharing, the importance of model security has come to the forefront. We recognize that sharing machine learning models can expose vulnerabilities, particularly when using serialization formats that may be susceptible to exploits. For instance, formats like pickle are known to facilitate arbitrary code execution, posing significant risks.
To address these concerns, we have developed tools such as picklescan, which helps identify and mitigate these vulnerabilities. By integrating Guardian into our security suite, we are taking proactive measures to protect our community from potential attacks.
Understanding Model Security
When it comes to sharing models, several components need to be serialized, including weights, configurations, and other essential data structures. Unfortunately, some serialization methods can be exploited, leading to severe security breaches. For example, Keras Lambda layers have been shown to be vulnerable to arbitrary code execution, underscoring the need for robust security measures.
Fortunately, Guardian is designed to identify a wide range of exploits, including those associated with pickle and Keras Lambda layers. By utilizing Guardian, we can ensure that our model-sharing platform remains secure and trustworthy.
Resources for Further Reading
For those looking to deepen their understanding of our security measures, we encourage you to explore our comprehensive documentation on security practices at Hugging Face. You can find all the details here.
Integrating Guardian into Our Platform
As we integrate Guardian as a third-party scanner, we have also seized the opportunity to enhance our user interface for displaying scan results. The revamped frontend allows users to easily access and understand the security status of their models.
Here’s a sneak peek of what the new interface looks like:
The interface now includes a dedicated Pickle button that appears when a scan for pickle import has been conducted. This improvement is designed to provide users with immediate insight into the security status of their models.
Automatic Scanning for Public Repositories
One of the most exciting aspects of this integration is that all public model repositories will automatically undergo scanning by Guardian as soon as files are pushed to the Hub. For a practical demonstration of this feature, check out the repository mcpotato/42-eicar-street.
It’s worth noting that with over one million model repositories, there may be a slight delay in scanning all models, but we are committed to ensuring that hundreds of millions of files are scanned to foster a secure and smooth model-sharing experience for our community.
By implementing these security measures, we aspire to empower our users to share models safely and efficiently, contributing to the overall growth of the AI and ML fields.
As we move forward, our partnership with Protect AI stands as a testament to our dedication to security and community safety in the AI landscape. If you are interested in joining our security partnership or have valuable scanning information to share, please reach out to us at security@huggingface.co. Together, we can create a safer environment for AI innovation.
Inspired by: Source



