From ec1596bcecbd566dda525dee52d223f92e5fa905 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Sun, 15 Nov 2026 13:29:31 +0100 Subject: [PATCH 1/2] chore: add zizmor (pre-commit) and fix its auditor findings --- .github/workflows/pr-review-reminder.yml | 12 +++++++++++- .pre-commit-config.yaml | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pr-review-reminder.yml b/.github/workflows/pr-review-reminder.yml index 396d4dc..e29bdab 100644 --- a/.github/workflows/pr-review-reminder.yml +++ b/.github/workflows/pr-review-reminder.yml @@ -5,13 +5,23 @@ on: - cron: "0 7 * * 1-5" workflow_dispatch: +# One scheduled run at a time. +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +permissions: + contents: read + jobs: notify: + name: notify runs-on: ubuntu-latest steps: - name: Fetch open PRs and notify Mattermost - uses: actions/github-script@v7 + uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 env: + # zizmor: ignore[secrets-outside-env] notification-only webhook; no GitHub environment needed MATTERMOST_WEBHOOK: ${{ secrets.MATTERMOST_WEBHOOK }} with: script: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b5d25bf --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks + +default_language_version: + python: python3.11 + +repos: + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.32.0 + hooks: + - id: zizmor + args: ["--no-online-audits"] From 20a84737979dad753297a2db3631b053e256ac6b Mon Sep 17 00:00:00 2001 From: aldbr Date: Mon, 16 Nov 2026 11:59:30 +0100 Subject: [PATCH 2/2] ci: run pre-commit in CI and fix the zizmor hook config - Add a pre-commit workflow (same shape as intercede/signurlarity), so the zizmor hook is enforced on PRs instead of only for local installs. - Use python3 instead of python3.11: the runner (setup-python 3.x) and many laptops have no python3.11, so the hook failed to install. - Keep the hook's own --no-progress: `args` replaces the hook's args. - Comment the github-script pin with its exact version (v7.1.0). Assisted-by: Claude:claude-opus-5-5 --- .github/workflows/pr-review-reminder.yml | 2 +- .github/workflows/pre-commit.yml | 27 ++++++++++++++++++++++++ .pre-commit-config.yaml | 5 +++-- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pr-review-reminder.yml b/.github/workflows/pr-review-reminder.yml index e29bdab..ba6a94b 100644 --- a/.github/workflows/pr-review-reminder.yml +++ b/.github/workflows/pr-review-reminder.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch open PRs and notify Mattermost - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 + uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 env: # zizmor: ignore[secrets-outside-env] notification-only webhook; no GitHub environment needed MATTERMOST_WEBHOOK: ${{ secrets.MATTERMOST_WEBHOOK }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..313e69b --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,27 @@ +name: pre-commit + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + pre-commit: + name: pre-commit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: 3.x + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5d25bf..71a6ece 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,11 +2,12 @@ # See https://pre-commit.com/hooks.html for more hooks default_language_version: - python: python3.11 + python: python3 repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit rev: v1.32.0 hooks: - id: zizmor - args: ["--no-online-audits"] + # Overrides the hook's own args, so keep its --no-progress (zizmor#582). + args: ["--no-progress", "--no-online-audits"]