diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..677c3961 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,25 @@ +name: Psalm PHP Code Security Scan +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] +jobs: + analyze: + runs-on: [ubuntu-latest] + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Psalm + uses: docker://ghcr.io/psalm/psalm-github-actions + with: + security_analysis: true + report_file: results.sarif + - name: Upload Security Analysis results to GitHub + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif \ No newline at end of file diff --git a/.gitignore b/.gitignore index e84e84e3..67e9f06e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ .phpunit.result.cache .travis.yml bin/ -composer.json composer.lock phpunit.xml.dist tests/ diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..9a0eda3e --- /dev/null +++ b/composer.json @@ -0,0 +1,9 @@ +{ + "require": { + "wp-cli/wp-cli-bundle": "^2.9" + }, + "require-dev": { + "phpunit/phpunit": "^8", + "yoast/phpunit-polyfills": "^2.0" + } +}