70
70
if (hasYmlFiles) {
71
71
console.log('Found GitHub Actions workflow files. Adding actions to the matrix.');
72
72
matrix['include'].push({
73
+ "category": "/language:actions",
73
74
"language": "actions",
74
- "os ": "ubuntu-latest ",
75
- "name ": "actions "
75
+ "name ": "actions ",
76
+ "os ": "ubuntu-latest "
76
77
});
77
78
}
78
79
@@ -100,11 +101,18 @@ jobs:
100
101
// set name for matrix
101
102
let name = osList.length === 1 ? normalizedKey : `${normalizedKey}, ${os}`
102
103
104
+ // set category for matrix
105
+ let category = `/language:${normalizedKey}`
106
+ if (normalizedKey === 'cpp') {
107
+ category = `/language:cpp-${os.split('-')[0]}`
108
+ }
109
+
103
110
// add to matrix
104
111
matrix['include'].push({
112
+ "category": category,
105
113
"language": normalizedKey,
106
- "os ": os ,
107
- "name ": name
114
+ "name ": name ,
115
+ "os ": os
108
116
})
109
117
}
110
118
}
@@ -194,8 +202,7 @@ jobs:
194
202
- third-party
195
203
196
204
# Pre autobuild
197
- # create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository
198
- # create a file named .codeql-build-${{ matrix.language }}.sh in the root of your repository
205
+ # create a file named .codeql-prebuild-${{ matrix.language }}-${{ runner.os }}.sh in the root of your repository
199
206
- name : Prebuild
200
207
id : prebuild
201
208
run : |
@@ -214,7 +221,7 @@ jobs:
214
221
- name : Perform CodeQL Analysis
215
222
uses : github/codeql-action/analyze@v3
216
223
with :
217
- category : " /language: ${{matrix.language }}"
224
+ category : " ${{ matrix.category }}"
218
225
output : sarif-results
219
226
upload : failure-only
220
227
@@ -231,6 +238,7 @@ jobs:
231
238
- name : Upload SARIF
232
239
uses : github/codeql-action/upload-sarif@v3
233
240
with :
241
+ category : " ${{ matrix.category }}"
234
242
sarif_file : sarif-results/${{ matrix.language }}.sarif
235
243
236
244
- name : Upload loc as a Build Artifact
0 commit comments