Files
releases/.github/workflows/codeql-analysis.yml
T
Sebastian Spaink 89afc26b87 github: remove cpp from CodeQL language matrix
The CodeQL cpp job fails with "no source code seen during build" on
every run since the wazero migration (#8815).

CodeQL builds a C/C++ database only from the compiler invocations it
traces during the build. `make build` never compiled the C in wasm/src
(that is a Docker-based wasm cross-build, invisible to `make build`);
the only C it ever compiled was the CGo shim of the wasmtime-go wasm
runtime, built with CGO_ENABLED=1. #8815 replaced wasmtime-go with
wazero (pure Go) and switched the build to CGO_ENABLED=0, so no C is
compiled during `make build` anymore and CodeQL sees nothing.

The remaining C in wasm/src is only built via a Docker cross-build for
the wasm32-unknown-unknown-wasm target, which CodeQL's build tracer
cannot follow, so re-adding a build step for it is not practical.

Drop cpp and keep the go, javascript, and python analyzers.

Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
2026-07-07 20:58:58 +02:00

68 lines
2.3 KiB
YAML

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
# zizmor: ignore[cache-poisoning] This workflow publishes no artifacts.
branches: [ main, release-* ]
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: .go-version
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- run: |
make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2