Standalone privacy and sandbox controls for Hugging Face and related Python runtimes
Project description
FacehuggerShield
FacehuggerShield is a standalone Python package for locking down Hugging Face and similar runtimes before they can phone home, download arbitrary code, or write outside approved paths.
Version 1.0.0 is the first standalone release extracted from
AIRunner. It includes the bundled darklock, defendatron,
nullscream, and shadowlogger modules that AIRunner previously
carried as vendored code.
Install
Install the tagged release directly from GitHub:
pip install \
"facehuggershield @ https://github.com/Capsize-Games/facehuggershield/archive/refs/tags/v1.0.0.tar.gz"
Usage
Activate FacehuggerShield before importing the libraries you want to contain:
from facehuggershield.huggingface import activate
activate(
activate_shadowlogger=True,
darklock_os_allow_network=False,
)
The default Hugging Face settings disable telemetry, prefer offline operation, and route cache data to a user-scoped FacehuggerShield cache directory.
What ships in this repo
facehuggershield.huggingface: Hugging Face-specific activation and environment controls.facehuggershield.darklock: Filesystem and network restriction helpers.facehuggershield.nullscream: No-op module replacement for blocked imports.facehuggershield.shadowlogger: Log interception and shadow logging.facehuggershield.defendatron: Coordinator that wires the subsystems together.
Extending to other libraries
To create a policy pack for another runtime, copy the
facehuggershield/huggingface package as a starting point and replace
its environment and blacklist settings with the rules your target
library needs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file facehuggershield-1.0.0.tar.gz.
File metadata
- Download URL: facehuggershield-1.0.0.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be4b4203550ae369f7c8ca4e697b9bc9fbc4ac054f87a55afb399c41af3d8248
|
|
| MD5 |
bc511145f1bf8571504e495dd13e355a
|
|
| BLAKE2b-256 |
22de726e17c3540efc1073b3b4ea5768a16b81fbd6702769001c3ba57dc761d4
|
File details
Details for the file facehuggershield-1.0.0-py3-none-any.whl.
File metadata
- Download URL: facehuggershield-1.0.0-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e83cf71cf6ebae2a500a2325e5402a8aac672d340b694276b6d7ae0534a918dd
|
|
| MD5 |
1bf1a20beff99397675ca38cf2f2c99a
|
|
| BLAKE2b-256 |
646891086cdd803952fd9e3e299fabbee812e419fae1215587102bc24df474a9
|