From 8ff192d8f201bf8a8873dfc8acb40e2e8a15c59e Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 25 Jun 2026 00:46:18 +0300 Subject: [PATCH] Fix zizmor workflow findings --- .github/dependabot.yml | 8 ------- .github/workflows/bc.yml_ | 2 +- .github/workflows/build.yml | 3 +++ .../workflows/composer-require-checker.yml | 3 +++ .github/workflows/mutation.yml | 3 +++ .github/workflows/rector-cs.yml | 5 +---- .github/workflows/static.yml | 3 +++ .github/workflows/zizmor.yml | 22 +++++++++++++++++++ 8 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/zizmor.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 64c8667..10f7e30 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,10 +7,6 @@ updates: interval: "weekly" cooldown: default-days: 7 - groups: - github-actions: - patterns: - - "*" ignore: - dependency-name: "yiisoft/*" @@ -21,8 +17,4 @@ updates: interval: "daily" cooldown: default-days: 7 - groups: - composer-dependencies: - patterns: - - "*" versioning-strategy: increase-if-necessary diff --git a/.github/workflows/bc.yml_ b/.github/workflows/bc.yml_ index 75f97a7..dfde1ec 100644 --- a/.github/workflows/bc.yml_ +++ b/.github/workflows/bc.yml_ @@ -8,7 +8,7 @@ jobs: name: Roave BC Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@ab62d6b3b0e0cff6c9724ec5a395bedb41c639a2 - name: fetch tags run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Roave BC Check diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8506ea1..525c682 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,9 @@ on: name: build +permissions: + contents: read + jobs: phpunit: uses: yiisoft/actions/.github/workflows/phpunit.yml@master diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 6cb4099..cac6665 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -23,6 +23,9 @@ on: name: Composer require checker +permissions: + contents: read + jobs: composer-require-checker: uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index c1aca98..8f193f6 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -19,6 +19,9 @@ on: name: mutation test +permissions: + contents: read + jobs: mutation: uses: yiisoft/actions/.github/workflows/roave-infection.yml@master diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index 2351349..6b98c18 100644 --- a/.github/workflows/rector-cs.yml +++ b/.github/workflows/rector-cs.yml @@ -1,7 +1,7 @@ name: Rector + PHP CS Fixer on: - pull_request_target: + pull_request: paths: - 'src/**' - 'tests/**' @@ -20,8 +20,5 @@ concurrency: jobs: rector: uses: yiisoft/actions/.github/workflows/rector-cs.yml@master - secrets: - token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: - repository: ${{ github.event.pull_request.head.repo.full_name }} php: '8.0' diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 96b2679..48ff8eb 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -21,6 +21,9 @@ on: name: static analysis +permissions: + contents: read + jobs: psalm: uses: yiisoft/actions/.github/workflows/psalm.yml@master diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..430255d --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,22 @@ +name: GitHub Actions Security Analysis with zizmor 🌈 + +on: + push: + branches: + - master + - main + paths: + - '.github/**.yml' + - '.github/**.yaml' + pull_request: + paths: + - '.github/**.yml' + - '.github/**.yaml' + +permissions: + actions: read # Required by zizmor when reading workflow metadata through the API. + contents: read # Required to read workflow files. + +jobs: + zizmor: + uses: yiisoft/actions/.github/workflows/zizmor.yml@master