From 2890a211f9ea6ffb87efae22974581e867cc6918 Mon Sep 17 00:00:00 2001 From: Micah Villmow <4211002+mvillmow@users.noreply.github.com> Date: Wed, 19 Aug 2026 06:55:21 -0700 Subject: [PATCH] ci(codeql): restore C++ CodeQL analysis Add a fleet-standard committed CodeQL workflow (cpp + python + actions) so C++ findings are reported again (the GitHub-managed dynamic workflow has been python-only since 2026-08-08). C++ builds install Conan deps before autobuild; paths-ignore excludes build artifacts. Closes #655. Signed-off-by: Micah Villmow <4211002+mvillmow@users.noreply.github.com> --- .github/workflows/codeql.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..137b3b6c --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,61 @@ +# Fleet-standard CodeQL analysis — C++ language restored (#655, part of +# HomericIntelligence/Odysseus#455 rollout). The GitHub-managed dynamic +# workflow only analyzed Python since 2026-08-08; this committed workflow +# guarantees cpp analysis on every PR/push and weekly. +name: CodeQL + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: "0 8 * * 1" + +permissions: + contents: read + security-events: write + actions: read + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: security/codeql-${{ matrix.language }} + runs-on: ubuntu-24.04 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + language: [cpp, python, actions] + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + + - name: Initialize CodeQL + uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4 + with: + languages: ${{ matrix.language }} + config-file: .github/codeql/codeql-config.yml + + - name: Install Conan dependencies + if: matrix.language == 'cpp' + run: | + pip install conan + conan profile detect --exist-ok + conan install . --output-folder=build-conan --build=missing -s build_type=Debug -s compiler.cppstd=20 + + - name: Autobuild + if: matrix.language != 'python' + uses: github/codeql-action/autobuild@5595ccaf912efad79be6eef63a5619ff05969be3 # v4 + env: + CONAN_OUTPUT_DIR: build-conan + + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4 + with: + category: "/language:${{ matrix.language }}"