Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wotta/e209b990790ed59ea736c687f34f3f49 to your computer and use it in GitHub Desktop.
Save wotta/e209b990790ed59ea736c687f34f3f49 to your computer and use it in GitHub Desktop.
Symfony Security Checker in Laravel

Symfony Security Checker in Laravel

Artisan command for Sensiolabs Security Checker

Require this project in your composer.json file

"sensiolabs/security-checker": "2.x"

Add the following line to app/start/artisan.php:

Artisan::add(new SensioLabs\Security\Command\SecurityCheckerCommand(new SensioLabs\Security\SecurityChecker));

You can now run the security checker with artisan:

php artisan security:check

This defaults to the composer.lock file in your base dir, but you can add an extra argument with the full path to check

php artisan security:check /path/to/composer.lock

You can also output the result as json instead of text

php artisan security:check --format=json

[Official Documentation] https://github.com/sensiolabs/security-checker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment