PHPackages                             mohamedmohamedhekal/payloadmask - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mohamedmohamedhekal/payloadmask

Abandoned → [mohamedhekal/payloadmask](/?search=mohamedhekal%2Fpayloadmask)Library[Logging &amp; Monitoring](/categories/logging)

mohamedmohamedhekal/payloadmask
===============================

Recursive redaction of secrets and PII for Laravel logs, audits, and webhook payloads

v0.1.0(1mo ago)00MITPHPPHP ^8.2CI passing

Since Jul 16Pushed 1mo agoCompare

[ Source](https://github.com/mohamedhekal/payloadmask)[ Packagist](https://packagist.org/packages/mohamedmohamedhekal/payloadmask)[ Docs](https://github.com/mohamedhekal/payloadmask)[ RSS](/packages/mohamedmohamedhekal-payloadmask/feed)WikiDiscussions main Synced 1w ago

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

PayloadMask
===========

[](#payloadmask)

[![CI](https://github.com/mohamedhekal/payloadmask/actions/workflows/tests.yml/badge.svg)](https://github.com/mohamedhekal/payloadmask/actions)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP](https://camo.githubusercontent.com/c2588b5670f2c910b8cc849ace22a22efda8956b7c2f797d11d2096bbfc7b1f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242342e737667)](https://www.php.net/)[![Laravel](https://camo.githubusercontent.com/b38aa2ff655206bfa9f97c1aeced06f25bb3e31fb085fa974c79934c25469f41/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d313125324631322d4646324432302e737667)](https://laravel.com/)

**Search terms:** laravel, redaction, pii, logging, security, gdpr, pci, php, laravel-package, secrets, masking, privacy.

Recursive redaction of secrets and PII for Laravel logs, audits, and webhook payloads.

Problem
-------

[](#problem)

Card numbers, passwords, and tokens leak into logs and stored webhook bodies. Manual `Arr::except` does not scale across nested payloads.

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

[](#installation)

```
composer require mohamedhekal/payloadmask
php artisan vendor:publish --tag=payloadmask-config
```

Quick start
-----------

[](#quick-start)

```
use Hekal\PayloadMask\Facades\PayloadMask;

$safe = PayloadMask::mask([
    'user' => ['email' => 'a@b.com', 'password' => 'secret'],
    'authorization' => 'Bearer abc.def',
]);
```

When `payloadmask.logging.enabled` is true, a Monolog processor redacts context/extra/message on the default logger.

Features
--------

[](#features)

- Key-based redaction (case-insensitive)
- Dot-path redaction
- Regex value patterns
- Presets: `auth`, `pci`
- Max depth guard
- Facade + Monolog processor

Testing
-------

[](#testing)

```
composer install
composer test
```

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9d7c092a109fe780c7efd87ce4142eae2c0cec0f92fd1e87e769bec5661953b?d=identicon)[mohamedhekal](/maintainers/mohamedhekal)

---

Top Contributors

[![mohamedhekal](https://avatars.githubusercontent.com/u/21014387?v=4)](https://github.com/mohamedhekal "mohamedhekal (4 commits)")

---

Tags

gdprlaravellaravel-packageloggingphppiisecurityphplaravelloggingsecuritylaravel-packagesecretsredactiongdprprivacypiiMaskingpci

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mohamedmohamedhekal-payloadmask/health.svg)

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

###  Alternatives

[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.4k137.4M246](/packages/sentry-sentry-laravel)[spatie/laravel-flare

Send Laravel errors to Flare

131.8M8](/packages/spatie-laravel-flare)

PHPackages © 2026

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