Cluster 11 · PCI DSS 6.4.3 · Braintree · Versioned SRI + CSP

Braintree Drop-in & Hosted Fields PCI DSS 4.0.1: Versioned SRI Hashes & Exact CSP

Lock down Braintree Web SDK and Drop-in UI under PCI DSS v4.0.1 Req. 6.4.3: pin exact SDK versions with SHA-384 SRI, configure payments.braintree-api.com CSP, and audit PayPal/Venmo sub-scripts.

Zero Telemetry · Strict CSP (connect-src 'none') · WebCrypto

Checkout HTML & CSP Header Linter

PCI DSS v4.0.1 Req. 6.4.3 & 11.6.1
Compliance Note: Automated engineering & preparation guidance for PCI DSS v4.0.1 Req. 6.4.3 & 11.6.1 — verify final SAQ/ROC scope with your QSA or acquiring bank.
PCI DSS 6.4.3 & 11.6.1 Readiness Score
85 / 100 (B)
AUDIT RISK — FIX SCRIPT & CSP GAPS
External Scripts
2
Missing SRI/Pin
0
Evergreen PSPs
1
CSP Header
STRICT
Extracted Payment Page Script Inventory
Script / Block Category Status Required Control (SRI vs CSP/Nonce)
https://js.braintreegateway.com/web/dropin/1.43.0/js/dropin.min.js Evergreen PSP (Braintree Web / Drop-in) ERROR
Static integrity= on evergreen PSP loader will break checkout when PSP deploys updates.
/assets/braintree-mount.js First-Party Script ('self') PASS
Covered by first-party origin / nonce policy.
PCI-643-PSP-SRI: Static SRI attached to 1 evergreen PSP loader(s) ERROR
Stripe.js v3, PayPal SDK, and Paddle CDN rotate bytes dynamically. Remove integrity= from evergreen PSP loaders and authorize them via strict CSP + nonce + Req. 6.4.3 written justification.
PCI-1161-REPORT-OK: CSP violation reporting directive present PASS
Supports continuous script-injection anomaly telemetry.
PCI-CSP-ALLOW-OK: All extracted HTML <script> origins match strict CSP script-src PASS
Zero unauthorized or unallowlisted script hosts.
Generated Strict Checkout CSP Template
default-src 'self'; script-src 'self' 'nonce-REPLACE_PER_REQUEST' https://js.braintreegateway.com; style-src 'self'; img-src 'self' data: https:; connect-src 'self' https://payments.braintree-api.com https://client-analytics.braintreegateway.com; frame-src 'self' https://assets.braintreegateway.com; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'self'; report-uri https://billing.example.com/__csp-report
PCI DSS v4.0.1 Req. 6.4.3 Script Justification Matrix (CSV)
"Merchant Origin","Script Location / Tag","Category","Authorization Status","Required Control (SRI vs CSP/Nonce)","Current Integrity / Nonce","Business Justification (PCI DSS v4.0.1 Req 6.4.3)","Req 11.6.1 Monitoring Cadence"
"billing.example.com","https://js.braintreegateway.com/web/dropin/1.43.0/js/dropin.min.js","Evergreen PSP (Braintree Web / Drop-in)","Action Required","Strict CSP script-src host + 'nonce-...' + Req. 6.4.3 justification (Do NOT add static SRI)","sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC","Braintree Hosted Fields / Drop-in loader. Use exact versioned path (when pinned with SRI) or CSP host + nonce if unpinned loader, and track in Req. 6.4.3 inventory.","Automated weekly or continuous HTTP header + script hash check via CheckoutShield PCI (https://pci.runglab.dev)"
"billing.example.com","/assets/braintree-mount.js","First-Party Script ('self')","Authorized","CSP 'self' / 'nonce-...' (add SRI if served via CDN)","nonce=btN0nce88","First-party application checkout bundle hosted on merchant origin.","Automated weekly or continuous HTTP header + script hash check via CheckoutShield PCI (https://pci.runglab.dev)"
CheckoutShield PCI · Live Audit $49 PCI Compliance Pack

Monitor Live Checkout Scripts & Ship QSA-Ready Req. 6.4.3 + 11.6.1 Evidence

