ci: Do not persist credentials after checkout (#1464)
See actions/checkout#485 and https://johnstawinski.com/2024/01/11/playing-with-fire-how-we-executed-a-critical-supply-chain-attack-on-pytorch/ In short, it is a terrible idea to persist even our default credentials after checkout. There's no call for that, so we will now set `persist-credentials: false` on all checkout actions.
This commit is contained in:
parent
4e6a79f5d7
commit
57330eda4a
|
@ -31,6 +31,7 @@ jobs:
|
|||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
submodules: recursive
|
||||
persist-credentials: false
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
|
|
|
@ -43,6 +43,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate docs
|
||||
run: |
|
||||
|
|
|
@ -47,6 +47,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Configure Build Matrix
|
||||
id: configure
|
||||
|
@ -99,6 +100,7 @@ jobs:
|
|||
ref: ${{ inputs.ref }}
|
||||
submodules: recursive
|
||||
fetch-tags: true
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Linux deps
|
||||
if: runner.os == 'Linux'
|
||||
|
|
|
@ -33,6 +33,7 @@ jobs:
|
|||
# We must use 'fetch-depth: 2', or else the linter won't have another
|
||||
# revision to compare to.
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
|
||||
- name: Lint
|
||||
shell: bash
|
||||
|
|
|
@ -48,6 +48,7 @@ jobs:
|
|||
ref: ${{ inputs.tag }}
|
||||
submodules: recursive
|
||||
fetch-tags: true
|
||||
persist-credentials: false
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
|
|
|
@ -44,6 +44,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.tag }}
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
|
|
|
@ -55,6 +55,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
persist-credentials: false
|
||||
|
||||
- name: Compute latest
|
||||
id: compute
|
||||
|
|
|
@ -32,6 +32,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Configure Build Matrix
|
||||
id: configure
|
||||
|
@ -69,6 +70,7 @@ jobs:
|
|||
with:
|
||||
ref: ${{ inputs.ref }}
|
||||
submodules: recursive
|
||||
persist-credentials: false
|
||||
|
||||
- name: Build in Docker
|
||||
run: ./packager/testing/test_dockers.sh "${{ matrix.os_name }}"
|
||||
|
|
Loading…
Reference in New Issue