Skip to content

Commit 3609ca3

Browse files
committed
Drop credential persistence from GitHub workflows
We only have a public repo, and should have locked down permissions on the token, but it's best practice not to leak these out into other steps of the job.
1 parent eec68e4 commit 3609ca3

File tree

8 files changed

+16
-0
lines changed

8 files changed

+16
-0
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 0
45+
persist-credentials: false
4546

4647
- uses: actions/setup-python@v5
4748
name: Install Python

.github/workflows/circleci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
name: Post warnings/errors as review
3030
steps:
3131
- uses: actions/checkout@v4
32+
with:
33+
persist-credentials: false
3234

3335
- name: Fetch result artifacts
3436
id: fetch-artifacts

.github/workflows/clean_pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: '0'
16+
persist-credentials: false
1617
- name: Check for added-and-deleted files
1718
run: |
1819
git fetch --quiet origin "$GITHUB_BASE_REF"

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
steps:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
3032

3133
- name: Initialize CodeQL
3234
uses: github/codeql-action/init@v3

.github/workflows/cygwin.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
- uses: actions/checkout@v4
8383
with:
8484
fetch-depth: 0
85+
persist-credentials: false
8586

8687
- uses: cygwin/cygwin-install-action@v4
8788
with:

.github/workflows/mypy-stubtest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
1517

1618
- name: Set up Python 3
1719
uses: actions/setup-python@v5

.github/workflows/reviewdog.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
1618

1719
- name: Set up Python 3
1820
uses: actions/setup-python@v5
@@ -38,6 +40,8 @@ jobs:
3840
runs-on: ubuntu-latest
3941
steps:
4042
- uses: actions/checkout@v4
43+
with:
44+
persist-credentials: false
4145

4246
- name: Set up Python 3
4347
uses: actions/setup-python@v5
@@ -65,6 +69,8 @@ jobs:
6569
runs-on: ubuntu-latest
6670
steps:
6771
- uses: actions/checkout@v4
72+
with:
73+
persist-credentials: false
6874

6975
- name: eslint
7076
uses: reviewdog/action-eslint@v1

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ jobs:
114114
- uses: actions/checkout@v4
115115
with:
116116
fetch-depth: 0
117+
persist-credentials: false
117118

118119
- name: Set up Python ${{ matrix.python-version }}
119120
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)