0 values
field values sent
No card data
The agent never sends field values, keystrokes, cookie values, storage values or request bodies. It removes query strings from URLs. The server uses the IP address for the country, then drops it.
MonSpark finds every script on your payment pages, keeps each version for your auditor, and stops the scripts, field reads and requests that you did not approve. PCI DSS v4.0 requirements 6.4.3 and 11.6.1 apply since 31 March 2025.
The risk
An attacker changes one script that your page already loads: a tag manager, a chat widget, a library from a CDN.
The changed script listens to the card number field while the customer types.
The script sends the number to a host that the attacker controls. Your server sees a normal payment.
A trusted source is not enough. A domain that thousands of sites trust can start to serve changed code. MonSpark compares the content of each script, not only its URL.
Compare
| Capability | CSP header only | Manual review | MonSpark |
|---|---|---|---|
| Inventory of every script, with a justification | – | A spreadsheet | ✓ |
| Detects a change in script content | Inline hashes only | When someone checks | ✓ |
| Detects header changes | – | When someone checks | ✓ |
| Sees what real visitors receive | Violation reports | – | ✓ |
| Blocks unapproved scripts in the browser | ✓ | – | ✓ |
| Stops other scripts from reading card fields | – | – | ✓ |
| PDF report for your assessor | – | By hand | ✓ |
PCI DSS v4.0
| Requirement | What it asks | MonSpark |
|---|---|---|
| 6.4.3Authorization | A method confirms that each payment page script is authorized. | Each script version needs an approval. The approval records who approved it and when. A new version of an approved script is unapproved until somebody approves it. |
| 6.4.3Integrity | A method assures the integrity of each script. | A SHA-256 hash for each version, compared on every scan. The page agent can pin a script to its approved hash with Subresource Integrity, so the browser refuses changed content. |
| 6.4.3Inventory | An inventory of all scripts, with a written business or technical justification for each. | The inventory lists external and inline scripts in every frame, with their versions, first and last seen times and justifications. AI drafts the justification from the code. |
| 11.6.1Change and tamper detection | A mechanism alerts personnel to unauthorized changes to security-impacting HTTP headers and script contents, as the consumer browser receives them. It runs at least once a week, or as often as your risk analysis sets. | Scans on the schedule that you set, and the page agent in real visitors' browsers. A new, changed or removed script, or a changed header, opens an incident. Escalation policies send it by email, Slack, Microsoft Teams, Discord, Telegram, webhook, SMS or phone call. |
Setup
Enter the page URL and the steps to the payment form: add to cart, log in, fill the address. A test run shows each script that the page loads. The scenario stops before the payment.
Approve the scripts from the test run, with a justification for each. This is your first inventory and the baseline for change detection.
Put one script tag first in the head of the payment page. In monitor mode it reports what real visitors load and blocks nothing. Each scan checks that the tag is there and first.
A new policy starts in dry run. MonSpark shows what it would have blocked in the last 24 hours. When the list is right, turn dry run off.
For developers
The public API gives your pipeline three calls: approve or revoke a script version, read the script inventory, and read your CSP reports.
POST /api/v3/pcidss/verify-scriptGET /api/v3/pcidss/:monitorId/script-inventoryGET /api/v3/csp/reports# Approve a script version from your pipeline
curl -X POST https://<your MonSpark host>/api/v3/pcidss/verify-script \
-H "Authorization: Bearer $MONSPARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"monitorId": "<monitor id>",
"scriptId": "<script id>",
"verified": true,
"name": "Checkout app",
"justification": "Our own checkout bundle, release 4.12"
}'# Read the script inventory of a monitor
curl https://<your MonSpark host>/api/v3/pcidss/<monitor id>/script-inventory \
-H "Authorization: Bearer $MONSPARK_API_KEY"
# Read your CSP violation reports
curl https://<your MonSpark host>/api/v3/csp/reports \
-H "Authorization: Bearer $MONSPARK_API_KEY"Inside the page agent
The page agent reports every destination, every card field read and every cookie write. In Enforce mode it blocks what the policy does not allow.
Destinations: the hosts that scripts sent requests to. A request to collect.cdn-x.top from an unknown script was blocked 3 times.
Sensitive data: reads of card and password fields by script. checkout.js may read them. Reads by app.js and by an unknown script are blocked.
Cookies and storage: the names of cookies and storage keys that scripts wrote, with the decision for each script.
Blocked: 7 actions stopped in 24 hours. A script that is not approved, a card field read and a request to a host that is not allowed.
Policy: Enforce mode is on. Scripts, network requests and sensitive field reads are blocked. Cookies and storage writes are reported.
Generated CSP: a CSP header that MonSpark builds from the approved scripts and hosts, with a report-only version to test first.
Screens from the MonSpark PCI app, with example data.
Page agent
0 values
field values sent
The agent never sends field values, keystrokes, cookie values, storage values or request bodies. It removes query strings from URLs. The server uses the IP address for the country, then drops it.
≤ 12 KB
with gzip, ≤ 3 ms start
12 KB or less with gzip. Each release must start in 3 ms or less for a returning visitor, measured on Chrome at 4x CPU slowdown. No network call blocks the page.
Fails open
the page never breaks
If a check fails, the browser function runs as usual, so the agent never breaks the page. The CSP header from your approved inventory is the layer that fails closed.
≤ 5 min
for a policy change
The hosted tag always serves the latest published policy. A change of mode reaches browsers in 5 minutes or less. That is also your off switch.
SRI
pinned or self-hosted
If your policy needs Subresource Integrity on every script, use a pinned version with its integrity value, or host the file on your own CDN.
Compatible
with code that wraps browser functions
The agent works next to error trackers and other code that wraps browser functions.
No. Scans alone give you the inventory, the approvals, change detection and the reports. The agent adds the view of real visitors and the blocking in the browser.
An iframe from another origin is outside the reach of your page's agent. That iframe is in the scope of your payment provider. The scan still records the scripts in every frame, including cross-origin frames.
Chrome by default, or Firefox. Each scan records a screenshot, a HAR file, a screen recording and the console log, if you turn them on.
Yes. MonSpark builds a CSP header from the scripts and destinations that you approved. A test scan puts the header on the page and lists the violations before you deploy it. MonSpark also collects your CSP and SRI violation reports.
Yes. The public API gives you the script inventory of a monitor and your CSP reports. Your deploy pipeline can also approve or revoke a script through it.
English and Turkish.

Book a demo
Our team shows you the scripts on your checkout today, and what 6.4.3 and 11.6.1 need from you.