@@ -17,41 +17,43 @@ CodeQL populates the `suppression` property in its SARIF output based on the res
17
17
### Example - CodeQL
18
18
19
19
``` yaml
20
- name : " CodeQL"
20
+ name : " CodeQL Advanced "
21
21
22
22
on :
23
23
push :
24
- branches : [ main ]
24
+ branches : [main]
25
25
pull_request :
26
- branches : [ main ]
27
-
26
+ branches : [main]
27
+ schedule :
28
+ - cron : " 31 7 * * 3"
28
29
jobs :
29
30
analyze :
30
- name : Analyze
31
+ name : Analyze (${{ matrix.language }})
31
32
runs-on : ubuntu-latest
32
33
permissions :
34
+ security-events : write
35
+ packages : read
33
36
actions : read
34
37
contents : read
35
- security-events : write
36
38
37
39
strategy :
38
40
fail-fast : false
39
41
matrix :
40
- language : [ "java" ]
42
+ include :
43
+ - language : java-kotlin
44
+ build-mode : none
45
+ query : codeql/java-queries:AlertSuppression.ql
41
46
42
47
steps :
43
48
- name : Checkout repository
44
- uses : actions/checkout@v3
49
+ uses : actions/checkout@v4
45
50
46
51
- name : Initialize CodeQL
47
- uses : github/codeql-action/init@v2
52
+ uses : github/codeql-action/init@v3
48
53
with :
49
54
languages : ${{ matrix.language }}
50
- # run an 'alert-suppression' query
51
- packs : " codeql/${{ matrix.language }}-queries:AlertSuppression.ql"
52
-
53
- - name : Autobuild
54
- uses : github/codeql-action/autobuild@v2
55
+ build-mode : ${{ matrix.build-mode }}
56
+ packs : ${{ matrix.query }}
55
57
56
58
- name : Perform CodeQL Analysis
57
59
# define an 'id' for the analysis step
@@ -61,12 +63,12 @@ jobs:
61
63
category : " /language:${{matrix.language}}"
62
64
# define the output folder for SARIF files
63
65
output : sarif-results
64
-
66
+
65
67
- name : Dismiss alerts
66
68
if : github.ref == 'refs/heads/main'
67
- uses : advanced-security/dismiss-alerts@v1
69
+ uses : advanced-security/dismiss-alerts@v2
68
70
with :
69
- # specify a 'sarif-id' and 'sarif-file'
71
+ # specify a 'sarif-id' and 'sarif-file'
70
72
sarif-id : ${{ steps.analyze.outputs.sarif-id }}
71
73
sarif-file : sarif-results/${{ matrix.language }}.sarif
72
74
env :
0 commit comments