Added Laravel functionality to the Enlightn Security Checker. Adds a command to check for, and optionally emails you, vulnerabilities when they affect you.
jorijn/laravel-security-checker is a Laravel package for added laravel functionality to the enlightn security checker. adds a command to check for, and optionally emails you, vulnerabilities when they affect you..
It currently has 203 GitHub stars and 1.857.938 downloads on Packagist (latest version v3.0.0).
Install it with composer require jorijn/laravel-security-checker.
Discover more Laravel packages by jorijn
or browse all Laravel packages to compare alternatives.
Last updated
This package provides an effortless way for you to check your local composer.lock against the Security Advisories Database.
It can either display the results in your console or email them to you on a scheduled basis. It uses Laravel's markdown system, so it should fit nicely in your styling.
Require this package with composer using the following command:
composer require jorijn/laravel-security-checker
If you want the package to send reports by email, you'll need to specify a recipient.
Add it to your .env file.
LCS_MAIL_TO="[email protected]"
Publish the configuration file and change it there.
php artisan vendor:publish --provider="Jorijn\LaravelSecurityChecker\ServiceProvider" --tag="config"
If you want to control on how the email is formatted you can have Laravel export the view for you using:
php artisan vendor:publish --provider="Jorijn\LaravelSecurityChecker\ServiceProvider" --tag="views"
By default, the package won't email you when there are no vulnerabilities found. You can change this setting by adding the following entry to your .env file.
LCS_NOTIFY_WITHOUT_VULNERABILITIES=true
If you want the package to send the report to a Slack channel, you will need to specify a Slack Webhook
in your .env file.
E.g.:
LCS_SLACK_WEBHOOK=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
The package exposes a new command for you:
php artisan security-check:email
You can hook it up into a regular crontab or add it into the Laravel Scheduler (app/Console/Kernel.php) like this:
protected function schedule(Schedule $schedule)
{
$schedule->command(\Jorijn\LaravelSecurityChecker\Console\SecurityMailCommand::class)
->weekly();
}
This package provides a wrapper around the Enlightn Security Checker command. You can call it using php artisan security-check:now.

If you need to translate this package into your own language you can do so by publishing the translation files:
php artisan vendor:publish --provider="Jorijn\LaravelSecurityChecker\ServiceProvider" --tag="translations"
Please consider helping out by creating a pull request with your language to help out others.