Refactor CodeQL analysis - #144
Open
lavrovvalera wants to merge 3 commits into
Open
Conversation
lavrovvalera
requested a deployment
to
workflow-approval
July 30, 2026 15:27 — with
GitHub Actions
Waiting
lavrovvalera
had a problem deploying
to
workflow-approval
July 30, 2026 15:27 — with
GitHub Actions
Error
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
**CodeQL infrastructure** - Add `tools/static_analysis:codeql_lint` — build-traced scan with vendored CodeQL CLI 2.21.4 + pre-compiled MISRA C++:2023 pack v2.61.0 - Add `third_party/codeql/` — Bazel integration + patch for `utils.py` (Python 3.12 `\d` warning + MISRA C++:2023 report label) - Add `coding-standards.yaml` — deviation record for RULE-18-5-2 - Add `build:codeql` to `.bazelrc` — LLVM toolchain + cache-busting flags **Dependency upgrade** - Upgrade `score_lifecycle_health` 0.2.0 → 0.3.0; migrate include paths and Bazel labels in `time_daemon` and `time_slave` application sources **Docs & housekeeping** - Add `tools/static_analysis/README.md` — design, known gaps, local run guide - Update `README.md` with local run command and output files - Add `codeql-*/` to `.gitignore`
Replace SARIF post-processing with build-level test exclusion: - Use bazel cquery --config=codeql with 'except attr(testonly, 1, ...)' to resolve production-only labels before the traced build; testonly targets, platform-incompatible targets (e.g. QNX-only), and multi-config duplicates are all excluded before any source file enters the database - Add --skip_incompatible_explicit_targets to bazel build so explicit label lists tolerate platform-incompatible targets gracefully Fix BUILD hygiene: - Add testonly=True to svt_receiver_mock alias (//score/time_daemon/src/ipc) - Add testonly=True to HighResSteadyTimeBenchmark cc_binary Add RULE-7-0-4 deviation (tool defect: stream operator<< mis-flagged as shift) Refactor tooling layout (module-agnostic vs module-specific split): - Extract codeql.bzl macro; BUILD reduced to a 3-line load + call - Move coding-standards.yaml to tools/static_analysis/ (process_coding_standards_config scans recursively, root location is not required) - coding-standards.yaml declared as explicit Bazel filegroup for incremental rebuild tracking Update README: file layout section, cquery-based phase descriptions, build-level test exclusion explanation, remove stale gap eclipse-score#4
lavrovvalera
force-pushed
the
vala_codeql_setup
branch
from
August 3, 2026 08:02
57bc681 to
6df4bf8
Compare
lavrovvalera
had a problem deploying
to
workflow-approval
August 3, 2026 08:02 — with
GitHub Actions
Error
lavrovvalera
had a problem deploying
to
workflow-approval
August 3, 2026 08:02 — with
GitHub Actions
Error
Replace the shared eclipse-score/cicd-workflows CodeQL wrapper with a direct invocation of tools/static_analysis:codeql_lint, mirroring the local workflow exactly. Motivation: - The shared wrapper used github/codeql-action/init (unpinned CodeQL version) and packs: codeql/misra-cpp-coding-standards (downloaded from registry at runtime, no deviation processing). - Our codeql_lint uses the pinned CLI (@codeql_bundle v2.21.4), the pinned MISRA pack (@codeql_coding_standards_compiled v2.61.0), and runs process_coding_standards_config to apply coding-standards.yaml deviations before the analysis. Findings from known tool defects (e.g. RULE-7-0-4) are suppressed in the results. Changes: - Replace reusable workflow call with a standalone job - Add more-disk-space (level 4) — CodeQL database + tooling requires headroom - Run bazel run //tools/static_analysis:codeql_lint with the same arguments as the local invocation; output goes to runner.temp - Upload codeql-time.sarif to GitHub Security tab via upload-sarif@v3 - Upload analysis_reports/ as a build artifact for audit/compliance use
lavrovvalera
force-pushed
the
vala_codeql_setup
branch
from
August 3, 2026 08:23
6df4bf8 to
d17e343
Compare
lavrovvalera
requested a deployment
to
workflow-approval
August 3, 2026 08:23 — with
GitHub Actions
Waiting
lavrovvalera
requested a deployment
to
workflow-approval
August 3, 2026 08:23 — with
GitHub Actions
Waiting
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
Improves the MISRA C++:2023 CodeQL analysis pipeline.
Build-level test exclusion
Previously test/mock code entered the CodeQL database and was filtered from
SARIF afterwards.
bazel cquerynow resolves production-only labels before thetraced build — test sources never enter the database and the SARIF post-processing
filter is removed.
RULE-7-0-4deviationCodeQL incorrectly flags overloaded
operator<<on stream types as a bitwiseshift (tool defect). 260 false positives suppressed via
coding-standards.yaml,scoped to specific header files. Files with genuine bitwise operations remain
reported.
Tooling layout and CI
coding-standards.yamlmoved from repo root →tools/static_analysis/codeql.bzlmacro introduced — separates module-agnostic wiring from themodule-specific entry point, making the tooling reusable by other modules
codeql_lintdirectly (pinned CLI + pinnedMISRA pack + deviation processing), replacing the shared wrapper that used
GitHub's unpinned CodeQL and had no deviation support. SARIF is uploaded to
GitHub Security tab; compliance reports are uploaded as a build artifact.
Related ticket
closes #120 (improvement ticket)