The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Laravel Security Checker

jorijn/laravel-security-checker image

Laravel Security Checker stats

Downloads
1.3M
Stars
193
Open Issues
2
Forks
26

View on GitHub →

Added Laravel functionality to the Enlightn Security Checker. Adds a command to check for, and optionally emails you, vulnerabilities when they affect you.

Laravel Security Checker

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.

Screenshot

screenshot-email

Installation

Require this package with composer using the following command:

composer require jorijn/laravel-security-checker

Configuration

Email

If you want the package to send reports by email, you'll need to specify a recipient.

Option 1

Add it to your .env file.

LCS_MAIL_TO="someone@example.net"
Option 2

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

Slack

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

Scheduling

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();
}

Running as a command

This package provides a wrapper around the Enlightn Security Checker command. You can call it using php artisan security-check:now.

Translations

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.

Jorijn photo

DevOps 🙋‍♂️who cares about creating qualitative, reusable and testable code by using design patterns and adhering to the SOLID principles.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Jorijn Laravel Security Checker Related Articles

Our top 10 Laravel Tutorials of 2021 image

Our top 10 Laravel Tutorials of 2021

Read article
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing