ci: add CodeQL analysis over the real colcon build - #70
Open
benaliabderrahmane wants to merge 1 commit into
Open
benaliabderrahmane wants to merge 1 commit into
benaliabderrahmane wants to merge 1 commit into
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
build-mode: manual wraps the same colcon build CI runs, in the same ros:jazzy-ros-base container, so the extractor sees the real compiler invocations with the real headers. Default setup's autobuild would call cmake without ROS sourced, compile nothing, and upload an empty database behind a green check. Uses codeql-action v4; v3 is deprecated in December 2026. Squashed from: - ci: add CodeQL analysis over the real colcon build - ci(codeql): move to codeql-action v4 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NUNQNo26cKRPrVXcaHZnje
benaliabderrahmane
force-pushed
the
ci/codeql
branch
from
September 18, 2026 12:44
8c3031d to
c6ba5f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds CodeQL analysis over the real
colconbuild. Free on public repositories,native to GitHub, and one workflow file with no ongoing upkeep.
What it adds over build-and-test is the interprocedural class of bug: use-after-free,
buffer overflow, null dereference on a path no test happens to take. For a codebase
that hands raw endpoint pointers between an epoll dispatch and whatever thread is
tearing an endpoint down, and
memcpys fixed-size buffers out of shared memory,that is the half worth having.
This is the advanced setup (a committed workflow), not the one-click default
setup, and the reason matters. Default setup runs
autobuild. Autobuild guessesat the build system and would invoke
cmakewithout the ROS environment sourced,so
find_package(rmw)fails, nothing compiles, and CodeQL uploads an emptydatabase — a green check that means nothing.
build-mode: manualputs thetracer around the same
colcon build --paths rmw_unix_socket_cppthat CI runs, inthe same
ros:jazzy-ros-basecontainer, so the extractor observes the realcompiler invocations with the real headers.
Is this user-facing behavior change?
No. CI configuration only; no source, build or packaging change.
How was this tested?
The workflow triggers on
pull_requestagainstdevel, so this PR is its owntest — the
analyze (c-cpp)check on this PR is a real run of the thing beingadded. Worth confirming two specific things in that run before merging:
find_packagehad failed, CodeQLwould still report success over an empty database. The build log should show
the package's translation units compiling.
container-compatible, but that is the part I could not verify locally.
Locally I verified only that the YAML parses and that the build command it runs is
the one that works. Everything else is what the first CI run is for.
Did you use Generative AI?
Additional Information
Two deliberate differences from
ci.yml:Debuginstead ofRelease. At-O2the inlining and constant foldingremove enough structure that some dataflow paths stop being visible to the
extractor.
which do not differ per distro; the matrix exists to catch per-distro API drift,
which is a build problem rather than an analysis one.
Query pack is
security-and-quality, the superset that adds correctness andmaintainability queries on top of
security-extended. If the quality half provesnoisy, dropping to
security-extendedis a one-line change.Also runs weekly on a schedule so a query-pack update is applied to existing code
rather than waiting for the next push to touch it.
Independent of the other open PRs — touches only
.github/workflows/.