diff --git a/.gitattributes b/.gitattributes index b85bc56..e7e4cc3 100755 --- a/.gitattributes +++ b/.gitattributes @@ -11,3 +11,4 @@ /Dockerfile export-ignore /infection.json5 export-ignore /phpunit.xml export-ignore +/composer-dependency-analyser.php export-ignore diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index 993a891..1fd230f 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -2,16 +2,16 @@ name: "Fast Forward Reports" on: push: - branches: - - main + branches: [main] + pull_request: workflow_dispatch: +# Caller permissions cap the callee; only its isolated deploy job writes Pages. permissions: - contents: write + contents: read pages: write id-token: write jobs: reports: - uses: php-fast-forward/dev-tools/.github/workflows/reports.yml@main - secrets: inherit + uses: php-fast-forward/dev-tools/.github/workflows/reports-native.yml@main diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 83ea015..9c844e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,11 +5,12 @@ on: workflow_dispatch: permissions: - contents: write - pages: write - id-token: write + contents: read # Read source; matrix jobs retain read-only tokens. + actions: read # Allow the checkout-free publisher to inspect matrix job results. + statuses: write # Caller ceiling; only isolated callee publishers request this permission. jobs: tests: uses: php-fast-forward/dev-tools/.github/workflows/tests.yml@main - secrets: inherit + with: + publish-required-statuses: ${{ github.actor != 'dependabot[bot]' }} diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php new file mode 100644 index 0000000..9b34c0c --- /dev/null +++ b/composer-dependency-analyser.php @@ -0,0 +1,15 @@ +ignoreErrorsOnPackage('middlewares/utils', [ErrorType::UNUSED_DEPENDENCY]); + }, +);