-
Notifications
You must be signed in to change notification settings - Fork 1
Initial implementation of codeql workflow #578
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
tomk-amd
wants to merge
6
commits into
dev
Choose a base branch
from
tkarczew/code_ql_workflow
base: dev
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 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d900d58
Initial implementation of codeql workflow
tomk-amd a857a16
updated to run on a specific version of ubuntu
tomk-amd 0820350
fixed runs-on: version
tomk-amd 3f3437c
Fix codeql version, fetch submodules, codeql config syntax
tomk-amd add0248
fix typo
tomk-amd bc451a1
fix build path
tomk-amd 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,10 @@ | ||
| # CodeQL configuration | ||
| # Exclude third-party and build outputs to reduce noise and improve performance | ||
| paths-ignore: | ||
| - thirdparty/** | ||
| - build/** | ||
| - Installer/** | ||
| - docs/** | ||
|
|
||
| queries: | ||
| - uses: security-and-quality |
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,63 @@ | ||
| name: "CodeQL" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, dev ] | ||
| pull_request: | ||
| # Run on PRs targeting protected branches | ||
| branches: [ main, dev ] | ||
| schedule: | ||
| - cron: '0 2 * * 0' # Weekly | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (CodeQL) | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| actions: read | ||
| security-events: write | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: true | ||
|
|
||
| - name: Install Dependencies | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install -y \ | ||
| cmake build-essential \ | ||
| libwayland-bin \ | ||
| libwayland-dev libxkbcommon-dev wayland-protocols \ | ||
| pkg-config \ | ||
| libdbus-1-dev | ||
| echo "✅ Dependencies Installed!" | ||
|
|
||
| - name: Install Vulkan SDK | ||
| run: | | ||
| wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | ||
| sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list http://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list | ||
| sudo apt update | ||
| sudo apt install -y vulkan-sdk xorg-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev | ||
| echo "✅ Vulkan SDK Installed!" | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: cpp | ||
| config-file: .github/codeql/codeql-config.yml | ||
|
|
||
| - name: Build with CMake | ||
| run: | | ||
| mkdir -p build/codeql | ||
| cmake -B build/codeql --preset "linux-release" | ||
| cmake --build build/codeql --preset "Linux Release Build" --parallel $(nproc) | ||
|
|
||
| - name: Run CodeQL analysis | ||
| uses: github/codeql-action/analyze@v4 | ||
| with: | ||
| category: "security-and-quality" | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GPG key is being downloaded over HTTPS without verification. While HTTPS provides transport security, it's a best practice to verify the GPG key fingerprint after download to ensure authenticity, especially for security-critical operations like package signing keys.