Skip to content

Commit 478aa64

Browse files
authored
ci: do not leave the token in .git/config after checkout (#71)
1 parent b1a801a commit 478aa64

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/commit-check.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1717
with:
1818
fetch-depth: 0 # Required for merge-base checks
19+
# Nothing after checkout needs authenticated git.
20+
persist-credentials: false
1921
- uses: commit-check/commit-check-action@bcbadb3fec596872bcae51074d8fdbea15c02ba5 # v2.18.0
2022
with:
2123
message: true

‎.github/workflows/pre-commit.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ jobs:
2020
contents: read
2121
steps:
2222
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23+
with:
24+
# The hooks are other people's code, and none of them needs
25+
# authenticated git: leave the token out of .git/config.
26+
persist-credentials: false
2327
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2428
id: python-setup
2529
with:

0 commit comments

Comments
 (0)