Skip to content

Commit fd6679f

Browse files
committed
tried to fix wrong categorize path
1 parent b2316a1 commit fd6679f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/codeql-multiple-repo-scan.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ jobs:
4949
python3 -m pip install --upgrade pip
5050
pip3 install pyyaml jsonpath-ng jsonschema jsonpatch jsonpointer pytest
5151
52+
- name: Setup Node.js for sarif-tools
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '20'
56+
57+
- name: Install sarif-tools
58+
run: npm install -g sarif-tools
59+
5260
- name: Parse known_good.json and create repos.json
5361
id: parse-repos
5462
run: |
@@ -170,19 +178,36 @@ jobs:
170178
RECATEGORIZE_SCRIPT="codeql-coding-standards-repo/scripts/guideline_recategorization/recategorize.py"
171179
CODING_STANDARDS_CONFIG="./.github/codeql/coding-standards.yml"
172180
181+
# Pfade zu den Schema-Dateien im geklonten Repository
182+
CODING_STANDARDS_SCHEMA="codeql-coding-standards-repo/schemas/coding-standards-schema-1.0.0.json"
183+
SARIF_SCHEMA="codeql-coding-standards-repo/schemas/sarif-schema-2.1.0.json"
184+
173185
mkdir -p sarif-results-recategorized
174186
for sarif_file in sarif-results/*.sarif; do
175187
echo "Processing $sarif_file for recategorization..."
176188
python3 "$RECATEGORIZE_SCRIPT" \
189+
--coding-standards-schema-file "$CODING_STANDARDS_SCHEMA" \
190+
--sarif-schema-file "$SARIF_SCHEMA" \
177191
"$CODING_STANDARDS_CONFIG" \
178192
"$sarif_file" \
179193
"sarif-results-recategorized/$(basename "$sarif_file")"
180194
done
181195
rm -rf sarif-results/*
182196
mv sarif-results-recategorized/* sarif-results/
183197
198+
- name: Generate HTML Report from SARIF
199+
run: |
200+
sarif-tools convert sarif-results/*.sarif -o codeql-report.html
201+
184202
- name: Upload SARIF results as artifact
185203
uses: actions/upload-artifact@v4
186204
with:
187205
name: codeql-sarif-results
188-
path: sarif-results/
206+
path: sarif-results/
207+
208+
209+
- name: Upload HTML Report as artifact
210+
uses: actions/upload-artifact@v4
211+
with:
212+
name: codeql-html-report
213+
path: codeql-report.html

0 commit comments

Comments
 (0)