Codeql rollout - #698
Codeql rollout#698ANegm-ETAS wants to merge 6 commits into
Conversation
| - you are bumping the CodeQL bundle or the coding-standards pack version. | ||
|
|
||
| ## The pipeline in one picture | ||
| `bazel run //quality/static_analysis:codeql_lint -- --target //score/message_passing //score/mw/com` |
There was a problem hiding this comment.
Target names are from mw::com and do not fit to lifecycle
|
|
||
| ### 4. Diagnosing local-vs-CI divergence: check the published number's provenance FIRST | ||
| CI publishes its results to GitHub Pages (no auth needed): | ||
| `https://eclipse-score.github.io/communication/latest/quality/codeql_findings.sarif` (full SARIF) and |
There was a problem hiding this comment.
Link to com repo
| bazel run //quality/static_analysis:codeql_lint -- \ | ||
| --build-config qnx \ | ||
| --output-dir /tmp/codeql-results/qnx --output-prefix codeql-nightly-qnx \ | ||
| --target //score/message_passing //score/mw/com |
| CPP_CODE_SCANNING_SPEC = "codeql/cpp-queries:codeql-suites/cpp-code-scanning.qls" | ||
| ALERT_SUPPRESSION_SPEC = "codeql/cpp-queries:AlertSuppression.ql" | ||
|
|
||
| # Local, uncompiled query pack (ported from vsps_quality_packages//tools/codeql/ |
There was a problem hiding this comment.
I guess any references to internal repos shall be removed
| bazel run --config=x86_64-linux //quality/static_analysis:codeql_lint -- \ | ||
| --output-dir /tmp/codeql-results/linux \ | ||
| --output-prefix codeql-nightly \ | ||
| --target //score/... |
There was a problem hiding this comment.
This does not have "--report" - if I understood correctly - it runs only the misra checks, is this intended?
| # to apply those patches back to the workspace. | ||
| build:clang-tidy-fix --config=clang-tidy | ||
| build:clang-tidy-fix --@aspect_rules_lint//lint:fix | ||
| build:clang-tidy-fix --output_groups=+rules_lint_patch |
There was a problem hiding this comment.
There is a lot of other stuff in here unrelated to codeql which is partially conflicting to this repo (e.g. different clang-tidy setup).
I would recommend to only keep the codeql part here for this PR
| @@ -0,0 +1,203 @@ | |||
| # MISRA C++:2023 Guideline Enforcement Plan (GEP) | |||
|
|
|||
| This is the guideline enforcement plan for S-CORE communication for MISRA C++:2023. | |||
There was a problem hiding this comment.
This seems specific to communication repo. I would prefer to remove it
| # it runs standalone. `data = glob(["**"])` keeps its (unused but harmless) | ||
| # companion files (*.pdb, *.xml, *.dll.config) alongside it in runfiles, in | ||
| # case of any relative-path lookups. | ||
| sh_binary( |
There was a problem hiding this comment.
Can this just go into the BUILD file (which is currently empty)?
| # union). Fetched by pinned URL + sha256 (like codeql_bundle above) rather | ||
| # than via `npx` at runtime, so the merge step needs no network access and is | ||
| # fully reproducible. | ||
| http_archive( |
There was a problem hiding this comment.
I would prefer to remove the overly detailed comments from the file
| @@ -0,0 +1,315 @@ | |||
| --- | |||
There was a problem hiding this comment.
I cannot really judge the content due to lack of experience with codeql.
I wonder if we shall keep this PR minimal and only take over additional stuff on demand.
I would be in favor of removing the .github/skills/codeql-analysis for now and first getting some experience with the new tool
|
When running the following locally I get the following error: Error: |
|
From the codeql output:
We have rust and C++ code in the repo. Do we need to handle them separately in codeql? |
| bazel run --config=x86_64-linux //quality/static_analysis:codeql_lint -- \ | ||
| --output-dir /tmp/codeql-results/linux \ | ||
| --output-prefix codeql-nightly \ | ||
| --target //score/... |
There was a problem hiding this comment.
I think this does the analysis as well for test code, is this intended?
| | `cpp-code-scanning` | CodeQL security/quality suite (`cpp-code-scanning.qls`) | 57 | | ||
| | `cert-cpp-l1` | CERT C++ L1 (`cert-cpp-l1.qls`) | 23 | | ||
| | `cert-c-l1` | CERT C L1 (`cert-c-l1.qls`) | 18 | | ||
| | `code-complexity` | local metrics pack (`code-complexity-queries:suites/thresholds.qls`) | 6 | |
There was a problem hiding this comment.
Is this list up to date?
codeql_lint.py: error: argument --report: invalid choice: 'cert-cpp-l1' (choose from default, codeql-report-complexity)
| # Optional record fields: `raised-by` / `approved-by` (name + date) and | ||
| # `permit-id` (see `deviation-permits`). | ||
| # ----------------------------------------------------------------------------- | ||
| deviations: [] |
There was a problem hiding this comment.
Do direct inline suppressions in the code also work without any reference to a deviation in this yaml file?
Introduction of codeql nightly workflow