diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml index 90332a2..9706813 100644 --- a/.github/workflows/commit-check.yml +++ b/.github/workflows/commit-check.yml @@ -16,6 +16,8 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Required for merge-base checks + # Nothing after checkout needs authenticated git. + persist-credentials: false - uses: commit-check/commit-check-action@bcbadb3fec596872bcae51074d8fdbea15c02ba5 # v2.18.0 with: message: true diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 309a2eb..981fb3b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -20,6 +20,10 @@ jobs: contents: read steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # The hooks are other people's code, and none of them needs + # authenticated git: leave the token out of .git/config. + persist-credentials: false - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 id: python-setup with: