Skip to content

Commit 9798787

Browse files
committed
Do not persist GHA credentials on checkout
1 parent 3c159da commit 9798787

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
Write-Host "Active .NET SDK: $(dotnet --version)"
5959
- name: Git checkout
6060
uses: actions/checkout@v6
61+
with:
62+
persist-credentials: false
6163
- name: Restore tools
6264
run: dotnet tool restore
6365
- name: Restore packages
@@ -166,6 +168,8 @@ jobs:
166168
10.0.*
167169
- name: Git checkout
168170
uses: actions/checkout@v6
171+
with:
172+
persist-credentials: false
169173
- name: Restore tools
170174
run: dotnet tool restore
171175
- name: InspectCode
@@ -228,6 +232,7 @@ jobs:
228232
- name: Git checkout
229233
uses: actions/checkout@v6
230234
with:
235+
persist-credentials: false
231236
fetch-depth: 2
232237
- name: Restore tools
233238
run: dotnet tool restore

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
10.0.*
3232
- name: Git checkout
3333
uses: actions/checkout@v6
34+
with:
35+
persist-credentials: false
3436
- name: Initialize CodeQL
3537
uses: github/codeql-action/init@v4
3638
with:

.github/workflows/deps-review.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ jobs:
88
dependency-review:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: 'Checkout Repository'
12-
uses: actions/checkout@v6
13-
- name: 'Dependency Review'
14-
uses: actions/dependency-review-action@v4
11+
- name: 'Checkout Repository'
12+
uses: actions/checkout@v6
13+
with:
14+
persist-credentials: false
15+
- name: 'Dependency Review'
16+
uses: actions/dependency-review-action@v4

.github/workflows/qodana.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- name: Git checkout
3232
uses: actions/checkout@v6
3333
with:
34+
persist-credentials: false
3435
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
3536
fetch-depth: 0 # a full history is required for pull request analysis
3637
- name: Restore tools

0 commit comments

Comments
 (0)