Safeguard
Supply Chain•

Who vets the third-party scripts on a client website?

Analytics, chat and tag scripts run with full page access. Assign an owner, keep a list, and pin versions with Subresource Integrity where files do not change.

Safeguard Security Team
3 min read

The agency and the client should agree on one owner for third-party scripts, keep a written list of every script and why it is there, and use Subresource Integrity on files that do not change. Marketing tags added through a dashboard are the usual gap.

Third-party scripts run in the visitor's browser with the same access as your own code. A chat widget, an analytics snippet or a font loader is not passive.

Why scripts need an owner

Clients add scripts too. A marketing person pastes a tag into a theme setting, and a year later nobody knows what it loads. If that source is compromised, every page that loads it is affected. MDN describes the risk: a site relying on a CDN or other third party to host a resource is exposed if an attacker gains control of that host.

What SRI does

MDN explains that Subresource Integrity lets browsers verify that fetched resources, for example from a CDN, have not been manipulated. You supply a cryptographic hash that the fetched file must match. If the file changes, the browser refuses it.

This works for static files such as a pinned library version. It does not fit scripts that change by design, such as many tag managers and analytics loaders, because the hash would break. For those, SRI is the wrong tool and you need review and monitoring instead.

A simple decision table

Script typeSRI possibleWhat to do instead or as well
Pinned library from a CDNYesAdd integrity hash, or self host
Analytics loader that updates itselfNoReview the vendor, limit what it can access
Tag manager containerNoRestrict who can publish changes, log changes
Chat widgetNoLoad only on pages that need it
Fonts and iconsOftenSelf host where practical

Build the list

  1. Open the site with browser developer tools and list the domains that serve scripts.
  2. Match each to a reason and an owner.
  3. Remove those with no owner or no reason.
  4. Record the list in the handover document.
  5. Review it each quarter, and after any marketing campaign launch.

Self hosting as an option

If a library does not change often, hosting it yourself removes a third party from the page. You then own the update, so add it to the inventory and the patch routine like any other dependency.

Agree on who publishes

For tag managers, limit publish rights to named people, require review for changes and keep the history. That turns an invisible change channel into a visible one.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how a list of components with versions makes review possible; the script list does the same job for the browser side.

Safeguard's free scan covers dependencies in a project repository, so script tags loaded from outside the repository need the manual list above.

Quick check

Does SRI work for every external script?

No. It needs a file that does not change, because the hash must match exactly. Self updating loaders cannot use it.

Who should own the script list?

One named person on the client side and one on the agency side, written into the handover.

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.