Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Scrubber Laravel Package

yorcreative/laravel-scrubber

A Laravel package that automatically scrubs sensitive data such as passwords, API keys, and PII from logs, requests, and model output, with configurable redaction rules to keep private information out of your application's records.

Deep Wiki
Context7

Technical Evaluation

Architecture fit. yorl/laravel-scrubber is a defense-in-depth control, not a data-governance platform. Architecturally it slots into the Laravel logging/exception pipeline — a service provider with auto-discovery, a publishable config file containing scrub rules, and (most likely) a Monolog processor or handler decorator that mutates log records before they hit a channel. That is the right shape for a Laravel estate: no infrastructure, no new runtime, no sidecar, no vendor contract. It fits cleanly alongside existing config/logging.php channels, exception handlers, Telescope, Horizon, and Sentry/Bugsnag SDKs, provided processor ordering is explicit. It does not solve secrets management, PII in database columns, or data leaving via analytics/queue payloads that never traverse the logger.

Integration feasibility. Low-to-moderate effort. Expect a half-day to a day per service for install, config authoring, and validation, assuming the package behaves as described. The real cost is not engineering — it is the policy work: agreeing what counts as sensitive, encoding that as patterns, and proving coverage. Budget 2–3 sprints for a multi-service rollout, of which 70% is security/policy alignment and verification, not code.

Technical risk. The dominant risk is the class of tool: regex/keyword redaction is inherently approximate. False negatives are a compliance incident; false positives silently destroy the forensic value of logs and erode developer trust until someone disables the package. Secondary risks are material for a TPM:

Risk Severity Note
Provenance uncertainty — repo is listed as unknown, metadata is inconsistent, and the "last release" date (2026-09-10) is not credible High Treat package identity and supply chain as unverified until composer show / Packagist / GitHub source are confirmed by hand
Single-maintainer abandonment Medium-High 158 stars is small; MIT license mitigates via fork, but someone must own the fork
Over-redaction breaking incident response High Must be reversible/marked, not blanked, and tested against real incident scenarios
Performance on the hot path Medium Regex-per-record cost scales with log volume and Octane worker reuse
Coverage gaps (non-Monolog egress, DB, queue payloads, third-party SDK breadcrumbs) High Package scope is almost certainly narrower than "no leaks"

Key questions (must be answered before a rollout decision):

  1. Which surfaces does it actually intercept — Monolog records, exception context/trace, request/response dumps, queue job payloads, Telescope entries, Sentry breadcrumbs? Or only one of these?
  2. Detection model: fixed regex library, configurable patterns, allow/deny lists, or entropy-based secret detection? Can we author and test custom rules?
  3. Does it support dry-run/shadow mode with metrics, so we can measure hits before enabling?
  4. Are default patterns versioned and current (JWT, AWS keys, Stripe sk_, GitHub PATs, IBAN, national IDs)?
  5. Laravel/PHP/Monolog support matrix; does it survive config:cache, and does it behave correctly under Octane's long-lived workers?
  6. Performance benchmark: added latency per 1k log lines, and memory delta under Octane.
  7. Test coverage, release cadence, maintainer responsiveness, any CVE/advisory history, and CI provenance (signed tags? reproducible builds?).
  8. Redaction output format — irreversible token, partial mask, or hash? Are we preserving enough for debugging?

Integration Approach

Stack fit. Composer-installed Laravel package, PHP 8.x, Monolog 2/3. No runtime, no infra, no egress change — it deploys with the application artifact and works identically on VMs, containers, and serverless Laravel runtimes. It is compatible in principle with structured JSON logging, which is the configuration I would mandate alongside it, because JSON + explicit redaction markers is auditable; free-text log lines are not.

Migration path. Do not treat this as a big-bang security fix.

  1. Inventory first. Enumerate every egress path for sensitive data: log channels, stdout in containers, exception trackers, APM, Telescope/Horizon storage, queue payloads, audit tables. The package will cover a subset; the inventory defines the residual risk you are accepting.
  2. Pilot on one non-critical service in staging with dry-run enabled (if supported; otherwise log-and-compare by diffing pre/post records in a replay harness).
  3. Measure true-positive rate, false-positive rate, and coverage against a seeded corpus of known-sensitive test values. This corpus is a durable asset — keep it.
  4. Enable in production on a canary instance with a rollback flag (config-driven, no redeploy), watching error rates, log pipeline health, and p99 latency.
  5. Expand service-by-service, only after the pattern library is stable.

Compatibility checks that must be explicit:

  • Processor ordering versus Sentry/Bugsnag SDK processors — a scrubber registered before the tracker's processor is useless.
  • Interaction with report()/render() overrides and custom exception handlers.
  • php artisan config:cache and optimize in the deploy pipeline (a stale or uncached config is a silent no-op).
  • Octane/Swoole worker reuse: config and compiled patterns must be resolved once, not per request.

Sequencing. Security owns the pattern taxonomy; platform owns the default config and the shared Composer constraint; application teams own per-service overrides. Land the package after the logging standard (structured JSON, no dump()/dd(), no Log::info($request->all())) and before you claim log-hygiene compliance in any customer-facing or audit context.

TPM leverage point. Ship it as part of the golden-path service template so every new service inherits it, and treat backfill as a tracked migration with a burndown. Otherwise you get 30% adoption and a false sense of coverage.

Operational Impact

Maintenance. This is a small, single-maintainer dependency — pin it to an exact version, vendor it or maintain an internal fork if the repo provenance cannot be verified, and assign a named owner. The pattern library needs a recurring review cadence (quarterly minimum, plus on every incident and every new third-party integration that introduces a credential format). A stale pattern library is the most likely cause of eventual failure, and it fails silently.

Support model. Split accountability: Security owns what is sensitive and signs off on patterns; Platform owns the shared config, the Composer constraint, and the fork-if-needed contingency; Application teams own per-service overrides and the redaction tests. Two runbooks are mandatory: "a log line shows [REDACTED] where I need the value" (break-glass, time-boxed, audited) and "a suspected leak reached a log sink" (rotate, purge, disclose, post-mortem). Without the first, engineers will disable the package; without the second, you cannot prove the control works.

Scaling. Cost scales with log volume and pattern count, on the request hot path. At high throughput, mitigate with sampling for high-volume debug channels, async/buffered handlers, and keeping pattern count bounded and pre-compiled. Watch Octane memory if the package compiles patterns per worker. The redaction marker itself becomes a cardinality concern in log search — standardize on one token.

Failure modes to design against:

  • Over-redaction destroys incident forensics; a redacted stack trace during a Sev-1 is a self-inflicted outage amplifier. Mitigate with masked-but-reversible output where policy permits and a tested break-glass path.
  • Under-redaction from unanticipated formats (base64, nested JSON strings, URL query params, multipart, headers) — the classic false negative that turns into a disclosure event.
  • Scrubber throws and takes down the logging channel → dropped logs. Fail-open on logging is usually the right call, but it must be a decision, not an accident, and it must alert.
  • Silent no-op from config caching, wrong channel, or processor ordering — the package appears installed and does nothing. Detect via a synthetic canary: log a known fake secret periodically and alert if it appears unredacted in the sink.
  • Out-of-scope egress gives false assurance: data leaving via database columns, queue payloads, third-party SDKs, or dd() in a debugging branch is untouched.

Ramp-up. A Laravel engineer can integrate in under a day; the organizational ramp is the long pole. Expect one sprint to establish the pattern taxonomy and test corpus, one to pilot and measure, and one to two to roll out across the estate. Onboard teams with a one-page standard plus the golden-path template, not a wiki.

Success metrics to report upward: percentage of production services instrumented with a verified (not just installed) config; canary-detection pass rate; redaction false-positive rate sampled monthly; count of confirmed sensitive-data-in-logs incidents (target: zero, trending); p99 request latency delta; and time-to-patch for the dependency. Frame this to stakeholders as risk reduction on a known control gap, not as compliance certification — the package reduces accidental leakage; it does not make the estate compliant, and it is not a substitute for secrets management, data classification, or log retention policy.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox