v5.0.4 - Security Enhancement Release
Security Enhancements
This release addresses critical security gaps in the facehuggershield sandbox suite that protects against malicious code in Hugging Face models.
Fixed
- Network restrictions not being activated: The
darklock.activate()function was not callingnetwork.activate(), leaving network restrictions unenforced - Missing OS function patches: Added restrictions for
os.unlink,os.rename,os.replace,os.link, andos.symlinkto prevent unauthorized filesystem operations - NoInternetSocket bypass: Improved socket blocking to properly handle
port=-1for blocking all connections - Network restriction state tracking: Added
_activatedflag to prevent double activation and ensure proper state management - Localhost detection: Enhanced support for multiple localhost formats (
127.0.0.1,localhost,::1)
Security Impact
Users running untrusted Hugging Face models are strongly advised to upgrade. The facehuggershield sandbox now properly enforces both filesystem and network restrictions.
Breaking Changes
None - this is a backward-compatible security patch.