Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zaherg/9342314 to your computer and use it in GitHub Desktop.
Save zaherg/9342314 to your computer and use it in GitHub Desktop.

Symfony Security Checker in Laravel

Artisan command for Sensiolabs Security Checker

Require this project in your composer.json file

"sensiolabs/security-checker": "dev-master"

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