Skip to content

Commit 8cce0bf

Browse files
committed
fix: use CodeQL autobuild to capture Rust-generated C FFI
CodeQL needs to observe the build process to discover C/C++ code. Using autobuild instead of manual cargo build ensures the tracer captures cbindgen-generated headers and cross-language test code.
1 parent 25bf8a9 commit 8cce0bf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/codeql.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727

28+
- name: Install Rust toolchain
29+
uses: dtolnay/rust-toolchain@stable
30+
2831
- name: Initialize CodeQL
2932
uses: github/codeql-action/init@v3
3033
with:
3134
languages: cpp
32-
# CodeQL doesn't have native Rust support, but analyzes C FFI layer
33-
# For Rust-specific analysis, we rely on clippy and cargo-deny
34-
35-
- name: Install Rust toolchain
36-
uses: dtolnay/rust-toolchain@stable
35+
# Analyze generated C FFI headers and cross-language test code
3736

38-
- name: Build with FFI
39-
run: cargo build --features ffi --release
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
4039

4140
- name: Perform CodeQL Analysis
4241
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)