Skip to content

Commit e7f554c

Browse files
committed
SECCMP-1797: Add persist-credentials: false to copyright-check checkouts
Prevents the write token from being persisted to disk (.git/config) after checkout. This limits exposure if attacker-controlled PR code could read files from the runner filesystem.
1 parent 00e66d5 commit e7f554c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/copyright-check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ jobs:
1818
with:
1919
ref: ${{ github.event.pull_request.head.sha }}
2020
path: target-repo
21+
persist-credentials: false
2122

2223
- name: Checkout pr-workflows repo
2324
uses: actions/checkout@v4
2425
with:
2526
repository: ${{ github.repository_owner }}/pr-workflows
2627
ref: main
2728
path: pr-workflows
29+
persist-credentials: false
2830

2931
- name: Setup config
3032
id: setup-config
@@ -135,4 +137,4 @@ jobs:
135137
136138
- name: No-op summary
137139
if: steps.changed-files.outputs.skip-validation == 'true'
138-
run: echo "::notice title=Copyright Check::No files to validate"
140+
run: echo "::notice title=Copyright Check::No files to validate"

0 commit comments

Comments
 (0)