Skip to content
FunnelGuard

Fix guide by FunnelsGuard

PCI DSS 6.4.3 script inventory missing: how to fix it

OPS-365High impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

PCI DSS is the security standard for businesses that take card payments. Version 4.0 added requirement 6.4.3, which applies to payment pages, meaning pages where card data is entered or where a payment form or iframe is loaded. It has three parts: each script must be authorized, its integrity must be assured, and you must keep an inventory of all scripts with a written justification for each.

Why it costs you leads or sales

How an unlisted script becomes a card-data leak
  1. Script addedA marketing tool is added to the checkout page
  2. No inventoryNo record, approval or reason is written down
  3. Script changesThe vendor or a hijacker alters the code
  4. Card data copiedShoppers' details are sent to a third party

The break is the missing inventory: nobody notices the new or changed script.

How to check if your site has it

Find the scripts that run on your payment pages
  1. Open the payment page in a private window

    Go through the real checkout to the step where card details or the payment form appear. Note every URL where this happens.

  2. Open browser developer tools

    In Chrome, press F12, open the Network tab, filter by JS, and reload. Save the list of script URLs. Tick 'Disable cache' for a full picture.

  3. Check scripts that load other scripts

    Sort by Initiator. Tag managers and chat widgets often pull in more files. Each one counts.

  4. Check inline scripts

    View page source and search for <script. Inline blocks without a src also need to be on the list.

  5. Compare with any existing list

    Anything loading that is not on your list, or on the list but not loading, is a finding.

Paste in the browser console to list script sources on the current pagejavascript
[...document.scripts].map(s => s.src || '(inline script)').forEach(s => console.log(s));
performance.getEntriesByType('resource').filter(r => r.initiatorType === 'script').forEach(r => console.log(r.name));

How to fix it

Build and maintain a 6.4.3 script inventory
  1. Create the inventory table

    One row per script per payment page. Columns: script URL or name, vendor, page(s), purpose, business justification, owner, approver, approval date, integrity method, last reviewed.

  2. Write a justification for each script

    State why it must run on the payment page. 'Fraud screening required by our processor' is a reason. 'Marketing asked for it' is not enough on its own.

  3. Remove what you cannot justify

    Ad pixels, heatmaps and chat widgets are common candidates to remove from payment pages. Fire them on earlier steps instead.

  4. Record authorization

    Have a named person approve each script and keep the date. Set up a change process so new scripts need approval before they go live.

  5. Assure integrity

    Use Subresource Integrity (SRI) for fixed, self-hosted or versioned files, and a Content Security Policy (CSP) to allow only listed sources. For scripts that change often, use monitoring or hosting the file yourself.

  6. Schedule reviews

    Review the inventory at least every time you change the checkout and on a regular schedule, for example quarterly. Record each review.

Example inventory rows
ScriptPurpose and justificationOwner / approverIntegrity method
https://js.stripe.com/v3/Payment provider script, required to take card paymentsDev lead / Finance directorCSP allow-list; loaded directly from the provider
/assets/checkout.jsOur own checkout logic, validates the cartDev lead / CTOSelf-hosted, code review, SRI hash
GTM container GTM-XXXXNot needed on payment step; removedMarketing / CTORemoved from payment page
Subresource Integrity on a fixed script filehtml
<script src="https://example.com/lib/checkout-helper-1.2.3.js"
  integrity="sha384-REPLACE_WITH_REAL_HASH"
  crossorigin="anonymous"></script>
Example Content-Security-Policy header for a payment pagetext
Content-Security-Policy: script-src 'self' https://js.stripe.com; frame-src https://js.stripe.com https://hooks.stripe.com; object-src 'none'; base-uri 'self'
Where to remove or control scripts, by platform
  1. Review checkout scripts

    Checkout is largely hosted by Shopify, so your control is mainly over apps and customer events (Settings > Customer events). Remove pixels and apps you cannot justify. Shopify Plus stores can edit checkout extensibility settings. Confirm your scope with Shopify's PCI documentation.

Payment page script management

Before

  • Scripts added by anyone, any time
  • No list of what runs on checkout
  • No written reason or approval
  • Nothing checks if a script changes

After

  • Every script listed with owner and reason
  • Approval recorded before go-live
  • CSP and SRI limit what can run
  • Inventory reviewed on a schedule

How to confirm it's fixed

Confirmation checklist
  • The scripts loaded on each payment page (Network tab) match the inventory exactly
  • Each entry has a justification, an owner, an approver and a date
  • Unjustified scripts are gone from the payment pages
  • A CSP is active and the browser console shows no unexpected violations
  • SRI hashes are in place for fixed files that support them
  • A review date is on the calendar and the last review is recorded
  • You can show your assessor or acquirer the document on request

How to prevent it happening again

Habits that keep the inventory true
  • Require approval before any new script goes on a payment page
  • Lock down tag manager publish rights on checkout tags
  • Re-run the script list after every checkout, theme or plugin update
  • Review the inventory on a fixed schedule and record it
  • Prefer hosted payment pages or provider iframes to reduce scripts you must manage
  • Keep the inventory in version control or a ticketing system with history
Example: how an untracked script goes unnoticed
  1. Month 0

    A chat widget is added to all pages, including checkout

  2. Month 3

    The person who added it leaves; nobody owns it

  3. Month 8

    The vendor changes the script; no one reviews it

  4. Month 12

    Assessor asks for the inventory; the script is found and removed from payment pages

How FunnelGuard handles this

Questions people ask

What is PCI DSS requirement 6.4.3?

It is a PCI DSS 4.0 requirement for payment pages. It says each script loaded and run in the shopper's browser must be authorized, have its integrity assured, and be listed in an inventory with a written justification for why it is needed.

How do I create a script inventory for my payment page?

Load the payment page with developer tools open, list every script from the Network tab and page source, then record each in a table with its purpose, justification, owner, approver and integrity method. Remove any script you cannot justify.

Do Google Analytics and Meta Pixel need to be on the inventory?

Yes, if they run on a payment page they are scripts and must be listed, justified and authorized. Many businesses choose to remove marketing tags from the payment step and fire them on earlier pages instead, which shortens the inventory.

How do I prove script integrity on a checkout page?

Common methods are Subresource Integrity hashes on fixed files, a Content Security Policy that allows only listed sources, hosting scripts yourself under code review, or using a monitoring tool that detects changes. Which are enough depends on your assessor.

Does 6.4.3 apply if I use a hosted payment page or iframe?

Often the scope is smaller, because the provider controls the page where card data is entered. Your own page that embeds or redirects to it may still have scripts to manage. Confirm with your acquirer or assessor which questionnaire and requirements apply.

How often should I review my payment page script inventory?

Review it whenever the checkout, theme, plugins or tag manager change, and on a regular schedule such as quarterly. Record each review with a date and name.

Does FunnelGuard check PCI DSS script inventories?

No. FunnelGuard does not check this yet; it is a possible future check. It does run your checkout journeys on a schedule and checks steps and tracking hits, but it does not produce a script inventory or compliance evidence.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.