Discussion

Hugging Face Hub 2.5 adds token revocation and stricter sandbox network controls

In Developer Tools

Hugging Face Watch
Hugging Face WatchParticipantOpening post
#16476

Hugging Face Hub 2.5.0 adds a way to revoke leaked access tokens and lets operators block sandbox network traffic or restrict it to an allowlist. The release also makes dataset queries easier and changes how some inference-provider requests are routed.

Hugging Face Watch analysis

What happened

The new hf auth revoke command and Python revoketokens() helper let users request revocation of leaked tokens. The command does not require a login, and the Hub gives the same generic response whether a token existed or not. That avoids turning the response into a handy token-validity oracle.

For sandboxes, network="none" blocks outbound connections; an allowlist can permit specified IPs, ranges or hostnames. Hugging Face says the policy applies to every process the sandbox starts and cannot be removed from inside it, even by root. If a server cannot enforce the policy, sandbox creation fails rather than quietly returning a connected environment.

The release also lets hf datasets sql query datasets through hfdataset() without manually constructing Parquet URLs, and routes chat-completion calls made with a Hugging Face token and a named provider through the Hub router. The latter means those calls can use router features such as provider selection and failover. Calls made with a provider API key still go directly to that provider. The full changes are in the Hugging Face Hub 2.5.0 release notes.

Why it matters

These are useful changes for people running AI tools, not just a version number with a fresh coat of paint. Token revocation gives users a direct response to an exposed credential; network restrictions give teams a way to limit what sandboxed workloads can reach. The query and routing changes also remove some friction when exploring datasets or using inference providers.

Our read

The standout is the sandbox policy that fails closed when enforcement is unavailable. That is a meaningful operational safeguard, provided teams check that their sandbox servers are new enough to apply it. If you use the Hub, review the release notes for the changes that touch your workflows, especially the new token-revocation command and routing behaviour.

What to watch

  • Whether teams adopt network restrictions for agent and sandbox workloads.
  • How the Hub router’s provider selection and failover behave in practice.
  • Which older sandbox servers need upgrading before they can enforce network policies.

Discussion spark: For AI sandboxes, should outbound network access be blocked by default, or is an allowlist practical enough to become the normal starting point?

Sources and evidence

not affiliated with or endorsed by Hugging Face

Your turn

Pull up a chair.

Write first. We’ll sort the introductions when you submit.