Skip to content

Commit 81fc4e5

Browse files
authored
codeql upload report by code matrix (open-edge-platform#334)
* codeql upload report by code matrix Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> * fix lint warning Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> * codeql: checkout with persist-credentials: false Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> --------- Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
1 parent 48d7bd9 commit 81fc4e5

File tree

1 file changed

+42
-36
lines changed

1 file changed

+42
-36
lines changed

.github/workflows/codeql.yml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: "CodeQL Advanced"
22

33
on:
44
push:
5-
branches: [ 3.0, 3.0-dev ]
5+
branches: [3.0, 3.0-dev]
66
pull_request:
7-
branches: [ 3.0, 3.0-dev ]
7+
branches: [3.0, 3.0-dev]
88
schedule:
99
- cron: '0 4 * * 3'
1010

1111
jobs:
1212
analyze:
1313
name: Analyze (${{ matrix.language }})
14-
runs-on: [ ubuntu-latest ]
14+
runs-on: [ubuntu-latest]
1515
permissions:
1616
# required for all workflows
1717
security-events: write
@@ -20,37 +20,43 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
include:
23-
- language: actions
24-
build-mode: none
25-
- language: go
26-
build-mode: autobuild
27-
- language: python
28-
build-mode: none
23+
- language: actions
24+
build-mode: none
25+
- language: go
26+
build-mode: autobuild
27+
- language: python
28+
build-mode: none
2929
steps:
30-
- name: Checkout repository
31-
uses: actions/checkout@v4
32-
33-
# Initializes the CodeQL tools for scanning.
34-
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@v3
36-
with:
37-
languages: ${{ matrix.language }}
38-
build-mode: ${{ matrix.build-mode }}
39-
40-
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@v3
42-
with:
43-
category: "/language:${{matrix.language}}"
44-
45-
- name: Generate Security Report
46-
uses: rsdmike/github-security-report-action@v3.0.4
47-
with:
48-
template: report
49-
token: ${{ secrets.SECURITY_TOKEN }}
50-
51-
- name: GitHub Upload Release Artifacts
52-
uses: actions/upload-artifact@v4
53-
with:
54-
name: report
55-
path: |
56-
./report.pdf
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
persist-credentials: false
34+
35+
# Initializes the CodeQL tools for scanning.
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@v3
38+
with:
39+
languages: ${{ matrix.language }}
40+
build-mode: ${{ matrix.build-mode }}
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v3
44+
with:
45+
category: "/language:${{matrix.language}}"
46+
47+
- name: Generate Security Report
48+
uses: rsdmike/github-security-report-action@v3.0.4
49+
with:
50+
template: report
51+
token: ${{ secrets.SECURITY_TOKEN }}
52+
53+
- name: Rename Report by Code Matrix
54+
run: |
55+
mv ./report.pdf ./report-${{ matrix.language }}.pdf
56+
57+
- name: GitHub Upload Release Artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: report-${{ matrix.language }}
61+
path: |
62+
./report-${{ matrix.language }}.pdf

0 commit comments

Comments
 (0)