Skip to content

Commit 70fd4a1

Browse files
Trottdanielleadams
authored andcommitted
build: set persist-credentials: false on workflows
Out of extra caution, instruct `actions/checkout` to not save GitHub authentication credentials in the git config for use by future steps. PR-URL: #40972 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent b1f785c commit 70fd4a1

19 files changed

+53
-1
lines changed

.github/workflows/authors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
with:
1616
fetch-depth: '0' # This is required to actually get all the authors
17+
persist-credentials: false
1718
- run: "tools/update-authors.js" # Run the AUTHORS tool
1819
- uses: gr2m/create-or-update-pull-request-action@v1 # Create a PR or update the Action's existing PR
1920
env:

.github/workflows/auto-start-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v2
20+
with:
21+
persist-credentials: false
2022

2123
# Install dependencies
2224
- name: Install Node.js

.github/workflows/build-tarball.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- uses: actions/checkout@v2
34+
with:
35+
persist-credentials: false
3436
- name: Set up Python ${{ env.PYTHON_VERSION }}
3537
uses: actions/setup-python@v2
3638
with:
@@ -57,6 +59,8 @@ jobs:
5759
runs-on: ubuntu-latest
5860
steps:
5961
- uses: actions/checkout@v2
62+
with:
63+
persist-credentials: false
6064
- name: Set up Python ${{ env.PYTHON_VERSION }}
6165
uses: actions/setup-python@v2
6266
with:

.github/workflows/build-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
runs-on: ${{ matrix.windows }}
3030
steps:
3131
- uses: actions/checkout@v2
32+
with:
33+
persist-credentials: false
3234
- name: Set up Python ${{ env.PYTHON_VERSION }}
3335
uses: actions/setup-python@v2
3436
with:

.github/workflows/commit-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- uses: actions/checkout@v2
1818
with:
1919
fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }}
20+
persist-credentials: false
2021
- run: git reset HEAD^2
2122
- name: Install Node.js
2223
uses: actions/setup-node@v2

.github/workflows/commit-queue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
# Needs the whole git history for ncu to work
2727
# See https://github.com/nodejs/node-core-utils/pull/486
2828
fetch-depth: 0
29+
persist-credentials: false
2930
# A personal token is required because pushing with GITHUB_TOKEN will
3031
# prevent commits from running CI after they land. It needs
3132
# to be set here because `checkout` configures GitHub authentication

.github/workflows/coverage-linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v2
31+
with:
32+
persist-credentials: false
3133
- name: Set up Python ${{ env.PYTHON_VERSION }}
3234
uses: actions/setup-python@v2
3335
with:

.github/workflows/coverage-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
runs-on: windows-latest
3131
steps:
3232
- uses: actions/checkout@v2
33+
with:
34+
persist-credentials: false
3335
- name: Set up Python ${{ env.PYTHON_VERSION }}
3436
uses: actions/setup-python@v2
3537
with:

.github/workflows/daily.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
container: gcc:11
1616
steps:
1717
- uses: actions/checkout@v2
18+
with:
19+
persist-credentials: false
1820
- name: Use Node.js ${{ env.NODE_VERSION }}
1921
uses: actions/setup-node@v2
2022
with:

.github/workflows/find-inactive-collaborators.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- uses: actions/checkout@v2
2121
with:
2222
fetch-depth: ${{ env.NUM_COMMITS }}
23+
persist-credentials: false
2324

2425
- name: Use Node.js ${{ env.NODE_VERSION }}
2526
uses: actions/setup-node@v2

0 commit comments

Comments
 (0)