-
Notifications
You must be signed in to change notification settings - Fork 96
86 lines (74 loc) · 2.62 KB
/
Copy pathcodeql.yml
File metadata and controls
86 lines (74 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: "CodeQL Advanced [Push & PR]"
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '32 20 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
sast-codeql-analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write # Required to upload SARIF to GitHub Security tab
strategy:
fail-fast: false
matrix:
include:
- language: java-kotlin
build-mode: manual
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK Corretto 24
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '24'
architecture: x64
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install TypeScript and esbuild
run: npm install -g typescript@5.9.3 esbuild
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config: |
name: "Comprehensive Multi-language CodeQL Config"
# Exclude generated/bundled artifacts: java-lsp-client.js is the esbuild output of
# java-lsp-client.ts (the .ts source IS analysed) and embeds vendored
# vscode-languageserver protocol/types; scanning the bundle only yields noise from that
# third-party generated code.
paths-ignore:
- 'components/ui/editor-monaco/src/main/resources/META-INF/dirigible/editor-monaco/js/java-lsp-client.js'
query-filters:
- exclude:
id: java/path-injection
queries:
- uses: security-and-quality
- name: Build Java/Kotlin project
if: matrix.language == 'java-kotlin'
run: mvn clean install -P quick-build
- name: Perform CodeQL Analysis for language ${{ matrix.language }}
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
output: "sast_codeql_report_${{ matrix.language }}"
upload: always
- name: Upload CodeQL Analysis SARIF file as artifact
uses: actions/upload-artifact@v4
with:
name: sast_codeql_sarif_${{ matrix.language }}
path: sast_codeql_report_${{ matrix.language }}