Hugging Face 2024 Security Feature Highlights
Hugging Face has released a comprehensive overview of its security features as of August 6, 2024, providing a tiered security model that combines automated platform-wide protections with granular access controls for individual and enterprise users. These features are designed to mitigate common attack vectors such as phishing, token leaks, and credential stuffing.
Default Hub Security Features
All Hugging Face Hub users have access to a set of core security tools to increase resiliency against unauthorized access and malicious content.
Access Control and Authentication
- Fine-Grained Tokens: Beyond standard read and write tokens, the Hub supports fine-grained tokens. These allow users to enforce the principle of least privilege by defining specific permissions on a per-resource basis, limiting the potential impact if a token is leaked.
- Two-Factor Authentication (2FA): 2FA requires two forms of verification (something known, like a password, and something possessed, like a smartphone) to reduce the risk of unauthorized access via compromised passwords or phishing.
- Organizational Access Controls: Organizations can assign specific roles—"read", "write", "contributor", or "admin"—to users. This ensures that the compromise of a single account does not grant an attacker control over the entire organization.
Integrity and Scanning
- Commit Signing: To prevent author impersonation in Git, Hugging Face allows users to add GPG keys to their profiles. Signed commits are authenticated against these keys and marked with a "Verified" badge.
- Automated Security Scanning: Hugging Face employs a three-part automated pipeline that scans all repositories and commits:
- Malware Scanning: Uses ClamAV to detect known malware signatures.
- Pickle Scanning: Uses
picklescanto identify malicious executable code within pickle files. - Secret Scanning: Uses
trufflehog filesystemto detect passwords, tokens, and API keys.
When a malicious file is detected, a notice is placed on the repository. For verified secrets (those confirmed to work against their providers), the system sends an email notification to the owner for invalidation.
Enterprise Hub Security Features
Enterprise users have access to advanced governance and compliance tools to manage large-scale deployments and regulatory requirements.
Identity and Resource Management
- Single Sign-On (SSO): Hugging Face Enterprise supports SAML 2.0 and OpenID Connect (OIDC) protocols, compatible with providers like Okta, OneLign, and Azure AD. SSO allows for centrally managed identities and dynamic role assignment based on identity provider data.
- Resource Groups: Enterprises can segment repositories into Resource Groups (e.g., "Research", "Engineering", "Production"). This segmentation prevents a compromise in one area from affecting other segments.
- Organization Token Management: A new feature allowing organization owners to enforce the use of fine-grained tokens and require administrator approval for each token. Administrators can review and revoke tokens at any time.
Compliance and Data Governance
- Data Residency (Storage Regions): Users can specify where repositories (models, datasets, and spaces) are stored to meet legal and regulatory requirements and improve performance. Currently, US and EU regions are supported, with Asia-Pacific planned for the future.
- Audit Logs: Organization admins can download JSON files containing logs of changes to repositories, settings, and billing, including the username, IP address, location, and action taken.
- Compliance Certifications: Hugging Face is SOC2 Type 2 certified and GDPR compliant, offering Business Associate Addendums for GDPR data processing agreements to Enterprise users.
Custom Security Solutions
For specific organizational needs, Hugging Face provides custom agreements and the development of bespoke features and tools through Statements of Work (SoW) and Service Level Agreements (SLA).
Sources
- Original2024 Security Feature Highlights