Safeguard
Supply Chain•

How do you get an alert when a model you depend on changes upstream?

Use repo webhooks to catch new commits, tags, moves and deletes on a model repo, then route them into review. Setup steps and what to do on each alert.

Safeguard Security Team
3 min read

Subscribe to webhooks on the model repo. The Hugging Face Hub sends events for new commits and tags, repo moves and deletes, and config changes. Send those events to a small receiver that opens a review ticket, so a changed model never reaches production without a person looking.

What events exist

The Hub documents several webhook scopes. The ones that matter for dependency watching:

ScopeWhat it covers
repoGlobal events on a repo, with actions create, delete, update and move
repo.contentNew commits or tags. It also fires on new pull requests, because those create a reference
repo.configSettings changes such as visibility
discussionDiscussions and pull requests being created or updated

Because repo.content also fires for pull requests, expect some noise. Filter on the reference in the payload so a community pull request does not look like a change to the branch you use.

Setting it up

  1. List the external models your code loads. If you have no list, start there. See how to find every model your code loads.
  2. Create a webhook for each watched repo, or one for a set of repos, pointing to an endpoint you control.
  3. Verify the webhook secret on every delivery before you act on it.
  4. Respond fast, then process from a queue so a slow ticket system does not cause retries.
  5. Map each event to an action, as in the table below.
EventSuggested action
New commit on the branch you trackOpen a review ticket with the diff of files and hashes
New tagNote it, no action unless you track tags
MoveBlock promotion until the new owner is confirmed
DeleteConfirm your internal copy is intact
Visibility changeCheck whether your build still resolves the repo

What a good review looks like

An alert is only useful if the response is short and repeatable. Compare file hashes between the approved commit and the new one. Check whether any file format changed, for example a new pickle based file next to safetensors weights. Re-read the license and the model card. Then approve a new commit hash or stay on the old one.

If you pin by commit hash, an upstream change cannot affect your build until you choose to move. The alert exists so that choice is made with information, not by accident.

Try it yourself

Click through it at your own pace, or open it full screen. Watch how monitoring turns a later change into a visible event.

Safeguard covers the dependency side of this with continuous scanning of the packages around the model and policy gates on changes. A free scan shows what your repository already depends on.

Quick check

Do webhooks replace pinning a commit hash?

No. Pinning stops a silent change from reaching your build. Webhooks tell you a change happened so you can review it.

Why do I get an event for a pull request I did not expect?

The Hub documents that repo.content events also trigger on new pull requests, since they create a reference.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.