Skip to content

Commit 63553b2

Browse files
committed
feat: add kmod-codeql.yml
1 parent fa5055d commit 63553b2

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

.github/workflows/kmod-codeql.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CodeQL Linux kernel module
2+
3+
on:
4+
push:
5+
paths:
6+
- ".github/workflows/kmod-codeql.yml"
7+
- "linux/**"
8+
pull_request:
9+
paths:
10+
- ".github/workflows/kmod-codeql.yml"
11+
- "linux/**"
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
actions: read
17+
security-events: write
18+
19+
jobs:
20+
analyze:
21+
name: CodeQL (C/C++)
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Info
29+
run: |
30+
uname -a
31+
gcc --version
32+
33+
- name: Deps
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get -y install linux-headers-$(uname -r) kmod libelf-dev make
37+
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v3
40+
with:
41+
languages: cpp
42+
# Optional stronger rules:
43+
# queries: security-and-quality
44+
# Optional smaller SARIF:
45+
# add-snippets: false
46+
47+
- name: Build (extraction only)
48+
run: |
49+
make -C linux
50+
51+
- name: Analyze
52+
uses: github/codeql-action/analyze@v3
53+
with:
54+
category: "/language:cpp"

.github/workflows/module-codeql.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
paths:
77
- ".github/workflows/module-codeql.yml"
88
- "common/**"
9-
- "linux/**"
109
- "exploreApp/**"
1110
- "pciApp/**"
1211
- "vmeApp/**"
@@ -15,7 +14,6 @@ on:
1514
paths:
1615
- ".github/workflows/module-codeql.yml"
1716
- "common/**"
18-
- "linux/**"
1917
- "exploreApp/**"
2018
- "pciApp/**"
2119
- "vmeApp/**"

0 commit comments

Comments
 (0)