diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b5caf0d..7864cc9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + persist-credentials: false - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index def820f..2e0dd07 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,8 @@ jobs: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - uses: actions/setup-python@v5 - name: Install dependencies run: | @@ -25,4 +27,4 @@ jobs: - name: Publish to PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d7d6d29..1539342 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,6 @@ name: Tests +permissions: + contents: read on: push: branches: @@ -20,6 +22,8 @@ jobs: python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Cache conda uses: actions/cache@v4 env: @@ -28,7 +32,7 @@ jobs: with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-py${{ matrix.python-version }}.yml') }} - - uses: conda-incubator/setup-miniconda@v3 + - uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3 with: # mamba-version: "*" # activate this to build with mamba. python-version: ${{ matrix.python-version }} @@ -48,7 +52,7 @@ jobs: run: | pytest --cov=./ --cov-report=xml - name: Upload code coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 with: file: ./coverage.xml flags: unittests