diff --git a/.distignore b/.distignore index 4c26971..680e300 100644 --- a/.distignore +++ b/.distignore @@ -1,13 +1,13 @@ -/.wordpress-org /.git /.github +/.wordpress-org /coverage /tests /vendor .distignore .editorconfig -.gitignore .gitattributes +.gitignore composer.json composer.lock package.json @@ -16,3 +16,4 @@ phpcs.xml.dist phpstan.neon.dist phpunit.xml.dist README.md +SECURITY.md diff --git a/.gitattributes b/.gitattributes index b6511ef..1dc9389 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,16 +1,17 @@ +.github/* export-ignore +.wordpress-org/* export-ignore +tests/* export-ignore +vendor/* export-ignore .distignore export-ignore .editorconfig export-ignore .gitattributes export-ignore -.github/* export-ignore -tests/* export-ignore .gitignore export-ignore composer.json export-ignore composer.lock export-ignore package.json export-ignore package-lock.json export-ignore -.wordpress-org/* export-ignore phpcs.xml.dist export-ignore phpstan.neon.dist export-ignore phpunit.xml.dist export-ignore README.md export-ignore -.wordpress-org/* export-ignore +SECURITY.md export-ignore diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml new file mode 100644 index 0000000..039394c --- /dev/null +++ b/.github/workflows/plugin-check.yml @@ -0,0 +1,31 @@ +name: 'WordPress.org Plugin Check' +on: # rebuild any PRs and main branch changes + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + coverage: none + tools: wp-cli + + - name: Install latest version of dist-archive-command + run: wp package install wp-cli/dist-archive-command:@stable + + - name: Build plugin + run: | + wp dist-archive . ./${{ github.event.repository.name }}.zip + mkdir build + unzip ${{ github.event.repository.name }}.zip -d build + + - name: Run plugin check + uses: wordpress/plugin-check-action@v1.0.6 + with: + build-dir: './build/${{ github.event.repository.name }}' diff --git a/SECURITY.md b/SECURITY.md index ec15b56..8555fb4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Reporting a Vulnerability -You can report any security bugs found in the source code of this plugin through our [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/pp-disable-comments). The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin. +You can report any security bugs found in the source code of this plugin through our [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/comment-free-zone). The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin. ## Responding to Vulnerability Reports diff --git a/comment-free-zone.php b/comment-free-zone.php index e97583c..ad45a2d 100644 --- a/comment-free-zone.php +++ b/comment-free-zone.php @@ -1,15 +1,15 @@