Laravel Scrubber is a fantastic Laravel package to scrub sensitive information that breaks operational security policies from being leaked on accident or not by developers. Installation install the package via composer: composer require yorcreative/laravel-scrubber

'secret_manager' => [ 'key' => '44mfXzhGl4IiILZ844mfXzhGl4IiILZ8', // key for cipher to use 'cipher' => 'AES-256-CBC', 'enabled' => false, // Do you want this enabled?? 'providers' => [ 'gitlab' => [ 'enabled' => false, 'project_id' => env('GITLAB_PROJECT_ID', 'change_me'), 'token' => env('GITLAB_TOKEN', 'change_me'), 'host' => 'https://gitlab.com', 'keys' => ['*'], // * will grab all the secrets, if you want specific variables // define the keys in an array ], ], ], ]; Usage

Scrubber::processMessage([ 'context' => 'accidental', 'leak_of' => [ 'jwt' => ' ' ]]); // [ // "context" => "accidental" // "leak_of" => [ // "jwt" => "**redacted**" // ] // ]; Scrubber::processMessage(' '); // **redacted**
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners