From 7473e614dd006a3ac8430d448ee8c799202ca30d Mon Sep 17 00:00:00 2001 From: Kevin Wenger Date: Wed, 12 Jul 2023 10:51:10 +0200 Subject: [PATCH] update symfony checker to use new symfonycorp/security-checker-action --- .github/workflows/code-styles.yml | 18 ++++++++---------- CHANGELOG.md | 1 + CONTRIBUTING.md | 9 --------- bin/post-commit | 3 --- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/code-styles.yml b/.github/workflows/code-styles.yml index 03af90f..ccaf7f3 100644 --- a/.github/workflows/code-styles.yml +++ b/.github/workflows/code-styles.yml @@ -12,7 +12,7 @@ jobs: php-version: '8.0' extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv tools: php-cs-fixer, cs2pr - - uses: actions/checkout@master + - uses: actions/checkout@v2 - run: composer install --prefer-dist - run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr @@ -25,7 +25,7 @@ jobs: with: php-version: '8.1' extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv - - uses: actions/checkout@master + - uses: actions/checkout@v2 - run: composer install --prefer-dist - run: ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests @@ -38,7 +38,7 @@ jobs: with: php-version: '8.1' extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv - - uses: actions/checkout@master + - uses: actions/checkout@v2 - run: composer install --prefer-dist - run: ./vendor/bin/phpcpd ./ --suffix .php --suffix .inc --suffix .test --exclude vendor --exclude bin --exclude tests @@ -52,7 +52,7 @@ jobs: php-version: '8.1' extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv tools: phpstan, cs2pr - - uses: actions/checkout@master + - uses: actions/checkout@v2 - run: composer install --prefer-dist - run: ./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle | cs2pr @@ -65,7 +65,7 @@ jobs: with: php-version: '8.1' extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv - - uses: actions/checkout@master + - uses: actions/checkout@v2 - run: composer install --prefer-dist - run: ./vendor/bin/psalm --output-format=github @@ -76,9 +76,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' - extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv - tools: php-cs-fixer, cs2pr - - uses: actions/checkout@master + tools: composer:v2 + - uses: actions/checkout@v2 - run: composer install --prefer-dist - - run: ./vendor/bin/security-checker security:check ./composer.lock + - uses: symfonycorp/security-checker-action@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index e7f3103..7766e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - update changelog following 'keep a changelog' format - run code-styles Github Actions on PHP 8.1 +- update symfony checker to use new symfonycorp/security-checker-action ### Added - add run of tests on Github Actions diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95db0d1..61ff265 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,15 +37,6 @@ It can modernize your code (like converting the pow function to the ** operator ./vendor/bin/phpstan analyse ./ --error-format=checkstyle ``` -### Asserts Security Vulnerabilities - -The [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker) is a command line tool that checks -if the application uses dependencies with known security vulnerabilitie. - -```bash -./vendor/bin/security-checker security:check ./composer.lock -``` - ### Improve global code quality using PHPCPD (Code duplication) & PHPMD (PHP Mess Detector) Detect overcomplicated expressions & Unused parameters, methods, properties diff --git a/bin/post-commit b/bin/post-commit index 6ab4c44..295c0b5 100644 --- a/bin/post-commit +++ b/bin/post-commit @@ -15,6 +15,3 @@ echo "\nšŸ™ \033[0;32mRunning Psalm ...\033[0m" echo "\nšŸ‘» \033[0;32mRunning PHPStan ...\033[0m" ./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle - -echo "\nā›” \033[0;32mRunning SensioLabs Security Checker ...\033[0m" -./vendor/bin/security-checker security:check ./composer.lock