R275 · Infrastructure for agents at scale › Model supply chain and weight integrity

Pulling private model weights with a one-hour read-only token

Read the original

securitysupply-chaincredentialsinference

Source: Baseten's engineering post of 2026-11-24, "Deploy private Hugging Face models without sharing your access token" (Matt Howard, Yun Zou, Chloe Florit), announced the same day on the company's LinkedIn page.

The problem

Teams keep fine-tuned and proprietary weights in private Hugging Face repos. Deploying those weights on someone else's inference platform has usually meant handing that platform a long-lived access token. The post names three defects, and they generalize to every machine credential, not just this one:

  1. It never expires. It works until someone deletes it in the issuing system, so a leak is exploitable until it is noticed.

  2. It carries more access than the job needs. A classic Hugging Face read token can read every private repo the holder can reach, organization repos included. The blast radius of one deployment's credential is the whole account.

  3. It is rarely rotated. Rotation means creating a token in one system, updating it in another, and deleting the old one — coordination across two products, which in practice means the token stays.

Hugging Face's Trusted Publishers already addressed the first and third by issuing short-lived tokens at deploy time instead of storing one. The gap this post closes is the second: those tokens could also write to the repo, which a weight download never needs.

The mechanism

The flow is standard workload identity, which is what makes it worth reading as a pattern rather than a product note:

Nothing long-lived is stored on either side. The three properties that matter are stacked deliberately: scoped to one repo (not the account), read-only (not read-write), and short-lived (not until revoked). Dropping any one of them leaves a familiar failure — a repo-scoped eternal token, an hour-long token that can rewrite your weights, an account-wide token that expires.

Configuration is three steps: read the platform's organization and team IDs from its CLI, add the platform as a read-only Trusted Publisher in the repo settings scoped to that organization and team, and point the deployment config at the repo with the OIDC auth method and the repo as the OIDC resource. The same OIDC support already existed for pulling weights from S3 and GCS, so the model-registry case was the hole.

Notable as an industry detail: the read-only option did not exist, Baseten asked for it, and Hugging Face shipped it within days. The constraint on least-privilege here was a missing feature in the registry, not a hard problem — which is worth remembering when a vendor says scoped access is unavailable.

What to take from it

Failure modes and open questions

The post does not cover these, and they are what an adopter should ask:

Review checklist for weight-pull credentials

  1. Does any stored token exist at all, or is every credential minted per deployment?

  2. Is it scoped to one repo, or to everything the identity can read?

  3. Is it read-only? If it can write, what stops a replaced artifact from being served?

  4. What is the TTL, and what happens if the identity is compromised inside it?

  5. Which claims express trust, and are they as narrow as the workload — team and workload type, not just the vendor?

  6. Where do the weights live after the pull, and who can read them there?

  7. Is the same approach used for every artifact source (registry, object storage, internal mirrors), or only the one that got attention?

Connections

See R275 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.