PHPackages                             sterc/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. [Security](/categories/security)
4. /
5. sterc/csp

ActiveLibrary[Security](/categories/security)

sterc/csp
=========

MODX 3 extra to manage CSP headers

2.0.0(1y ago)15251MITPHPPHP &gt;=8.1

Since Jun 21Pushed 1y ago7 watchersCompare

[ Source](https://github.com/Sterc/csp)[ Packagist](https://packagist.org/packages/sterc/csp)[ RSS](/packages/sterc-csp/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Sterc Content Security Policy
-----------------------------

[](#sterc-content-security-policy)

The New Skeleton Structure
==========================

[](#the-new-skeleton-structure)

### Dependencies

[](#dependencies)

This package requires [mmxDatabase](https://packagist.org/packages/mmx/database) to work with MODX database using Eloquent models.

The `mmx/database` dependency will be downloaded automatically by Composer, you need only install it inside MODX.

### Prepare

[](#prepare)

This package can be installed only with Composer.

If you are still not using Composer with MODX 3, just download the `composer.json` of your version:

```
cd /to/modx/root/
wget https://raw.githubusercontent.com/modxcms/revolution/v3.0.4-pl/composer.json
```

Then run `composer update` and you are ready to install this package.

### Install

[](#install)

```
composer require sterc/csp
composer exec mmx-database install # optional, if you haven't used Eloquent for MODX 3 before
composer exec sterc-csp install
```

After installation, module appears in the menu.

There was an issue with the symlink used to link the assets/components/sterc-csp folder to its actual location inside the vendor folder. However, it all worked after sterc-scp/assets files were copied to the location inside webroot/assets/components/ folder.

```
cp -r ./webroot/core/vendor/sterc/csp/assets/* to ./webroot/assets/components/sterc-csp/
```

It appears issues is specific for MS Windows machines.

### Update

[](#update)

```
composer update mmx/forms
composer exec mmx-forms install
```

### Remove

[](#remove)

Almost the same commands but in reversed order:

```
composer exec sterc-csp remove
composer exec mmx-database remove # only if you don't want to use Eloquent for MODX 3 anymore
composer remove sterc/csp

```

Custom tables will be deleted along with all other package entities.

The Old Project Skeleton
========================

[](#the-old-project-skeleton)

The old project skeleton has a different structure with webroot and private root folders

In order to install package on older skeleton, additional change is required:

In a file: `private/core/vendor/sterc/csp/core/src/App.php`This line should be added at line 25:

```
$this->modx->services->add('mmxDatabase', new \MMX\Database\App($modx));
```

This is to load mmxDatabase, without this it is not possible to install or use CSP package.

The rest of the installation is the same as with the new skeleton.

There was an issue with frontend call and redirection:

This is a VUE application that loads in modx manager page. The url path was prefixed with /en/.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% 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

Every ~219 days

Total

3

Last Release

714d ago

Major Versions

1.0.1 → 2.0.02024-09-02

PHP version history (2 changes)1.0.0PHP &gt;=7.4

2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2332231?v=4)[Joeke Kloosterman](/maintainers/joeke)[@joeke](https://github.com/joeke)

---

Top Contributors

[![joeke](https://avatars.githubusercontent.com/u/2332231?v=4)](https://github.com/joeke "joeke (5 commits)")[![bezumkin](https://avatars.githubusercontent.com/u/1257284?v=4)](https://github.com/bezumkin "bezumkin (3 commits)")[![svrhovac](https://avatars.githubusercontent.com/u/769695?v=4)](https://github.com/svrhovac "svrhovac (1 commits)")

### Embed Badge

![Health badge](/badges/sterc-csp/health.svg)

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

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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