-
Notifications
You must be signed in to change notification settings - Fork 3
ci: add CodeQL Advanced workflow for C/C++ analysis #40
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
Open
roshan-ku
wants to merge
5
commits into
OpenVisualCloud:main
Choose a base branch
from
roshan-ku:ci/add-codeql-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c328e81
ci: add CodeQL Advanced workflow for C/C++ analysis
roshan-ku cfc3d79
Merge branch 'main' into ci/add-codeql-workflow
roshan-ku 00adaa2
ci: align CodeQL workflow with Coverity pattern
roshan-ku 1f2e3df
ci: extract CodeQL init/build/analyze into a reusable composite action
roshan-ku e0453c7
ci(scan_on_demand): make each scanner step independent
roshan-ku 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # | ||
| # BSD 3-Clause License | ||
| # Copyright (C) 2026 Intel Corporation | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| name: 'CodeQL Scan' | ||
| description: 'Initialize CodeQL, build dvledtx, and perform CodeQL analysis for C/C++' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| # Initializes the CodeQL tools for scanning. | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 | ||
| with: | ||
| languages: c-cpp | ||
| build-mode: manual | ||
|
|
||
| # `c-cpp` always requires a manual build so CodeQL can trace the | ||
| # compiler invocations produced by meson/ninja. | ||
| - name: Build dvledtx | ||
| uses: ./.github/actions/build-dvledtx | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 | ||
| with: | ||
| category: "/language:c-cpp" |
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,53 @@ | ||
| # | ||
| # BSD 3-Clause License | ||
| # Copyright (C) 2026 Intel Corporation | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| # CodeQL Advanced workflow for dvledtx (C/C++ project built with meson/ninja). | ||
| # | ||
| # This repository only contains C sources, so the language matrix has been | ||
| # reduced to `c-cpp` and the build mode set to `manual`, reusing the existing | ||
| # environment-check/build-dvledtx composite actions so CodeQL traces the same | ||
| # build the rest of CI performs. | ||
| name: CodeQL Scan | ||
|
|
||
| on: | ||
| schedule: | ||
| # Weekly on Monday at 07:19 UTC | ||
| - cron: '19 7 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| codeql: | ||
| name: CodeQL Scan | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| permissions: | ||
| contents: read | ||
| security-events: write # Required to upload SARIF results to GitHub Security tab | ||
|
|
||
| steps: | ||
| - name: Clean up previous run | ||
| env: | ||
| WORKSPACE: ${{ github.workspace }} | ||
| run: | | ||
| find "$WORKSPACE" -mindepth 1 -maxdepth 1 -exec rm -rf {} + | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Environment check | ||
| uses: ./.github/actions/environment-check | ||
|
|
||
| - name: CodeQL Scan | ||
| uses: ./.github/actions/analysis/codeql | ||
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
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.