Skip to content

Commit 317143a

Browse files
committed
ci: add codeql workflow
Adding similar codeql workflow as in zephyr-rtos. Signed-off-by: Kari Hamalainen <[email protected]>
1 parent 4f31310 commit 317143a

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths:
2+
- .github
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths:
2+
- doc

.github/workflows/codeql.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- v*-branch
8+
pull_request:
9+
branches:
10+
- main
11+
- v*-branch
12+
13+
permissions:
14+
contents: read
15+
jobs:
16+
analyze:
17+
name: Analyze (${{ matrix.language }})
18+
runs-on: ubuntu-24.04
19+
permissions:
20+
security-events: write
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- language: python
26+
build-mode: none
27+
- language: actions
28+
build-mode: none
29+
config: ./.github/codeql/codeql-actions-config.yml
30+
- language: javascript-typescript
31+
build-mode: none
32+
config: ./.github/codeql/codeql-js-config.yml
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3.30.1
39+
with:
40+
languages: ${{ matrix.language }}
41+
build-mode: ${{ matrix.build-mode }}
42+
queries: security-extended
43+
config-file: ${{ matrix.config }}
44+
45+
- if: matrix.build-mode == 'manual'
46+
shell: bash
47+
run: |
48+
echo "nothing yet"
49+
exit 0
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3.30.1
53+
with:
54+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)