Weave Code
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 Flare Scrubber Laravel Package

johnwilhite/laravel-flare-scrubber

Laravel service provider to scrub sensitive request data before reporting errors to Flare. Recursively sanitizes matching keys or values via exact keys, key regex, or value regex, with configurable replacement text (default SANITIZED).

View on GitHub
Deep Wiki
Context7

This is handled natively by Flare now

https://flareapp.io/blog/18-how-to-censor-sensitive-information-in-requests-to-flare

Though this package will recursively search requests for keys, which may be an improvement depending on the usecase.


Request Data Scrubber for Laravel Flare Reporting

Flare doesn't seem to provide any documentation on scrubbing sensitive data from requests before sending over errors. This package is a simple service provider that allows a config to define what data should be sanitized.

Installation

composer require johnwilhite/laravel-flare-scrubber

Usage

If you don't already have one, create a config/flare.php file and define a sensitive_data array.

<?php

return [
    'sensitive_data' => [
        'keys' => [
            'ssn',
            'bank_routing_number',
            'credit_card_number'
        ],
        'key_regex' => [
            '/^ssn/'
        ],
        'value_regex' => [
            '/^\d{3}-?\d{2}-?\d{4}$/'
        ]
    ]
];

Before sending your data to flare, this provider will recursively search the request data and sanitize the values of any match. Key matches can apply to entire arrays as well. There are 3 options that can be used optionally and interchangeably:

  • keys An exact match to the key name.

  • key_regex A regex pattern to match a key.

  • value_regex A regex pattern to match a value.

Additionally, you may define the sanitized value text at flare.sensitive_data.sanitization_text. The default is ***SANITIZED***.

License

MIT

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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope