diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f2aa5a72..3c65cbc4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,23 +1,30 @@ version: 2 updates: - - package-ecosystem: pip + - package-ecosystem: "github-actions" directory: "/" schedule: interval: monthly assignees: - "ezio-melotti" groups: - pip: + actions: patterns: - "*" + cooldown: + # https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns + # Cooldowns protect against supply chain attacks by avoiding the + # highest-risk window immediately after new releases. + default-days: 14 - - package-ecosystem: "github-actions" + - package-ecosystem: "pip" directory: "/" schedule: interval: monthly assignees: - "ezio-melotti" groups: - actions: + pip: patterns: - "*" + cooldown: + default-days: 14 diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 00000000..a7a4d5c3 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,65 @@ +# This file is machine-generated by `gh actions-lock`. +# Do not edit by hand; run `gh actions-lock` to update. +# Docs: https://gh.io/actions-lockfile +version: 'v0.0.3' +workflows: + '.github/workflows/ci.yml': + - 'actions/checkout@v7.0.1' + - 'actions/setup-python@v7.1.0' + - 'codecov/codecov-action@v7.1.1' + - 'docker/setup-buildx-action@v4.4.1' + - 'hynek/setup-cached-uv@v2.6.0' + '.github/workflows/lint.yml': + - 'actions/checkout@v7.0.1' + - 'j178/prek-action@v3.0.0' +dependencies: + 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9': + ref: 'v6.1.0' + commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + owner_id: 44036562 + repo_id: 215566462 + 'actions/checkout@v7.0.1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd': + ref: 'v8.0.0' + commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd' + owner_id: 44036562 + repo_id: 205262760 + 'actions/setup-python@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0' + owner_id: 44036562 + repo_id: 192625525 + 'codecov/codecov-action@v7.1.1': + ref: 'v7.1.1' + commit: 'sha1-303a32d7a59b442fa8d48b6a1cc6825c09c847a5' + owner_id: 8226205 + repo_id: 200299178 + uses: + - 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' + 'docker/setup-buildx-action@v4.4.1': + ref: 'v4.4.1' + commit: 'sha1-f87e5991a6d7451dcb8d9637bfbc97413f497069' + owner_id: 5429470 + repo_id: 288485773 + 'gacts/run-and-post-run@598d7a875d5620e0457490555b5e18e46082aa47': + ref: 'v1.4.4' + commit: 'sha1-598d7a875d5620e0457490555b5e18e46082aa47' + owner_id: 56696274 + repo_id: 617991574 + 'hynek/setup-cached-uv@v2.6.0': + ref: 'v2.6.0' + commit: 'sha1-34e35d30f1ebc7421a5cc733bca38dcc62603960' + owner_id: 41240 + repo_id: 779953216 + uses: + - 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + - 'gacts/run-and-post-run@598d7a875d5620e0457490555b5e18e46082aa47' + 'j178/prek-action@v3.0.0': + ref: 'v3.0.0' + commit: 'sha1-4e14d07f9231acabce116ccfca13b13dd9755ece' + owner_id: 10510431 + repo_id: 1052387486 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43eabe99..2424099d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,18 +19,18 @@ jobs: python-version: ["3.14", "3.15"] steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@v7.1.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Install uv - uses: hynek/setup-cached-uv@v2 + uses: hynek/setup-cached-uv@v2.6.0 with: cache-dependency-path: | requirements.txt @@ -40,7 +40,7 @@ jobs: run: | uvx --with tox-uv tox -e py - - uses: codecov/codecov-action@v7 + - uses: codecov/codecov-action@v7.1.1 if: always() with: files: ./coverage.xml @@ -53,11 +53,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false - - uses: docker/setup-buildx-action@v4 + - uses: docker/setup-buildx-action@v4.4.1 - name: Build the image run: docker build . diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1c98e70c..265e46de 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,10 +13,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false - - uses: actions/setup-python@v7 + - uses: j178/prek-action@v3.0.0 + + # Fails when .github/workflows/actions.lock is out of sync with the + # workflows or a locked pin no longer verifies upstream. + lockfile: + runs-on: ubuntu-slim + env: + GH_TOKEN: ${{ github.token }} + + steps: + - uses: actions/checkout@v7.0.1 with: - python-version: "3.x" - - uses: tox-dev/action-pre-commit-uv@v1 + persist-credentials: false + - run: gh extension install github/gh-actions-lock --pin v0.4.1 + - run: gh actions-lock --verify diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 481f7bd3..fcc98ccc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: python-check-blanket-noqa - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -18,11 +18,21 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.31.0 + rev: 0.39.0 hooks: - id: check-dependabot - id: check-github-workflows + - repo: https://github.com/rhysd/actionlint + rev: v1.7.12 + hooks: + - id: actionlint + + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.32.0 + hooks: + - id: zizmor + - repo: meta hooks: - id: check-hooks-apply