Skip to content

Commit dfe857e

Browse files
maennchenjosevalim
authored andcommitted
Prevent credential persistence in checkout actions
Add `persist-credentials: false` to all `actions/checkout` usages to prevent Git credentials from being persisted in the repository after checkout completes. See: https://docs.zizmor.sh/audits/#artipacked
1 parent 6d5f433 commit dfe857e

8 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
ERLC_OPTS: ${{ matrix.erlc_opts || '' }}
5050
steps:
5151
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
52+
with:
53+
persist-credentials: false
5254

5355
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
5456
with:
@@ -128,6 +130,8 @@ jobs:
128130
run: git config --global core.autocrlf input
129131

130132
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
133+
with:
134+
persist-credentials: false
131135

132136
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
133137
with:

.github/workflows/license_compliance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
- name: Checkout project
2929
id: checkout
3030
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
with:
32+
persist-credentials: false
3133

3234
- name: Run OSS Review Toolkit
3335
id: ort

.github/workflows/markdown.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434

3535
steps:
3636
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
with:
38+
persist-credentials: false
3739

3840
- name: Run markdownlint-cli2
3941
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0

.github/workflows/ort/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ runs:
4646
repository: oss-review-toolkit/ort-config
4747
ref: "main"
4848
path: ".ort-config"
49+
persist-credentials: false
4950

5051
- name: Setup ORT Config
5152
id: setup-ort-config

.github/workflows/posix_compliance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333

3434
steps:
3535
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36+
with:
37+
persist-credentials: false
3638

3739
- name: Install ShellCheck
3840
run: |

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
4646
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747
if: github.ref_type == 'branch'
48+
with:
49+
persist-credentials: false
4850

4951
- name: Update ${{ github.ref_name }}-latest
5052
if: github.ref_type == 'branch'
@@ -82,6 +84,8 @@ jobs:
8284

8385
steps:
8486
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87+
with:
88+
persist-credentials: false
8589

8690
- name: "Build Release"
8791
uses: ./.github/workflows/release_pre_built
@@ -203,6 +207,8 @@ jobs:
203207
- name: Checkout project
204208
id: checkout
205209
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
210+
with:
211+
persist-credentials: false
206212

207213
- name: "Download Build Artifacts"
208214
id: download-build-artifacts

.github/workflows/release_notifications.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
persist-credentials: false
2123

2224
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
2325
with:

.github/workflows/release_pre_built/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ runs:
5959
repository: elixir-lang/ex_doc
6060
ref: ${{ env.EX_DOC_REF }}
6161
path: ex_doc
62+
persist-credentials: false
6263
- name: Build ex_doc
6364
if: ${{ inputs.build_docs }}
6465
shell: bash

0 commit comments

Comments
 (0)