PHPackages                             brocode/module-scoped-csp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brocode/module-scoped-csp

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

brocode/module-scoped-csp
=========================

CSP extension module to provided store scopes for CSP settings in Magento 2

1.0.0(1y ago)06131MITPHP

Since Dec 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/brosenberger/module-scoped-csp)[ Packagist](https://packagist.org/packages/brocode/module-scoped-csp)[ Fund](https://www.buymeacoffee.com/brosenberger)[ RSS](/packages/brocode-module-scoped-csp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Magento 2 Scoped CSP
====================

[](#magento-2-scoped-csp)

This module provides an additional configuration possibility for CSP whitelists with scope definition (website, store or storeview).

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/brosenberger)

Installation
------------

[](#installation)

```
composer require brocode/module-scoped-csp
bin/magento setup:upgrade

```

The module should be enabled by default and does not need separate enabling.

Configuration
-------------

[](#configuration)

Add a `scoped_csp_whitelist.xml` into your etc-folder containing all needed policies.

**Sample `scoped_csp_whitelist.xml`**:

```

                    https://brocode.at
                    https://other.brocode.at

```

If no scope type is given, the policy is applied to all scopes (so basically the same behavior as the default csp\_whitelist.xml).

If a scope type other then `default` is given, a scope code must be set as well.

TODOs
-----

[](#todos)

- use XSD schema extension instead of XSD copy and extend of original csp\_whitelist.xsd

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance40

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

508d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9453d161c28a18e817351e00d7ebe81ada31842a249ffb3389830b3483584e60?d=identicon)[brosenberger](/maintainers/brosenberger)

---

Top Contributors

[![rosenberger-e-conomix](https://avatars.githubusercontent.com/u/47806105?v=4)](https://github.com/rosenberger-e-conomix "rosenberger-e-conomix (4 commits)")

---

Tags

cspmagento2magento2-modulemagentocomposer-installer

### Embed Badge

![Health badge](/badges/brocode-module-scoped-csp/health.svg)

```
[![Health](https://phpackages.com/badges/brocode-module-scoped-csp/health.svg)](https://phpackages.com/packages/brocode-module-scoped-csp)
```

###  Alternatives

[magento/magento-composer-installer

Composer installer for Magento modules

7523.3M318](/packages/magento-magento-composer-installer)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[magento-hackathon/magento-composer-installer

Composer installer for Magento modules

214757.6k374](/packages/magento-hackathon-magento-composer-installer)[yireo/magento2-googletagmanager2

Add Google Tag Manager to Magento

167930.4k5](/packages/yireo-magento2-googletagmanager2)[yireo/magento2-extensionchecker

Scan the code of a Magento module

96151.6k3](/packages/yireo-magento2-extensionchecker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
