diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 80b562b9..5e6827e2 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -7,6 +7,8 @@ on: # Run builds nightly to catch incompatibilities with new marshmallow releases schedule: - cron: "0 0 * * *" +permissions: + contents: read jobs: tests: name: ${{ matrix.name }} @@ -23,8 +25,10 @@ jobs: - { name: "3.14-madev", tox: py314-marshmallowdev } steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: + persist-credentials: false + - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + with: # zizmor: ignore[cache-poisoning] cache key is lockfile-derived enable-cache: true - run: uv run tox -e${{ matrix.tox }} build: @@ -32,8 +36,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: + persist-credentials: false + - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + with: # zizmor: ignore[cache-poisoning] cache key is lockfile-derived enable-cache: true - run: uv build - run: uvx twine check --strict dist/* @@ -49,8 +55,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: + persist-credentials: false + - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + with: # zizmor: ignore[cache-poisoning] cache key is lockfile-derived enable-cache: true - run: uv run tox -e lint publish-to-pypi: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a712ad4..5be6c032 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,10 @@ repos: hooks: - id: check-github-workflows - id: check-readthedocs +- repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.24.0 + hooks: + - id: zizmor - repo: https://github.com/asottile/blacken-docs rev: 1.20.0 hooks: