Skip to content

Commit e0ee7bd

Browse files
authored
Merge pull request #3802 from amvanbaren/fix-artifact-poisoning
Fix artifact poisoning CodeQL #4
2 parents 923f60d + d1d50f7 commit e0ee7bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/sonar.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.event.workflow_run.conclusion == 'success'
1111
steps:
12+
- name: Create artifacts directory
13+
run: mkdir -p ${{ runner.temp }}/artifacts
1214
- name: Download PR number artifact
1315
if: github.event.workflow_run.event == 'pull_request'
1416
uses: dawidd6/action-download-artifact@v6
1517
with:
1618
workflow: Build
1719
run_id: ${{ github.event.workflow_run.id }}
20+
path: ${{ runner.temp }}/artifacts
1821
name: PR_NUMBER
1922
- name: Read PR_NUMBER.txt
2023
if: github.event.workflow_run.event == 'pull_request'
2124
id: pr_number
2225
uses: juliangruber/read-file-action@v1
2326
with:
24-
path: ./PR_NUMBER.txt
27+
path: ${{ runner.temp }}/artifacts/PR_NUMBER.txt
2528
- name: Request GitHub API for PR data
2629
if: github.event.workflow_run.event == 'pull_request'
2730
uses: octokit/[email protected]

0 commit comments

Comments
 (0)