Scanner deep dive
Hugging Face
Find credentials in HuggingFace datasets, models, spaces and buckets.
Use cases and coverage
Scanning use cases
Review a dataset before publishing it
Point the CLI source at your team’s specific dataset. Review matching files for credentials that may have been included in collected examples.
Check a Space before sharing a demo
Select the Space your team maintains and scan it for credentials committed alongside the demo. Review findings with its owner.
Related incidentHugging Face investigated access to Spaces secrets · Separate credential store
May 2024 · Separate credential store
Hugging Face investigated access to Spaces secrets
Hugging Face confirmed unauthorized access to its Spaces platform and said some stored secrets might have been accessed. It revoked some Hugging Face tokens stored there and notified their owners.
How this relates to Hugging Face
The disclosure concerns secrets stored by the Spaces platform. The CLI guide documents Space repository history and selected discussions. Reviewing those can surface committed copies. It cannot establish what was read from the secret store.
Review Hugging Face scan scopeHugging Face report · Space secrets leak disclosure, May 31
Source check
Atlas AI-assisted source check · 2026-11-22. The publisher describes the event or study. The Atlas explains its relevance to this connector. Detection depends on the scan scope and detectors in use.
Limits
See the pinned CLI guide below for documented scope.
What TruffleHog documents
- Open-source CLI
Model, Space and dataset history are in scope for the selected targets. Discussion comments and pull request comments each require an explicit option.
Read the pinned README passage
Sources checked .
CLI setup
Set it up
The open-source CLI is read from the public TruffleHog code at a pinned commit; it’s a separate product from Enterprise.
Check the options in your installed version with trufflehog huggingface --help.
- 1Choose which of your models, datasets, Spaces or buckets the scanner should inspect.
- 2Pass the relevant asset selectors. Prepare a Hugging Face token when the selected assets require authenticated access.
Suggested contact (Atlas suggestion) · Owner of the Hugging Face assets
Suggested first check (Atlas suggestion) · Verify the precise model, dataset, Space or bucket identifier for the pilot.
Setup reference checked 2026-11-22 · huggingface command declaration
Find credentials in HuggingFace datasets, models, spaces and buckets. pkg/sources/huggingface · main.go line 270
Open-source TruffleHog, read from the public code at commit ffdee00 (v3.99.9-6-gffdee00a). Newer releases may differ.
All 22 CLI flagsNone required
| Flag | What it does | Type |
|---|---|---|
| --endpoint | HuggingFace endpoint.Default https://huggingface.co. | string |
| --model | HuggingFace model to scan. You can repeat this flag. Example: 'username/model' | strings |
| --space | HuggingFace space to scan. You can repeat this flag. Example: 'username/space' | strings |
| --dataset | HuggingFace dataset to scan. You can repeat this flag. Example: 'username/dataset' | strings |
| --bucket | HuggingFace bucket to scan. You can repeat this flag. Example: 'username/bucket' | strings |
| --org | HuggingFace organization to scan. You can repeat this flag. Example: "trufflesecurity" | strings |
| --user | HuggingFace user to scan. You can repeat this flag. Example: "trufflesecurity" | strings |
| --token | HuggingFace token. Can be provided with environment variable HUGGINGFACE_TOKEN. | string |
| --include-models | Models to include in scan. You can repeat this flag. Must use HuggingFace model full name. Example: 'username/model' (Only used with --user or --org) | strings |
| --include-spaces | Spaces to include in scan. You can repeat this flag. Must use HuggingFace space full name. Example: 'username/space' (Only used with --user or --org) | strings |
| --include-datasets | Datasets to include in scan. You can repeat this flag. Must use HuggingFace dataset full name. Example: 'username/dataset' (Only used with --user or --org) | strings |
| --ignore-models | Models to ignore in scan. You can repeat this flag. Must use HuggingFace model full name. Example: 'username/model' (Only used with --user or --org) | strings |
| --ignore-spaces | Spaces to ignore in scan. You can repeat this flag. Must use HuggingFace space full name. Example: 'username/space' (Only used with --user or --org) | strings |
| --ignore-datasets | Datasets to ignore in scan. You can repeat this flag. Must use HuggingFace dataset full name. Example: 'username/dataset' (Only used with --user or --org) | strings |
| --include-buckets | Buckets to include in scan. You can repeat this flag. Must use HuggingFace bucket full name. Example: 'username/bucket' (Only used with --user or --org) | strings |
| --ignore-buckets | Buckets to ignore in scan. You can repeat this flag. Must use HuggingFace bucket full name. Example: 'username/bucket' (Only used with --user or --org) | strings |
| --skip-all-models | Skip all model scans. (Only used with --user or --org) | bool |
| --skip-all-spaces | Skip all space scans. (Only used with --user or --org) | bool |
| --skip-all-datasets | Skip all dataset scans. (Only used with --user or --org) | bool |
| --skip-all-buckets | Skip all bucket scans. (Only used with --user or --org) | bool |
| --include-discussions | Include discussions in scan. | bool |
| --include-prs | Include pull requests in scan. | bool |
If Hugging Face keys leak
The credentials you give this connector are secrets too. These detectors find Hugging Face keys anywhere TruffleHog scans, not only inside Hugging Face.
Sources and related tools
Evidence
Docs scraped 2026-11-17. Each docs page was fetched with Firecrawl twice (an overview pass and a detail pass for capabilities, options, permissions and notes) and read by an extraction prompt. Descriptions are short paraphrases. Open-source CLI facts are parsed from main.go at the pinned TruffleHog commit. Not reviewed by a person. Pinned commit ffdee00. Check the source before quoting a detail, or review this connector so the badge says so. Truffle’s integrations page doesn’t list this connector, so the Atlas picked its category.
- Open-source packagepkg/sources/huggingface