---
title: How do you find Hugging Face models and tokens used across your organisation?
url: https://opencontroller.lyzr.com/blog/find-hugging-face-models-and-tokens-in-your-org
published: 2026-11-16
updated: 2026-11-16
author: Lyzr
---

# How do you find Hugging Face models and tokens used across your organisation?

**Start with three signals: who holds Hugging Face access tokens, where code pulls models from the Hub, and what your Hugging Face organisation's own admin logs say. Tokens show who can pull and push; download traffic and code references show which models actually run; the org's token list and audit log show what is sanctioned. Combine them into one inventory before you write any policy.**

Hugging Face is the default source for open-weight models, datasets and Spaces. That makes it a common blind spot. A team can pull a model with one line of Python, run it on a GPU box, and never touch a cloud AI service that your discovery tools watch. This guide covers where to look and what each signal can and cannot tell you. For the wider discovery programme, see the pillar guide on [how to find shadow AI agents](/blog/how-to-find-shadow-ai-agents).

## What should you be looking for?

Four kinds of Hugging Face asset matter for governance:

| Asset | Why it matters | Where it shows up |
|---|---|---|
| User access tokens | Grant read or write access to models, datasets and org repos | Code, CI secrets, `.env` files, developer laptops, the org's token list |
| Downloaded models | Become the brain of an internal agent or app | Local caches, container images, model servers, object storage |
| Org-owned repos | Fine-tuned or private models your teams publish | Your Hugging Face organisation |
| Spaces and inference endpoints | Hosted demos and APIs that may process company data | Your organisation and personal accounts |

The hard part is the gap between the first two rows and the last two. Your org admin view only covers what is inside your organisation. Personal accounts and anonymous downloads sit outside it.

## How do you find Hugging Face tokens?

Hugging Face user access tokens start with the prefix `hf_`. That makes them easy to pattern-match.

1. **Scan source code and CI.** Search repositories, pipeline variables and secret stores for `hf_` strings and for the environment variable `HF_TOKEN` (older code also uses `HUGGING_FACE_HUB_TOKEN`). Most secret scanners ship a Hugging Face token rule; confirm yours does.
2. **Scan developer machines.** The Hub client stores a login token in the local cache directory by default (`~/.cache/huggingface/token`). Endpoint tooling or MDM scripts can report whether that file exists, without reading it.
3. **List tokens in your organisation.** On Team and Enterprise plans, org admins can list every access token that has access to org resources, including the permissions of fine-grained tokens. The list is also available by API at `/api/organizations/{org}/settings/tokens`.
4. **Check the token policy.** Org admins can set one of three policies: allow all user access tokens, allow only fine-grained tokens, or require administrator approval for fine-grained tokens. If the policy is still the default, any unscoped read/write token a member creates can reach org repos.

Treat any token found in code as leaked, even if the repo is private. The approach is the same as for other model provider keys; see [how to find leaked and unused LLM API keys](/blog/find-leaked-and-unused-llm-api-keys).

## How do you find which models teams download?

Tokens tell you who *can* pull. These signals tell you what *was* pulled:

- **Egress logs.** Model downloads go to `huggingface.co` and its CDN hosts. Proxy, firewall or DNS logs give you which hosts and service accounts download, and how much. Large transfers from build servers or GPU hosts are the interesting ones.
- **Code references.** Search for `from_pretrained(`, `hf_hub_download(`, `snapshot_download(` and `pipeline(` calls. The first string argument is usually the model ID (`org/model-name`), which gives you the exact model and often the licence.
- **Caches and images.** The default Hub cache stores models in folders named `models--{org}--{name}`. Scanning GPU hosts, notebooks and container images for these folders gives you a model list with no network data at all. See [how to find AI agents in container images](/blog/find-ai-agents-in-container-images).
- **Model servers.** Self-hosted inference servers usually load a Hub model ID at start-up. Their config or start command names the model.

## What does the Hugging Face audit log show?

On Team and Enterprise plans, the organisation audit log records who did what, the action type, a description, location with an anonymised IP, and a timestamp. Event categories include org settings and security, membership, service accounts and their tokens, OAuth apps and token issuance, repos and Spaces, resource groups, and jobs.

Admins can download the full log as JSON or export it by API with a token that has the audit-log export permission. Pull it into your SIEM alongside cloud logs.

Two limits matter. First, the audit log covers actions on your organisation, not anonymous public downloads by your staff. Second, Hugging Face's documentation does not state a retention period, so export on a schedule rather than relying on the console.

## How do you turn the findings into control?

Use this checklist once the first sweep is done:

1. Set the org token policy to fine-grained only, or to require admin approval if you want a review step.
2. Revoke tokens that are unused, over-scoped or found in code. Revocation of org access needs the Enterprise plan.
3. Move automation off personal tokens and onto org-owned service accounts (Enterprise) with tokens scoped to org resources.
4. Use resource groups to limit which members can see which repos.
5. Record each model in use with its Hub ID, revision and licence, and link it to the agent or app that uses it.
6. Re-run code, cache and egress scans on a schedule so new pulls are caught.

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud and keeps them in a governed registry of agents, versions, tools and MCP servers. Posture flags risky permissions and configuration. Where a team runs a downloaded model behind the Lyzr Gateway, the gateway attributes cost per agent and per version. Opencontroller Edge extends the same view to developer devices, coding agents and local MCP servers. Hugging Face itself is not one of the listed platform connectors, so the token and audit-log steps above stay in your own scripts. To see the registry in action, [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can Hugging Face show me every model my employees downloaded?**
No. The organisation audit log covers actions on your organisation's resources. Public model downloads by staff only appear in your own egress logs, code and caches.

**Which Hugging Face plan do I need to list and revoke tokens?**
Listing tokens and setting token policies is available on Team and Enterprise plans. Revoking a token's org access, service accounts and programmatic token issuance need the Enterprise plan or above.

**Should we block huggingface.co at the proxy?**
Usually not outright. Many teams depend on it. A better pattern is to allow downloads from known build and GPU hosts, log everything, and require models to be registered before they reach production.

## Key facts

Hugging Face user access tokens start with hf_. On Team and Enterprise plans, org admins can list org access tokens, set a token policy (all tokens, fine-grained only, or admin approval) and export the audit log as JSON or by API. Revoking org access, service accounts and programmatic token issuance require Enterprise. The org audit log does not cover anonymous public downloads by staff. Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud; Hugging Face is not a listed connector. Opencontroller starts from $250K per deployment per year.

## Related

- [How do you find leaked or unused LLM API keys?](https://opencontroller.lyzr.com/blog/find-leaked-and-unused-llm-api-keys.md)
- [How do you find AI agents hidden in container images?](https://opencontroller.lyzr.com/blog/find-ai-agents-in-container-images.md)
- [How do you find self-hosted LLM servers like Ollama or vLLM on your network?](https://opencontroller.lyzr.com/blog/find-self-hosted-llm-servers-on-your-network.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
