Repository navigation
ci: restore C++ CodeQL analysis (dynamic workflow is python-only since 2026-08-08) #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| # Fleet-standard CodeQL analysis for Keystone (C++ + Python). | ||
| # | ||
| # Restores a committed, dedicated CodeQL workflow per HomericIntelligence/Keystone#655: | ||
| # the GitHub-managed dynamic workflow had degraded to python-only analysis, leaving | ||
| # C++ uncovered. The proven manual-build `analyze` job from `_required.yml` | ||
| # (restored by #657) moves here — mirroring the fleet-standard shape from the | ||
| # HomericIntelligence/Odysseus#455 rollout — so CodeQL runs once with no duplicate | ||
| # SARIF uploads under the same /language:* categories. | ||
| # | ||
| # The C++ build uses the Conan toolchain explicitly (autobuild cannot pass | ||
| # -DCMAKE_TOOLCHAIN_FILE), and vendored dependencies under build/**/_deps/ are | ||
| # excluded from analysis via .github/codeql/codeql-config.yml (#614). | ||
| # | ||
| # Pinned-contexts safety: verified via `gh api repos/HomericIntelligence/Keystone/rulesets?includes_parents=true` | ||
| # that neither `Analyze (c-cpp)` nor `Analyze (python)` is a required_status_check — | ||
| # ruleset 15556488 (`homeric-main-baseline`) pins lint, unit-tests, integration-tests, | ||
| # security/dependency-scan, security/secrets-scan, build, schema-validation, | ||
| # deps/version-sync, test, package, release, install; ruleset 18221122 | ||
| # (`homeric-main-extras`) pins coverage only. Moving this job out of `_required.yml` | ||
| # therefore cannot brick the merge queue. | ||
|
|
||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: "0 8 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| actions: read | ||
|
|
||
| concurrency: | ||
| group: codeql-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 60 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - language: c-cpp | ||
| build-mode: manual | ||
| - language: python | ||
| build-mode: none | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v3 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
| queries: security-and-quality | ||
| config-file: ./.github/codeql/codeql-config.yml | ||
|
|
||
| # C++ manual build steps -- only run for c-cpp | ||
| - name: Install build dependencies | ||
| if: matrix.language == 'c-cpp' | ||
| uses: ./.github/actions/install-build-deps | ||
| with: | ||
| cache-conan: "true" | ||
|
|
||
| - name: Cache FetchContent downloads | ||
| if: matrix.language == 'c-cpp' | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: build/codeql/_deps | ||
| key: fetchcontent-codeql-${{ runner.os }}-${{ hashFiles('CMakeLists.txt') }} | ||
| restore-keys: | | ||
| fetchcontent-codeql-${{ runner.os }}- | ||
|
|
||
| - name: Install Conan dependencies | ||
| if: matrix.language == 'c-cpp' | ||
| run: conan install . --output-folder=build/codeql/conan-deps --build=missing -s build_type=Release -s compiler.cppstd=20 | ||
|
|
||
| - name: Build for CodeQL analysis | ||
| if: matrix.language == 'c-cpp' | ||
| run: | | ||
| cmake -S . -B build/codeql -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=build/codeql/conan-deps/conan_toolchain.cmake | ||
| cmake --build build/codeql | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v3 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.