Skip to content

Commit d3ddb1b

Browse files
committed
ci: use at least v6 of checkout action in workflows
checkout action by default causes a credential to be persisted on disk [1]. Versions before v6 used to store it in .git/config in checked-out repository. v6 fixed this and stored credentials to an area [2] which is later cleaned up. Use v6 of the action to include the change and be more secure. Set persist-credentials to false nonetheless as recommended by zizmor. [1] https://docs.zizmor.sh/audits/#artipacked [1] https://github.com/orgs/community/discussions/179107#discussioncomment-14906259 Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
1 parent 57cbaaa commit d3ddb1b

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

.github/actions/lava-test-plans/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ inputs:
2323
runs:
2424
using: "composite"
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2727
with:
28+
persist-credentials: false
2829
repository: qualcomm-linux/lava-test-plans
2930
path: lava-test-plans
3031
ref: 1ab5e2f1d6cc3559ca4685941cc9fd17ab132c2d

.github/workflows/build-yocto.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
wget -qO ${KAS_CONTAINER} https://raw.githubusercontent.com/siemens/kas/refs/tags/$LATEST/kas-container
3535
chmod +x ${KAS_CONTAINER}
3636
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v6
38+
with:
39+
persist-credentials: false
3840

3941
- name: Run kas lock
4042
run: |
@@ -57,7 +59,9 @@ jobs:
5759
if: github.repository_owner == 'qualcomm-linux'
5860
runs-on: [self-hosted, qcom-u2404, amd64]
5961
steps:
60-
- uses: actions/checkout@v4
62+
- uses: actions/checkout@v6
63+
with:
64+
persist-credentials: false
6165

6266
- name: Download kas lockfile
6367
uses: actions/download-artifact@v7
@@ -116,7 +120,9 @@ jobs:
116120
yamlfile: ":ci/linux-qcom-rt-6.18.yml:ci/qcom-distro-kvm.yml"
117121
name: ${{ matrix.machine }}/${{ matrix.distro.name }}${{ matrix.kernel.dirname }}
118122
steps:
119-
- uses: actions/checkout@v4
123+
- uses: actions/checkout@v6
124+
with:
125+
persist-credentials: false
120126

121127
- name: Run kas build
122128
uses: ./.github/actions/compile
@@ -237,7 +243,9 @@ jobs:
237243
yamlfile: ":ci/linux-qcom-6.18.yml:ci/u-boot-qcom.yml"
238244
name: ${{ matrix.machine }}/${{ matrix.distro.name }}${{ matrix.kernel.dirname }}
239245
steps:
240-
- uses: actions/checkout@v4
246+
- uses: actions/checkout@v6
247+
with:
248+
persist-credentials: false
241249

242250
- name: Run kas build
243251
uses: ./.github/actions/compile

.github/workflows/repolinter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Repo
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
17+
with:
18+
persist-credentials: false
19+
1720
- name: Verify repolinter config file is present
1821
id: check_files
1922
uses: andstor/file-existence-action@v3

.github/workflows/test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ jobs:
4040
- machine: qcom-armv7a
4141
kernel: _linux-qcom-6.18
4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v6
4444
with:
4545
fetch-depth: 0
46+
persist-credentials: false
4647

4748
- name: Run lava-test-plans
4849
uses: ./.github/actions/lava-test-plans
@@ -60,9 +61,10 @@ jobs:
6061
outputs:
6162
jobmatrix: ${{ steps.listjobs.outputs.jobmatrix }}
6263
steps:
63-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v6
6465
with:
6566
fetch-depth: 0
67+
persist-credentials: false
6668

6769
- name: "List jobs"
6870
id: listjobs
@@ -165,9 +167,10 @@ jobs:
165167
run: |
166168
echo "${RESULT}"
167169
168-
- uses: actions/checkout@v4
170+
- uses: actions/checkout@v6
169171
with:
170172
fetch-depth: 0
173+
persist-credentials: false
171174

172175
- name: Run lava-test-plans
173176
uses: ./.github/actions/lava-test-plans
@@ -186,9 +189,10 @@ jobs:
186189
outputs:
187190
jobmatrix: ${{ steps.listjobs.outputs.jobmatrix }}
188191
steps:
189-
- uses: actions/checkout@v4
192+
- uses: actions/checkout@v6
190193
with:
191194
fetch-depth: 0
195+
persist-credentials: false
192196

193197
- name: "List jobs"
194198
id: listjobs
@@ -240,9 +244,10 @@ jobs:
240244
summary_id: ${{ steps.generate-summary.outputs.artifact_id }}
241245

242246
steps:
243-
- uses: actions/checkout@v4
247+
- uses: actions/checkout@v6
244248
with:
245249
fetch-depth: 0
250+
persist-credentials: false
246251

247252
- name: Generate Summary
248253
id: generate-summary

0 commit comments

Comments
 (0)