From e71c564f32fd089d75e02c365f1496dd6f40c508 Mon Sep 17 00:00:00 2001 From: "@chowmean [Gaurav Yadav]" Date: Mon, 6 Feb 2017 16:09:32 +0530 Subject: [PATCH 1/3] Added sniff for checking composer dependency vulnerabilities. --- fabpolish/contrib.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fabpolish/contrib.py b/fabpolish/contrib.py index 2c428a2..904a3cd 100644 --- a/fabpolish/contrib.py +++ b/fabpolish/contrib.py @@ -157,3 +157,11 @@ def check_preg_replace(): "! find src -name '*.php' -print0 | " "xargs -0 grep -n 'preg_replace('" ) + + +@sniff(severity='major', timing='fast') +def composer_security_check(): + info('Running security check for composer dependencies...') + return local( + "php bin/console security:check" + ) From 71208dd8d403c84f3563e44fcb44ffe5750a91cb Mon Sep 17 00:00:00 2001 From: "@chowmean [Gaurav Yadav]" Date: Tue, 7 Feb 2017 02:00:31 +0530 Subject: [PATCH 2/3] changes for various version of symfony --- fabpolish/contrib.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fabpolish/contrib.py b/fabpolish/contrib.py index 904a3cd..1f7269e 100644 --- a/fabpolish/contrib.py +++ b/fabpolish/contrib.py @@ -160,8 +160,13 @@ def check_preg_replace(): @sniff(severity='major', timing='fast') -def composer_security_check(): +def composer_security_check_symfony2(): + """Requires sensio/distribution-bundle = v3.0.* """ info('Running security check for composer dependencies...') - return local( - "php bin/console security:check" - ) + return local("php bin/console security:check") + + +@sniff(severity='major', timing='fast') +def composer_security_check_symfony3(): + info('Running security check for composer dependencies...') + return local("php app/console security:check") From 5958857a6e7eb43bdce38a3cd2f451fbc7a41267 Mon Sep 17 00:00:00 2001 From: "@chowmean [Gaurav Yadav]" Date: Tue, 7 Feb 2017 14:43:35 +0530 Subject: [PATCH 3/3] command change --- fabpolish/contrib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fabpolish/contrib.py b/fabpolish/contrib.py index 1f7269e..f6dfea5 100644 --- a/fabpolish/contrib.py +++ b/fabpolish/contrib.py @@ -163,10 +163,10 @@ def check_preg_replace(): def composer_security_check_symfony2(): """Requires sensio/distribution-bundle = v3.0.* """ info('Running security check for composer dependencies...') - return local("php bin/console security:check") + return local("php app/console security:check") @sniff(severity='major', timing='fast') def composer_security_check_symfony3(): info('Running security check for composer dependencies...') - return local("php app/console security:check") + return local("php bin/console security:check")