From 0ae99804b1d98b9a1dd025c13bb6f81455630bd9 Mon Sep 17 00:00:00 2001 From: Gunnar Kreitz Date: Mon, 9 Nov 2026 12:28:17 +0100 Subject: [PATCH 1/4] Set persist-credentials: false. Remove submodules from checkout --- .github/workflows/pypi.yml | 1 + .github/workflows/python-app.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 61a8b690..4dc366a4 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -21,6 +21,7 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 # We need full history for setuptools_scm to figure out version + persist-credentials: false - name: Set safe directory (work around checkout not doing that properly for containers) run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Build sdist (and broken wheel) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0c25180a..7485cd5b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -22,6 +22,8 @@ jobs: image: problemtools/githubci:latest steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -54,7 +56,7 @@ jobs: steps: - uses: actions/checkout@v6 with: - submodules: true + persist-credentials: false - name: Set safe directory (work around checkout not doing that properly for containers) run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Build debian packages From 1ff1151c1149a5f69c781795c9520105d0598f09 Mon Sep 17 00:00:00 2001 From: Gunnar Kreitz Date: Mon, 9 Nov 2026 12:39:58 +0100 Subject: [PATCH 2/4] Update all our actions. Add actions lock --- .github/workflows/actions.lock | 52 ++++++++++++++++++++++++++++++++ .github/workflows/pypi.yml | 8 ++--- .github/workflows/python-app.yml | 6 ++-- 3 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/actions.lock diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 00000000..9f075374 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,52 @@ +# 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/pypi.yml': + - 'actions/checkout@v7.0.1' + - 'actions/download-artifact@v8.0.2' + - 'actions/upload-artifact@v7.0.2' + - 'pypa/gh-action-pypi-publish@release/v1' + '.github/workflows/python-app.yml': + - 'actions/checkout@v6.1.0' + - 'actions/checkout@v7.0.1' + - 'actions/setup-python@v7.1.0' +dependencies: + 'actions/checkout@v6.1.0': + ref: 'v6.1.0' + commit: 'sha1-d23441a48e516b6c34aea4fa41551a30e30af803' + owner_id: 44036562 + repo_id: 197814629 + 'actions/checkout@v7.0.1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/download-artifact@v8.0.2': + ref: 'v8.0.2' + commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333' + owner_id: 44036562 + repo_id: 192626254 + 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405': + ref: 'v6.2.0' + commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405' + owner_id: 44036562 + repo_id: 192625525 + 'actions/setup-python@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0' + owner_id: 44036562 + repo_id: 192625525 + 'actions/upload-artifact@v7.0.2': + ref: 'v7.0.2' + commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9' + owner_id: 44036562 + repo_id: 192625955 + 'pypa/gh-action-pypi-publish@release/v1': + ref: 'release/v1' + commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086' + owner_id: 647025 + repo_id: 178055147 + uses: + - 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405' diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 4dc366a4..34b33584 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -18,7 +18,7 @@ jobs: container: image: quay.io/pypa/manylinux_2_28_x86_64 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7.0.1 with: fetch-depth: 0 # We need full history for setuptools_scm to figure out version persist-credentials: false @@ -33,7 +33,7 @@ jobs: rm -f dist/*.whl cp wheelhouse/*.whl dist - name: Store the distribution packages - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@v7.0.2 with: name: python-package-distributions path: dist/ @@ -54,7 +54,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v8 + uses: actions/download-artifact@v8.0.2 with: name: python-package-distributions path: dist/ @@ -79,7 +79,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v8 + uses: actions/download-artifact@v8.0.2 with: name: python-package-distributions path: dist/ diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 7485cd5b..4a443281 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -21,11 +21,11 @@ jobs: container: image: problemtools/githubci:latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7.1.0 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -54,7 +54,7 @@ jobs: container: image: problemtools/githubci:latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v6.1.0 with: persist-credentials: false - name: Set safe directory (work around checkout not doing that properly for containers) From 5ff92d555298695d78e050950c478e5d6805aa6d Mon Sep 17 00:00:00 2001 From: Gunnar Kreitz Date: Mon, 9 Nov 2026 12:40:18 +0100 Subject: [PATCH 3/4] Limit permissions for github actions --- .github/workflows/pypi.yml | 4 ++++ .github/workflows/python-app.yml | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 34b33584..d6b623cc 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -12,9 +12,13 @@ on: required: true type: boolean +permissions: {} + jobs: build-pypi: runs-on: ubuntu-latest + permissions: + contents: read # for actions/checkout container: image: quay.io/pypa/manylinux_2_28_x86_64 steps: diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4a443281..8dbc3787 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -9,12 +9,13 @@ on: pull_request: branches: [ "master", "develop" ] -permissions: - contents: read +permissions: {} jobs: pythontests: runs-on: ubuntu-latest + permissions: + contents: read # for actions/checkout strategy: matrix: python-version: ["3.11", "3.12", "3.13", "3.14"] # 3.11 is the lowest we support, since we want StrEnum @@ -51,6 +52,8 @@ jobs: packages: # Use a separate job to test debian packaging to speed things up (no need to test this for every python version above) runs-on: ubuntu-latest + permissions: + contents: read # for actions/checkout container: image: problemtools/githubci:latest steps: From 24caf48e8d9c03e316917e2c4669939587bc3a4b Mon Sep 17 00:00:00 2001 From: Gunnar Kreitz Date: Mon, 9 Nov 2026 15:13:11 +0100 Subject: [PATCH 4/4] Change ubuntu-latest to ubuntu-26.04 to avoid latest changes breaking our CI --- .github/workflows/pypi.yml | 6 +++--- .github/workflows/python-app.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index d6b623cc..cafaac28 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -16,7 +16,7 @@ permissions: {} jobs: build-pypi: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: contents: read # for actions/checkout container: @@ -46,7 +46,7 @@ jobs: name: Publish Python distribution to TestPyPI needs: - build-pypi - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 if: ${{ inputs.pushTestPyPi }} environment: @@ -71,7 +71,7 @@ jobs: name: Publish Python distribution to PyPI needs: - build-pypi - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 if: ${{ inputs.pushPyPi }} environment: diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 8dbc3787..7b9eaca5 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -13,7 +13,7 @@ permissions: {} jobs: pythontests: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: contents: read # for actions/checkout strategy: @@ -51,7 +51,7 @@ jobs: venv/bin/mypy --non-interactive --config-file mypy.ini --exclude '^tests/data/' tests/ packages: # Use a separate job to test debian packaging to speed things up (no need to test this for every python version above) - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: contents: read # for actions/checkout container: