Linux 软件免费装
Banner图

ScriptLedger

开发者 frictionsort
更新时间 2026年11月22日 05:00
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

security woocommerce ecommerce checkout pci dss

下载

1.0.0

详情介绍:

ScriptLedger keeps a record of the JavaScript it sees on your WordPress payment pages: what loads, where it comes from, who approved it and why, and when it changed. It turns that record into a dated evidence pack for your acquirer (the bank that processes your card payments) or Qualified Security Assessor (QSA). A web-skimming attack, also called e-skimming or Magecart, changes a script on a payment page, or adds a new one, to copy card details as they are entered. PCI DSS v4.0.1 addresses this with two requirements for payment pages. 6.4.3 asks for an inventory of the scripts, with a written justification for each and a way to confirm each is authorised and to assure its integrity. 11.6.1 asks for a change- and tamper-detection mechanism that alerts you to unauthorised changes to those scripts and to the page's HTTP headers, at least weekly or as often as your targeted risk analysis sets. ScriptLedger helps you document both, within the limits stated below. ScriptLedger produces evidence. It does not certify anything, and it does not block scripts. No plugin can make a site compliant. It gives you the documentation to hand to your acquirer or QSA; it does not make that determination for you. Who it is for How it works Because it runs inside WordPress, ScriptLedger can name the plugin or theme behind your site's own scripts and, with the browser beacon on, notice a script that reached the browser without going through WordPress's script system, which an external scanner cannot tell. It combines three views of each payment page, and the inventory shows which of them saw each script: Features Built for payment pages What this evidence does and does not establish ScriptLedger performs detection, inventory and documentation. It does not block script execution. Payment contexts are identified through platform integration, signal detection, and manual designation; pages outside those contexts are not monitored. When script downloads are on, integrity verification for cross-origin scripts is performed by server-side retrieval, which may not reflect responses served to end users under geographic, device, user-agent or time-based targeting; scripts verified this way are marked medium confidence. A script not seen on a monitored page in the last 30 days, for example because the page is served from a full-page cache, is not downloaded. Security headers are also read by server-side retrieval, whether or not script downloads are on, and without a shopper session; a payment page that sends such a request to another page, as a checkout with an empty cart does, cannot be read and is not counted as scanned. Inline scripts, written into the page rather than loaded from a URL, are not inventoried or hashed. When the browser beacon is enabled, ScriptLedger adds its own inline script to monitored payment pages; it is not listed in the inventory. Where browser-side sampling is enabled, the browser observations are drawn from a proportion of page views rather than every view. Scripts that reach the browser without passing through WordPress are detected only from browser beacon reports; section 5 of the evidence pack states whether the beacon is on when the pack is generated, the first and last hour with a browser report on the record, and how many hours before generation the last of them began. This report is evidence to support an assessment. It is not a certification of PCI DSS compliance and does not substitute for a Qualified Security Assessor.

安装:

  1. In your WordPress admin, go to Plugins › Add New Plugin, search for "ScriptLedger", then click Install Now and Activate. To install by hand, upload the scriptledger folder to /wp-content/plugins/ and activate it on the Plugins screen.
  2. No ecommerce plugin is needed. With WooCommerce, the checkout and cart pages are detected when they are first viewed (step 3).
  3. Visit one of your payment pages, for example your checkout with an item in the cart, so ScriptLedger can record the scripts WordPress prints there. Do this logged out or in a private window, so scripts that load only for administrators, such as the admin bar, are not recorded.
  4. Open ScriptLedger in the admin menu. Under More › Payment pages, confirm any suggested pages and add any page ScriptLedger did not find.
  5. Under More › Settings, turn on Script downloads to have script contents hashed and checked for changes and, if you want, the Browser beacon to record what customers' browsers load. Both are off by default.
  6. Review each script under Needs review, then click Run scan now. A scan also runs every day on its own; the first is due about an hour after activation.
  7. Generate an evidence pack under Evidence packs whenever your assessor needs one.

