PHPackages                             sansec/magento2-module-shield - 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. sansec/magento2-module-shield

ActiveMagento2-module[Security](/categories/security)

sansec/magento2-module-shield
=============================

1.0.21(3mo ago)14111.8k—3.3%4MITPHPPHP &gt;=7.2CI passing

Since Feb 7Pushed 3mo ago8 watchersCompare

[ Source](https://github.com/sansecio/magento2-module-shield)[ Packagist](https://packagist.org/packages/sansec/magento2-module-shield)[ RSS](/packages/sansec-magento2-module-shield/feed)WikiDiscussions main Synced 1mo ago

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

Sansec Shield
=============

[](#sansec-shield)

Requires Magento 2.3+, PHP 7.2+ and an [eComscan account](https://sansec.io/pricing) (Advanced or up).

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

[](#installation)

```
composer require sansec/magento2-module-shield
bin/magento setup:upgrade
bin/magento config:set sansec_shield/general/license_key
bin/magento sansec:shield:sync-rules
```

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

[](#configuration)

You can configure your license key and other settings via System → Configuration → Security → Sansec Shield.

Testing &amp; live reports
--------------------------

[](#testing--live-reports)

Test it by visiting your store and add `?SANSEC-SHIELD-TEST` to your URL, it should give you "permission denied". You'll see your first blocked attack appear instantly on your [Shield Dashboard](https://dashboard.sansec.io/d/account/shield). If you do not want reports, you can disable it with:

```
bin/magento config:set sansec_shield/general/report_enabled 0
```

You can always view detailed logs in `var/log/sansec_shield.log`.

See for FAQs [our Shield guide](https://sansec.io/shield).

Cron
----

[](#cron)

Shield rules update automatically through the standard Magento cron mechanism. If you are running a standard cron setup (`bin/magento cron:run`), no further action is required.

If you only run specific cron groups (`bin/magento cron:run --group `), make sure to include a cron for the `sansec` group as well.

You can verify Shield rules sync every 5 minutes in `var/log/sansec_shield.log`.

Upgrading
---------

[](#upgrading)

The Sansec Shield module is deliberately kept stable and there is no need to monitor for updates. If an essential new version is released, we will notify you via email.

To check your current version:

```
composer show sansec/magento2-module-shield
```

To upgrade to the latest version:

```
composer require sansec/magento2-module-shield:^1.0
bin/magento setup:upgrade
```

License
-------

[](#license)

Sansec Shield is published under the liberal [MIT license](./LICENSE).

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance82

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.5% 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 ~9 days

Recently: every ~37 days

Total

42

Last Release

95d ago

Major Versions

0.1.19 → 1.0.02025-03-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/743661?v=4)[Daniel Sloof](/maintainers/danslo)[@danslo](https://github.com/danslo)

---

Top Contributors

[![danslo](https://avatars.githubusercontent.com/u/743661?v=4)](https://github.com/danslo "danslo (164 commits)")[![gwillem](https://avatars.githubusercontent.com/u/1145479?v=4)](https://github.com/gwillem "gwillem (20 commits)")[![SKevo18](https://avatars.githubusercontent.com/u/39010496?v=4)](https://github.com/SKevo18 "SKevo18 (7 commits)")[![convenient](https://avatars.githubusercontent.com/u/600190?v=4)](https://github.com/convenient "convenient (2 commits)")[![SamJUK](https://avatars.githubusercontent.com/u/7872420?v=4)](https://github.com/SamJUK "SamJUK (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sansec-magento2-module-shield/health.svg)

```
[![Health](https://phpackages.com/badges/sansec-magento2-module-shield/health.svg)](https://phpackages.com/packages/sansec-magento2-module-shield)
```

###  Alternatives

[veriteworks/cookiefix

Magento2 extension for Cookie SameSite attribute.

65455.3k1](/packages/veriteworks-cookiefix)[imi/magento2-friendly-captcha

Friendly Captcha integration for Magento2

18116.2k](/packages/imi-magento2-friendly-captcha)[basecom/magento2-csp-split-header

Magento 2 module to split oversized CSP headers into multiple headers.

5256.6k](/packages/basecom-magento2-csp-split-header)[pixelopen/magento-cloudflare-turnstile

Protect your store from spam messages and spam user accounts with Cloudflare Turnstile

5325.4k1](/packages/pixelopen-magento-cloudflare-turnstile)[yireo/magento2-csp-whitelist-inline-js

Magento module to automatically add inline JS script to CSP whitelist

2974.7k](/packages/yireo-magento2-csp-whitelist-inline-js)

PHPackages © 2026

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