Skip to content

Commit 5a6cbe9

Browse files
author
Greg Bowler
committed
ci: fix security vulnerability with build archive
1 parent 7bcea7e commit 5a6cbe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
php_version: ${{ matrix.php }}
2525

2626
- name: Archive build
27-
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
27+
run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./
2828

2929
- name: Upload build archive for test runners
3030
uses: actions/upload-artifact@v4
@@ -165,7 +165,7 @@ jobs:
165165
env:
166166
GH_TOKEN: ${{ github.token }}
167167
run: |
168-
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
168+
gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
169169
while read id
170170
do
171171
echo -n "Deleting artifact ID $id ... "

0 commit comments

Comments
 (0)