Skip to content

Instantly share code, notes, and snippets.

@torifat
Forked from barryvdh/laravel-security-checker.md
Last active August 29, 2015 14:12
Show Gist options
  • Save torifat/92fe6c725bc75419e6fd to your computer and use it in GitHub Desktop.
Save torifat/92fe6c725bc75419e6fd 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": "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