This project is not covered by Drupal’s security advisory policy.
Commerce Payment Page Integrity will help Drupal Commerce stores meet PCI DSS 4.0.1 requirements 6.4.3 and 11.6.1: an inventory of every script on the payment pages, each one justified and authorized, a Content-Security-Policy built from that inventory, and alerts when a script or a security header changes.
Status: No release yet. The module is under active development; the first beta follows once its automated test suite and an independent review pass.
This module is developed with AI assistance. The maintainer reviews and tests every release before publishing it.
Planned for 1.0
Both requirements have applied since 31 March 2025. Merchants who validate with SAQ A-EP or SAQ D must meet them in full; merchants on SAQ A instead confirm that their site is not susceptible to attacks from scripts. Your assessor decides what counts as compliant. None of this is released yet. The first release will cover the checkout payment and review steps, and any other route you mark as a payment page, with:
Script inventory (6.4.3)
- Every script loaded on payment pages, both Drupal libraries and external scripts, recorded with its source, a hash, and the dates it was first and last seen.
- A written justification for each script, and an authorization by a user with a dedicated permission.
Enforcement
- A Content-Security-Policy for payment pages only, built from the authorized inventory with nonces or hashes and
strict-dynamicwhere possible: report-only first, then enforced. - Subresource Integrity on external scripts, where the source supports it.
- Unauthorized scripts blocked, or reported while the policy is in report-only mode.
- When the Content-Security-Policy module is installed, the module works with it rather than against it.
Change and tamper detection (11.6.1)
- A CSP violation report endpoint that is rate-limited, size-capped and safe to expose to anonymous visitors.
- Detection of changed hashes and new scripts.
- A scheduled check, at least weekly and configurable, that compares the scripts and HTTP security headers of the rendered payment pages with the authorized baseline, and alerts by email and in the log.
Evidence for assessors
- An export in CSV or JSON: the inventory, authorizations with who gave them and when, the change history and the alerts.
Requirements
Planned for the first release:
- Drupal 11.3 or later. Drupal 12 needs a Drupal Commerce release that supports it; Commerce 3.3 supports Drupal 10.3 and 11.
- PHP 8.3 or later.
- Drupal Commerce 3, with its Checkout and Payment modules, for the checkout steps covered by default.
- Optional: Content-Security-Policy.
Installation
Installation instructions arrive with the first release. For the first beta, the commands will be:
composer require 'drupal/commerce_payment_page_integrity:^1.0@beta' drush en commerce_payment_page_integrity
Configuration and permissions
Not final yet. This section will list each settings page and each permission, by its real label, with the first release.
Authorizing a script will need its own permission, so that the people who approve payment-page scripts can be limited to a chosen role.
Similar projects
Checked on drupal.org in November 2026.
- Content-Security-Policy builds a site-wide policy, with hashes, nonces and violation reporting. Choose it for a site-wide CSP. It keeps no script inventory, justifications or authorizations; this module is planned to work alongside it.
- Security Kit sets security headers site-wide, a Content-Security-Policy among them.
- SubResourceIntegrity let developers set
integrityattributes in library definitions. It has only a 2020 development release, for Drupal 8. - Script Manager places script snippets on pages under visibility conditions. It is a way to add scripts, not an inventory of them.
- Commercial client-side security services monitor payment pages from outside the site. Choose one if you want the monitoring run by a third party.
Support and maintenance
Report bugs, ask for features and comment on the planned scope in the issue queue. Each release will have notes describing what changed.
This project is not covered by Drupal's security advisory policy. Until it is, security issues are handled in the public issue queue and fixed in ordinary releases.
A read-only mirror is on GitHub at DanePete/drupal-commerce-payment-page-integrity. It will mirror the drupal.org repository once code is published there; development and issues stay on drupal.org.
Maintainer
Created and maintained by deadnorth (Dead North).
Project information
- Project categories: E-commerce, Security
- Ecosystem: Commerce Core
- Created by deadnorth on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
