redact-secret · Report
API token
hf_ prefixed access token.
Research record
2 events in the review history: 1 observed, 1 reviewed. Latest: observed on 2026-09-23 by automation, project maintainer. Project-maintained review is not independent validation. The family record at this release.
Format
What it looks like
- Descriptive pattern
^hf_[A-Za-z0-9]{34}$
Parts are shown as recorded. Evidence classes belong to the facts below; no class is assigned to a part.
Format facts
Provider documented ·
provider-source· current · observed 2026-09-23@huggingface/hub SDK reference AccessToken type (hf_${string}): Hugging Face's SDK reference on huggingface.co types the user access token as hf_${string}, establishing the hf_ prefix; the provider's Hub OpenAPI spec (/.well-known/openapi.json, POST /api/credentials/revoke) gives a raw access-token example of hf_ followed by 34 placeholder characters, which establishes the 34-character body length on example strength only. The [A-Za-z0-9] body alphabet is not provider-stated and remains a support-policy union of the tool alphabets (gitleaks letters only, TruffleHog alphanumeric); the api_org_ variant is not covered by this provider source
- huggingface.co/docs/huggingface.js/hub/modulesprovider-documentation · last read 2026-09-23 · latest outcome read · supports Hugging Face's SDK reference on huggingface.co types the user access token as hf_${string}, establishing the hf_ prefix; the provider's Hub OpenAPI spec (/.well-known/openapi.json, POST /api/credentials/revoke) gives a raw access-token example of hf_ followed by 34 placeholder characters, which establishes the 34-character body length on example strength only. The [A-Za-z0-9] body alphabet is not provider-stated and remains a support-policy union of the tool alphabets (gitleaks letters only, TruffleHog alphanumeric); the api_org_ variant is not covered by this provider source
Tool corroborated ·
tool-corroboration· current · observed 2026-09-23Pinned scanner rules are consistent with the contract grammar (2 artifacts: gitleaks 8.30.1; trufflehog 3.97.4).
- gitleaks/gitleaks @ v8.30.1: config/gitleaks.tomlscanner-rule-source · last read 2026-10-04 · latest outcome read · supports gitleaks 8.30.1: gitleaks.toml
- trufflesecurity/trufflehog @ v3.97.4: pkg/detectors/huggingface/huggingface.goscanner-rule-source · last read 2026-09-23 · latest outcome read · supports trufflehog 3.97.4: huggingface/huggingface
Unresolved ·
listed-references· current · observed 2026-09-23The legacy contract lists 1 reference without stating which property each supports.
- huggingface.co/.well-known/openapi.jsonprovider-documentation · last read 2026-09-23 · latest outcome read · supports Listed as a reference by the legacy contract
Provider documented ·
dossier-research· current · observed 2026-09-23Legacy dossier research (verdict ready, tier T1) cited 3 sources; the dossier does not attribute sources to individual properties.
- redact-secret/redact-secret @ 8b6a5fde52ecb4dfce13f09c7a947062d21483c7: docs/audits/evidence/654/README.mdproject-research-note · last read 2026-09-23 · latest outcome read · supports Final research evidence recorded by the legacy dossier
- huggingface.co/.well-known/openapi.jsonprovider-documentation · last read 2026-09-23 · latest outcome read · supports Cited by the legacy dossier research for this family
- huggingface.co/docs/huggingface.js/hub/modulesprovider-documentation · last read 2026-09-23 · latest outcome read · supports Cited by the legacy dossier research for this family
Open questions
No open question is recorded for this revision.
Benchmark dossier notes
- Shape
hf_then 34 characters. Core accepts[A-Za-z0-9]; every observed sample and letters-only tool regex is narrower, and no source says digits never occur.hf_oauth_…andhf_jwt_…are other documentedhf_tokens, so a later_in a body does not prove it is not Hugging Face.- Basis
- prefix: the SDK reference types
AccessTokenashf_${string}(a type annotation, not prose; accepted as T1 by maintainer ruling in the #575 record). Length: thePOST /api/credentials/revokeexample ishf_plus 34 placeholder characters; the schema says onlyminLength1 andmaxLength200, so length is on example strength. Alphabet: T2 only; Hugging Face's own current code (hf-mcp-server, agent-manager) and a retired inference-playground validator usehf_[A-Za-z0-9]{34}, which is code, not documentation, and tools split on the alphabet (#654). - Issuance
- not attempted.
- Contract in core
- detector-families.md (row
huggingface:api-token); evidence #654 record.
In this benchmark
- Fixtures
- 26
- Left readable
- 0
- Redacted too much
- 0
- False alarms
- 0
26 fixtures: 11 expect a redaction, 15 must stay quiet. See every row
| Evidence level | Fixtures | Left readable | Too much | False alarms |
|---|---|---|---|---|
| T1Provider-documented | 11 | 0 | 0 | 0 |
| T2Tool-corroborated | 13 | 0 | 0 | 0 |
| T3Project policy | 2 | 0 | 0 | 0 |
Every scanner on the same fixtures
In run order. Counts are what each scanner recorded on this family's fixtures, whichever rules it has; a scanner with no rule for the family has nothing to report on it.
| Scanner | Fixtures | Left readable | Too much | False alarms |
|---|---|---|---|---|
| flare-redactRuntime library · 1.6.1 · Published npm package · secrets-only (pii, generic_assignment disabled) · JavaScript engine1 rule targets it | 26 | 0 | 0 | 3 |
| gitleaksRepository scanner · 8.30.1 · Directory scan · default rules1 rule targets it | 26 | 5 | 0 | 0 |
| redact-secretProduct measured here · 0.1.0-beta.14 · Published npm package · default detectors1 detector mapped | 26 | 0 | 0 | 0 |
| trufflehogRepository scanner · 3.97.4 · Filesystem scan · verification disabled1 rule targets it | 26 | 0 | 0 | 1 |
Benchmark dossier questions
- Open caveat
- T1 is a maintainer ruling on an SDK-reference type annotation (prefix) and an OpenAPI example (length 34); the alphabet is not provider-stated and api_org_ has no current source.
Looks like it, but isn't
- Collisions
- the
api_org_variant has no current provider-domain source (a 2021 archived page shows a placeholder; the current SDK rejects org tokens at login), so it stays outside the T1 contract.
Scanner rules for this family
| Scanner | Rule | What the rule matches |
|---|---|---|
| flare-redact · rules 1.6.1 | huggingface_token | hf_ + 30-45 characters |
| gitleaks · rules 8.30.1 | huggingface-access-token | hf_ + 34 letters |
| trufflehog · rules 3.97.4 | huggingface | hf_ + 34 alphanumerics |
No rule maps to this family in openredaction.
Fixtures in this family
| Fixture | Kind and evidence | redact-secret |
|---|---|---|
huggingface-token-dash-identifier-embeddinghuggingface · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
huggingface-token-hf-auth-loginhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-inference-bearer-headerhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-shape-1-barehuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-shape-1-quotedhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-shape-1-unicode-crlfhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-user-plain-twinhuggingface · wrong-length | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-user-unicode-crlf-twinhuggingface · wrong-length | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-actions-sync-to-hubhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-hf-token-envhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-inference-clienthuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-leading-identifier-embeddinghuggingface · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
huggingface-token-maskhuggingface · benign-lookalike | Must not flagT3 · Project policy | Quiet |
huggingface-token-model-repo-and-revision-public-idhuggingface · public-identifier | Must not flagT2 · Tool-corroborated | Quiet |
huggingface-token-prefix-onlyhuggingface · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
huggingface-token-referencehuggingface · benign-lookalike | Must not flagT3 · Project policy | Quiet |
huggingface-token-shape-1-prefix-bare-twinhuggingface · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-shape-1-prefix-quoted-twinhuggingface · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-shape-1-prefix-unicode-crlf-twinhuggingface · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-short-bodyhuggingface · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
huggingface-token-stored-tokens-inihuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-trailing-identifier-embeddinghuggingface · benign-lookalike | Must not flagT2 · Tool-corroborated | Quiet |
huggingface-token-user-plainhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
huggingface-token-user-prefix-plain-twinhuggingface · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-user-prefix-unicode-crlf-twinhuggingface · prefix-near-miss | Must not flagT2 · Tool-corroborated · twin | Quiet |
huggingface-token-user-unicode-crlfhuggingface · documented-format-literal | Must redactT1 · Provider-documented | Redacted |
Sources
Documentation and code
- huggingface.co/docs/huggingface.js/hub/modules
- huggingface.co/.well-known/openapi.json
Research log
- redact-secret/redact-secret#654Research issue
- Final evidence, pinned to a commit/redact-secret/redact-secret/blob/8b6a5fde52ecb4dfce13f09c7a947062d21483c7/docs/audits/evidence/654/README.md