From f898772c5ce0cb42c9527564013c9b207ebb60f4 Mon Sep 17 00:00:00 2001 From: Larry Laski Date: Mon, 10 Sep 2018 23:21:08 -0400 Subject: [PATCH] Added security checker command --- README.md | 1 + src/Preset.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 7200679..e4dc5e8 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ _Inspired by [Adam Wathan](https://github.com/adamwathan/laravel-preset) among o - Adds [barryvdh/laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) for debugging - Adds [codedungeon/phpunit-result-printer](https://github.com/mikeerickson/phpunit-pretty-result-printer) for nicer console output when running phpunit tests - Adds [jtant/laravel-env-sync](https://github.com/JulienTant/Laravel-Env-Sync) along with githooks for pre-push and post-checkout to keep your env file in sync. [Credit to the great article by Caleb Porzio](https://tighten.co/blog/dot-env-files-the-silent-killer) +- Adds [sensiolabs/security-checker](https://github.com/sensiolabs/security-checker) to check for package dependencies with security vunerabilites. Run with `composer run-script security-check`. - Sets up a `Models` folder within your `app` directory and moves the default `User.php` class there (also updates all references from `App\User` to `App\Models\User`) - Adds some testing helpers & speed improvements + Adds `assertContains`, `assertNotContains` and `assertEquals` assertion methods for Eloquent Collections diff --git a/src/Preset.php b/src/Preset.php index 4a65f7d..520258d 100644 --- a/src/Preset.php +++ b/src/Preset.php @@ -148,6 +148,7 @@ protected static function updateComposerDevPackageArray(array $packages) return array_merge([ 'barryvdh/laravel-debugbar' => '~3.2', 'codedungeon/phpunit-result-printer' => '~0.19', + 'sensiolabs/security-checker' => "^4.1", ], Arr::except($packages, [ ])); } @@ -158,6 +159,9 @@ protected static function updateComposerScriptsArray(array $scripts) 'post-install-cmd' => [ "@php artisan env:check", ], + 'check-security' => [ + "vendor/bin/security-checker security:check", + ], ]); }