juststeveking/masking-engine
A Laravel/PHP masking engine for obscuring sensitive data such as emails, names, and phone numbers. Apply configurable mask strategies to protect PII in logs, exports, and API responses through a simple, extensible API.
str_replace calls, per-seeder scripts, and that one Helpers.php nobody owns." Frame the comparison against ~200–500 lines of bespoke, untested regex, with an owner and a maintenance cost.0.0.1 library is not worth its own political capital, but it's a credible enabler.users, orders, events). Do not let a working demo imply any of these are solved. At 0.0.1 with an empty changelog, this must never be framed as a compliance control of record.Adopt (bounded, behind an internal interface) when:
Masker interface, a config-driven column map). This is the deciding criterion: it converts abandonment risk from an application-wide refactor into a one-file swap.Look elsewhere, or wait, when:
0.0.1 is what happens to unrecognised, null, or malformed input. Silent pass-through disqualifies it from any production PII path.0.1.x/1.0 when changelogs, docs, and visible tests exist.Gating questions before any commit: failure mode on unknown input; deterministic vs. random masks; whether any shipped strategy is reversible; PHP/illuminate/* constraint ranges against our lowest-supported versions; whether dev-only packages (e.g. Faker) sit in require; test coverage; and whether the maintainer responds to issues and PRs.
Executives (30 seconds). We're tracking a small open-source PHP library that masks sensitive fields — emails, phone numbers, names, IDs — so staging, demo, and QA environments stop carrying real customer data. Cost to try is low; the risk of not solving it is recurring, because every staging dump today goes through a manual, unreviewed redaction step. It's a very early release (0.0.1, October 2024, one maintainer, no changelog), so the recommendation is a bounded pilot in non-production tooling — no production dependency, no compliance claim, no procurement, no new vendor. We are explicitly buying optionality, not a control.
Engineering leads. This is a candidate replacement for the homegrown redaction helpers we maintain per project. Proposal is a 1–2 day discovery spike plus a two-stage pilot: (1) seeders and fixtures behind an internal Masker interface, with success criteria agreed up front — proportion of seeder files free of raw PII, zero production traffic touched, existing tests green, no downstream breakage from masked formats; (2) log scrubbing in one non-critical service, measuring log cardinality impact and running a false-negative spot check against a labelled synthetic corpus. Pin to an exact version, record it in the dependency register, and add contract tests for output shape, fail-closed behaviour, and determinism so an upstream change fails our CI rather than silently weakening masks. Note the trap: a single composer require makes premature adoption likely, so gate deliberately.
The ask. Approve the timeboxed evaluation only. Defer build-vs-buy until we have pilot results and the package has shipped at least one documented, non-trivial release; if it hasn't, keep the interface and substitute an in-house implementation at a cost of one sprint either way. Written non-goals for the next two quarters: no production PII path, no compliance claim, no irreversible de-identification, nothing depending on cross-table referential integrity. Frame this throughout as a component of a masking process, never the process itself — the audit narrative must describe our controls, field inventory, and tests, with the library as a replaceable implementation detail.
How can I help you explore Laravel packages today?