Skip to content
Connectors

Scanner deep dive

Hugging Face

SourceOpen source only · Runs wherever the CLI runs

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 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 scope

Hugging 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.

  1. Choose which of your models, datasets, Spaces or buckets the scanner should inspect.
  2. Pass 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

$ trufflehog huggingface

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
trufflehog huggingface flags
FlagWhat it doesType
--endpointHuggingFace endpoint.Default https://huggingface.co.string
--modelHuggingFace model to scan. You can repeat this flag. Example: 'username/model'strings
--spaceHuggingFace space to scan. You can repeat this flag. Example: 'username/space'strings
--datasetHuggingFace dataset to scan. You can repeat this flag. Example: 'username/dataset'strings
--bucketHuggingFace bucket to scan. You can repeat this flag. Example: 'username/bucket'strings
--orgHuggingFace organization to scan. You can repeat this flag. Example: "trufflesecurity"strings
--userHuggingFace user to scan. You can repeat this flag. Example: "trufflesecurity"strings
--tokenHuggingFace token. Can be provided with environment variable HUGGINGFACE_TOKEN.string
--include-modelsModels 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-spacesSpaces 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-datasetsDatasets 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-modelsModels 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-spacesSpaces 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-datasetsDatasets 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-bucketsBuckets 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-bucketsBuckets 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-modelsSkip all model scans. (Only used with --user or --org)bool
--skip-all-spacesSkip all space scans. (Only used with --user or --org)bool
--skip-all-datasetsSkip all dataset scans. (Only used with --user or --org)bool
--skip-all-bucketsSkip all bucket scans. (Only used with --user or --org)bool
--include-discussionsInclude discussions in scan.bool
--include-prsInclude 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

OSS codeScraped, not reviewedArtifact repositories (Atlas grouping)

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.