Skip to content

Commit cc0c085

Browse files
Add scoped CodeQL (kernel/bpf) for v6.8
1 parent e8f897f commit cc0c085

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.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 (kernel/bpf, v6.8)
2+
3+
on:
4+
push:
5+
branches: [ scan/bpf-v6.8 ] # scoped to this snapshot branch only
6+
workflow_dispatch: # lets you re-run manually
7+
# no `schedule:` → no recurring full-tree scan
8+
9+
permissions:
10+
contents: read
11+
security-events: write # required to upload alerts
12+
actions: read
13+
14+
concurrency:
15+
group: codeql-bpf-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
analyze:
20+
name: Analyze kernel/bpf (C/C++)
21+
runs-on: ubuntu-latest # bump to a larger runner if the build is tight
22+
timeout-minutes: 90
23+
24+
steps:
25+
- name: Checkout (v6.8 state)
26+
uses: actions/checkout@v4
27+
28+
- name: Install kernel build deps
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y --no-install-recommends \
32+
build-essential flex bison bc libssl-dev libelf-dev
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
languages: c-cpp
38+
build-mode: manual # we drive the build → this is what scopes C/C++
39+
# default query suite (lighter). Go deeper later with:
40+
# queries: security-extended
41+
42+
- name: Configure + build ONLY kernel/bpf
43+
run: |
44+
make defconfig
45+
./scripts/config --enable BPF --enable BPF_SYSCALL \
46+
--enable BPF_JIT --enable CGROUP_BPF
47+
make olddefconfig
48+
make -j"$(nproc)" prepare
49+
make -j"$(nproc)" kernel/bpf/ # compiles only this subsystem
50+
51+
- name: Perform CodeQL analysis
52+
uses: github/codeql-action/analyze@v3
53+
with:
54+
category: "/language:c-cpp"

0 commit comments

Comments
 (0)