Skip to content

Test your website now

Free, no card. We read only public pages.

Run free audit →

Security · Medium severity

Too Many Third-Party Scripts: Audit and Reduce Exposure

Audit too many third-party scripts. Find runtime vendors, remove unused tags, review ownership and consent, and test security and performance tradeoffs.

Published · Updated

What the check tests

Check
sec.third-party-scripts - Third-party script count is controlled
Passes when
Scripts loaded from other origins run with full access to the page, including forms and cookies not marked HttpOnly.
Scope
graded on every page crawled
Severity
Medium
Fix effort
medium - a working day
Impact when fixed
medium

In one paragraph

Too many third-party scripts means the page exceeds this check's threshold for script tags hosted elsewhere. Each included script can extend the code and supply-chain dependencies you trust, but a tag count is not a vulnerability assessment. Inventory what actually executes, including runtime-loaded tags, remove unused dependencies, and retain reviewed business-critical scripts with clear ownership and controls.

Why it matters

A script included in your document generally executes in that document's environment, not in a harmless isolated box simply because another company supplied it. It can interact with content and forms within the capabilities granted to the page. Review vendors, delivery, and configuration accordingly.

Ownership and behaviour matter more than a universal number. One powerful loader can introduce many downstream vendors, while several owned static files on a separate asset host may pose a very different risk. A hostname count cannot establish legal compliance, malicious behaviour, or the security maturity of a supplier.

There are also performance costs from downloaded code, main-thread execution, and connection dependencies. Those costs need browser profiling; fewer source tags do not guarantee faster interactions if the remaining loader performs the same work.

How WebAuditOS evaluates this finding

The supplied rule counts script src tags in served HTML whose host differs from the document after removing a leading www. Zero to five pass, six to twelve warn, and thirteen or more fail at medium severity. Unparseable HTML is not graded.

It counts tags, including duplicates, not unique vendors or execution cost. An owned CDN subdomain counts as another host. Scripts injected later by JavaScript are missed. A tag manager loading many vendors can therefore appear as one source tag. A passing count is not a complete third-party inventory.

How to fix it

  1. Record scripts from both page source and a fresh browser session. In DevTools, inspect script requests and their initiators while testing relevant interactions and consent states. Use your approved testing process so real tracking is not accidentally triggered outside intended conditions.
  2. Assign each dependency an owner, purpose, pages used, data access, and update path. Distinguish third-party-controlled code from owned assets on a different hostname. Keep downstream tag-manager dependencies visible in the inventory.
  3. Remove unused experiments, duplicate tracking, abandoned widgets, and libraries nobody maintains. Verify purpose with the responsible team; absence of a familiar name is not enough to classify a consent or authentication dependency as dead.
  4. Scope remaining integrations to the pages and conditions that need them. A support widget may not belong on every checkout page. Apply required consent and privacy controls through the proper design, not a universal arbitrary timer.
  5. Consider self-hosting stable libraries only when permitted and supportable. You then own updates and patch response. If retaining a versioned external file, evaluate SRI; changing vendor loaders may need a different control.
  6. Review tag-manager governance. Define who can publish, which templates are permitted, how changes are reviewed, and how stale tags are retired. One approved container does not automatically approve every future payload.
  7. Use an appropriate CSP as a complementary restriction and test its real effect. A host allowlist alone does not make every script from an allowed vendor safe, and an overly permissive policy provides little additional control.
  8. Deploy removals in understandable batches. Test forms, authentication, checkout, consent behaviour, conversion measurement, and browser timings. Rescan the source count while comparing the actual runtime inventory and performance traces.

What the fix can break

Removing a seemingly unused script can affect forms, consent gating, revenue reporting, or a rarely visited screen. Use explicit ownership and rollback evidence rather than waiting to see whether someone complains weeks later.

Moving an owned file from a subdomain to the main host may reduce this heuristic count without changing supply-chain control or execution work. Do not present that cosmetic improvement as reduced vendor risk.

Delayed analytics can measure a different visitor population. Record measurement changes separately from real traffic changes so a faster page is not misdiagnosed as an unexplained business decline.

Questions

Why does one tag-manager script count as one?

The documented rule reads initial HTML tags. Its later payloads require browser and container inspection.

Are our owned CDN files really third-party risk?

Not necessarily. The rule compares hostnames, not ownership. Evaluate who can change the code and how it is delivered.

Is five a browser security standard?

No. It is the supplied scanner's threshold. The better operational goal is an understood, maintained, justified dependency list.

What should I review next?

Review Subresource Integrity, CSP, and the website audit checklist.

Standards and sources

  • OWASP Supply Chain

In the report

Test this on your own site

Every scan runs sec.third-party-scripts on every page it crawls, on every plan. The finding carries this id, so a line in a report can be matched to the explanation above - and the free scan needs no account.