Need automated HTTP header + script tampering alerts (PCI DSS v4.0.1 Req. 11.6.1) or a tailored CSP, nonce middleware & script justification bundle? Run a free live scan on CheckoutShield PCI (https://pci.runglab.dev), order the $49 CheckoutShield PCI Pack via Creem, or request a PayPal invoice via [email protected].

Platform PCI DSS v4.0.1 Specifications & Controls

Control / Origin Hardened Pattern Req. 6.4.3 & 11.6.1 Rationale
Versioned Braintree SDK js.braintreegateway.com/web/dropin/1.43.0/js/dropin.min.js Versioned CDN paths allow SHA-384 SRI — compute exact hash via our SRI Generator
CSP script-src js.braintreegateway.com assets.braintreegateway.com Add www.paypal.com & www.paypalobjects.com if PayPal button is enabled in Drop-in
CSP connect-src payments.braintree-api.com client-analytics.braintreegateway.com Required for client token exchange, GraphQL tokenization, and fraud telemetry
CSP frame-src assets.braintreegateway.com Hosts Braintree Hosted Fields and 3DS iframes

Braintree Drop-in Pinned Script Tag + Strict Checkout CSP

braintree-pci-setup.html
<!-- 1. Pin exact versioned Braintree Drop-in URL and attach computed SHA-384 SRI -->
<script
  src="https://js.braintreegateway.com/web/dropin/1.43.0/js/dropin.min.js"
  integrity="sha384-COMPUTE_EXACT_SHA384_IN_SRI_TAB"
  crossorigin="anonymous"></script>

<!-- 2. Recommended Content-Security-Policy header (add PayPal hosts if enabled) -->
<!-- Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-REPLACE' https://js.braintreegateway.com https://assets.braintreegateway.com; connect-src 'self' https://payments.braintree-api.com https://client-analytics.braintreegateway.com; frame-src 'self' https://assets.braintreegateway.com; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; report-uri /__csp-report -->

Braintree Req. 6.4.3 Script Inventory Justification Notes

braintree-inventory.md
- **Braintree Drop-in SDK (pinned v1.43.0)**: Verified via SHA-384 SRI + `crossorigin="anonymous"` + explicit CSP `script-src`.
- **Braintree Hosted Fields Iframes**: Isolated inside `assets.braintreegateway.com` iframe boundary (`frame-src`).
- **Req. 11.6.1 Cadence**: Automated CheckoutShield PCI scan every 7 days + CSP `report-uri` alerting.

Step-by-Step Hardening & Key Insights

  1. Pin an explicit Braintree Web / Drop-in version (never use floating major-only paths without verification).
  2. Download the exact versioned dropin.min.js file and compute its SHA-384 SRI hash in our SRI Generator tab.
  3. Lock CSP script-src, connect-src, and frame-src to Braintree's exact domains (plus PayPal/Apple Pay if enabled).
  4. Export the Req. 6.4.3 CSV Justification Matrix and enable Req. 11.6.1 monitoring.
  • Unlike Stripe.js v3's unversioned evergreen loader, Braintree publishes immutable versioned paths (/web/dropin/1.43.0/...) that pair cleanly with SHA-384 SRI.
  • If you enable PayPal inside Braintree Drop-in, Braintree dynamically loads www.paypal.com/sdk/js — which MUST be allowed in CSP script-src/frame-src without static SRI.
  • Bundling braintree-web via npm into your own versioned bundle also moves script delivery onto 'self' where your CSP nonce/hash protects it.

Common Checkout Audit Pitfalls to Avoid

  • Enabling PayPal/Venmo/3DS2 in Drop-in without adding PayPal's domains to CSP, breaking payment buttons in production.
  • Using Braintree CDN scripts without crossorigin="anonymous" alongside integrity= (browsers reject SRI without CORS headers!).
  • Forgetting sandbox vs production host differences when promoting CSP rules from staging.

More PCI DSS v4.0.1 & SRI Checkout Guides

← Back to PCI & SRI Checker Hub · Cluster 4: Security Headers & CSP → · Cluster 7B: Stripe/Creem Webhook HMAC → · CheckoutShield PCI Live Scan → · $49 PCI Compliance Pack →

Frequently Asked Questions

Can I use SRI integrity="sha384-..." with Braintree Drop-in?

Yes, when using Braintree's exact SemVer-pinned CDN path (e.g., .../web/dropin/1.43.0/js/dropin.min.js) and crossorigin="anonymous". Always verify hashes against the exact served file in our SRI Generator.

What if Braintree loads PayPal SDK dynamically?

Add https://www.paypal.com and https://www.paypalobjects.com to your CSP script-src, connect-src, and frame-src directives — do not attach static SRI to PayPal's evergreen SDK.

How do I document Braintree scripts for my QSA?

Paste your checkout HTML and CSP header into the Checkout Linter above and download the Req. 6.4.3 CSV Justification Matrix.