Skip to content

Commit cdc1c97

Browse files
committed
Add PR check for CSRA artifact upload
1 parent 1dbebad commit cdc1c97

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-0
lines changed

.github/workflows/__risk-assessment-failure.yml

Lines changed: 94 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Risk Assessment analysis failure uploads SARIF artifact
2+
description: Check that a SARIF file is uploaded as artifact if Risk Assessment fails
3+
versions: ["default"]
4+
5+
permissions:
6+
contents: read
7+
security-events: write # needed to upload the SARIF file
8+
9+
steps:
10+
- name: Initialise CodeQL
11+
uses: ./../action/init
12+
id: init
13+
with:
14+
tools: ${{ steps.prepare-test.outputs.tools-url }}
15+
languages: javascript
16+
analysis-kinds: risk-assessment
17+
18+
- name: Fail
19+
run: exit 1
20+
21+
validationJobs:
22+
artifact-present:
23+
name: Check artifact
24+
steps:
25+
- name: Download artifact
26+
uses: actions/download-artifact@v7
27+
with:
28+
pattern: sarif-artifact-*
29+
path: ${{ runner.temp }}/results
30+
merge-multiple: true
31+
- name: List contents
32+
run: |
33+
ls -lr

0 commit comments

Comments
 (0)