diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index d0ef156..187c346 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-slim steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - uses: ./ with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 67d317d..454cc43 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@some-hash # v4.2.2 + with: + persist-credentials: false - uses: schubergphilis/mcvs-python-action@some-hash # v0.2.1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -36,5 +38,9 @@ jobs: +`persist-credentials: false` keeps the token out of `.git/config`, so +third-party packages installed from `requirements.txt` cannot read it. The +action receives the token only through the `token` input. + Define the Python version of the project by adding it to a `.python-version` file.