屏幕截图:

  • Payment pages: WooCommerce pages are detected directly, and a card form on any other page is suggested for you to confirm.
  • Script inventory: each script's source, which views saw it, its status and integrity confidence, with its authorisation record.
  • Needs review: approve or deny each script with a written justification, riskiest first.
  • Findings: changed scripts, browser-only scripts and security-header changes, open and resolved.
  • Scan history: a dated, append-only log of every scheduled and manual scan.
  • Evidence packs: nine sections mapped to PCI DSS 6.4.3 and 11.6.1, with the limitations statement in full.
  • Settings: email and webhook alerts, the browser beacon, script downloads and data retention.

升级注意事项:

1.0.0 First public release.

常见问题:

Does this make my site PCI DSS compliant?

No. ScriptLedger produces documentation to support your PCI DSS assessment. It does not certify compliance, and it is not a substitute for a Qualified Security Assessor. Your acquirer or QSA decides what your assessment needs.

Which PCI DSS requirements does it help with?

Requirements 6.4.3 and 11.6.1 of PCI DSS v4.0.1, which cover the scripts loaded and run in the customer's browser on a payment page, whether they come from your own site or from a third party. 6.4.3 asks for an inventory of those scripts with a written business or technical justification for each, a way to confirm that each is authorised, and a way to assure its integrity. 11.6.1 asks for a change- and tamper-detection mechanism that alerts you to unauthorised changes, additions and deletions to those scripts and to the page's HTTP headers as the customer's browser receives them, run at least weekly or as often as your targeted risk analysis sets. ScriptLedger downloads scripts and reads six security headers from your server, which may not match what a browser receives. It raises findings for a changed script, a changed header and a script only the browser reported; a new script WordPress prints waits in Needs review without an alert, and a script that stops loading raises no alert. The evidence pack's sections are mapped to these requirements, and its limitations statement says what the record does not show. ScriptLedger does not address the rest of PCI DSS.

My payment form is an iframe or hosted field from my provider (SAQ A). Does this apply to me?

Most likely. If your page embeds your provider's payment form, for example in an iframe, SAQ A asks you to confirm that your site is not susceptible to attacks from scripts that could affect your e-commerce systems. PCI SSC FAQ 1588 gives two ways to meet that criterion: techniques such as those in Requirements 6.4.3 and 11.6.1, deployed by you or by a third party, or confirmation from your PCI DSS compliant payment provider that its embedded form, set up as it instructs, protects your page from script attacks. The criterion does not apply when your checkout redirects customers to the provider's own page, or when you outsource payments entirely. Confirm which SAQ you file with your acquirer or the payment brand; ScriptLedger's scope assessment is indicative, not a formal determination. ScriptLedger covers your own page around the form, not the scripts inside your provider's frame, which are the provider's responsibility.

Does it block malicious scripts?

No. ScriptLedger detects and records; it never stops a script from loading, and the only thing it adds to a page is the optional browser beacon. When it flags a script you did not expect, find where it comes from (the inventory names the plugin or theme for your site's own files) and remove it at the source.

Does it slow down or interfere with my checkout?

It is designed not to. ScriptLedger observes; it never touches your cart, order, session or payment. Its code on payment pages is built to fail open, so an error in ScriptLedger costs it data rather than your checkout. The scripts WordPress prints are recorded at most once an hour per page. The optional browser beacon is a small inline script that reports after the page has loaded, and again, with anything new, each time the visitor switches tabs or leaves the page.

Do I need WooCommerce?

No. ScriptLedger activates and works with no ecommerce plugin installed. WooCommerce checkout (classic or block), order-pay and cart pages are detected the first time each is viewed. On other checkouts, such as membership, donation, course or custom payment pages, a page where WordPress loads a payment provider's script is suggested for you to confirm, and you can add any page yourself.

Which pages does it monitor?

The pages WooCommerce identifies and the pages you confirm or add under Payment pages. Up to 200 pages are detected automatically; beyond that, ScriptLedger raises a finding, and pages you add yourself are never refused. WooCommerce's product, shop and order-received pages are not suggested, and My account › Add payment method is only suggested when a payment provider's script loads there: add any of them yourself if your assessment counts it as a payment page. ScriptLedger recognises the payment scripts of Stripe, PayPal, Square, Braintree, Adyen, Mollie, Worldpay, Authorize.net, Razorpay, Paystack and others; with any other provider, add the page yourself. A page served from a full-page cache is recorded only when WordPress renders it, so exclude payment pages from your page cache (WooCommerce already asks caches to skip its cart and checkout).

How often does it check, and when am I alerted?

A scan is scheduled once a day through Action Scheduler, and you can start one at any time with Run scan now, at most once a minute. Each scan works for about 20 seconds and carries the rest to the next. With script downloads on, a scan checks 40 to 80 scripts, so on a site with up to about 480 scripts each one is checked within about six scans; on a larger site, the scan notes in Scan history say how many daily runs a full pass takes. Every scan is logged in Scan history, including those that find nothing. Alerts go out when a scan raises a finding, or as a daily or weekly digest if you prefer; critical and high findings never wait for a digest. A header change is a medium finding, so the "Critical and high only" setting sends no header alerts. Like every WordPress scheduled task, the daily scan runs when WP-Cron runs, which depends on site traffic, so a low-traffic site should call WP-Cron from a real cron job.

What do I do when a finding is raised?

Open it under Findings and check whether you expected the change. If you did, for example after updating a plugin, acknowledge it with a note: for a changed script, ScriptLedger then accepts its new content as the baseline, and a further change raises a new finding. If you did not expect it, remove the script at its source. Every finding stays on the record, with who acknowledged it, when, and your note.

My tag manager adds scripts. Will each one raise a finding?

With the browser beacon on, a script that a tag manager or another script adds in the browser never goes through WordPress's script system, so it is listed under Browser only and the next scan raises a finding. Once you approve it with a justification, it raises no further finding of that kind. A new script WordPress prints goes to Needs review and raises no finding.

What do the confidence levels mean?

They say how strongly a script's integrity is established. High: the script tag carries a Subresource Integrity attribute, which the browser checks, and ScriptLedger holds a content hash it downloaded. Medium: ScriptLedger holds a content hash it downloaded. Low: only the URL is known, because the script could not be downloaded or hashed. Unverified: no current check, for example while script downloads are off or after the script has not been seen on a monitored page for 30 days. The evidence pack's integrity register shows the level for each script it lists.

Does it work on WordPress multisite?

Yes, site by site. Activate ScriptLedger from the Plugins screen of each site whose payment pages it should monitor; a network activation is undone with a notice, because each site keeps its own inventory, settings and evidence. Deleting the plugin cleans up each site where it was installed, following that site's own setting for keeping data.

My site serves its own files from a CDN. What do I do?

ScriptLedger names the plugin, theme or WordPress core behind a script from its path, but only when the script is served from one of your site's own hosts: a /wp-content/plugins/… path on any other host could be a lookalike, so it is recorded as external, and an earlier approval of that script goes back to review. If your site serves its own files from a CDN, tell ScriptLedger which hosts are yours with the fssl_local_hosts filter. Register it from a plugin or mu-plugin so it applies to every request, not only in wp-admin: add_filter( 'fssl_local_hosts', function ( $hosts ) { $hosts[] = 'cdn.example.com'; return $hosts; } ); When the list changes, ScriptLedger re-checks every stored script starting the next time an administrator opens wp-admin. A script that was returned to review stays pending until you review it again.

Where is my data stored, and what happens when I uninstall?

In your own WordPress database, in seven tables named {prefix}fssl_*, plus Action Scheduler's tables when no other plugin has created them. ScriptLedger sends nothing to the plugin author; see External services for the requests it can make. Script observations are kept for 6, 12 or 24 months, as set in Settings (12 by default), and the list of generated evidence packs keeps the latest 50; the scan log, the authorisation record, findings and header history are never pruned. Deactivating the plugin keeps all its data, but nothing is recorded or scanned until you activate it again. Deleting it keeps the data too, unless you turn on Delete data when the plugin is deleted in Settings. The scan log (the {prefix}fssl_scans table) is always kept, even then.

Which third-party libraries does it include?

The admin screens (Vue 3) ship compiled in assets/admin/. PHP dependencies: composer install --no-dev. Bundled libraries: Action Scheduler (GPL-3.0-or-later), of which only the newest copy loads when several are present, with its cron-expression (MIT) and WP_Async_Request (GPLv2) libraries; Vue (MIT); and Composer's autoloader (MIT).

更新日志:

1.0.0