ci: add CodeQL security scanning workflow#264
Conversation
Add CodeQL static analysis workflow following ROCm project standards (amdsmi/aqlprofile pattern). Scans C/C++ code for security vulnerabilities. - Runs on develop/mainline branch pushes and PRs - Weekly scheduled scan on Fridays - Uses security-extended query suite - Builds with minimal dependencies (no NIC/MPI) for faster analysis Part of TheRock component onboarding requirements.
CodeQL analysis needs ROCm/HIP installed to build TransferBench. Switch to rocm/dev-ubuntu-22.04 container following aqlprofile pattern. - Add git installation in container - Configure git safe directory - Add CMAKE_PREFIX_PATH=/opt/rocm for hip-config.cmake discovery
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CodeQL workflow to run C/C++ static security analysis for TransferBench as part of TheRock onboarding Security & Compliance requirements.
Changes:
- Introduces a new
.github/workflows/codeql.ymlworkflow for CodeQL scanning on pushes/PRs todevelopandmainline, plus a weekly scheduled run. - Configures CodeQL to use the
security-extendedquery suite and performs a minimal CMake build (NIC/MPI disabled) to drive analysis.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Add -y flag to apt-add-repository to avoid interactive prompts - Replace safe.directory wildcard with GITHUB_WORKSPACE for minimal permissions Rationale: 1. Interactive prompts can hang CI jobs waiting for user input 2. Using '*' for safe.directory is unnecessarily permissive; GITHUB_WORKSPACE provides sufficient access while maintaining defense-in-depth Note: Container image intentionally remains unpinned per maintainer preference
|
Copilot review feedback addressed in commit 2c44bc4:
|
Summary
Add CodeQL static analysis workflow following ROCm project standards (amdsmi/aqlprofile pattern) to scan C/C++ code for security vulnerabilities.
Details
developandmainlinebranch pushes and PRssecurity-extendedquery suite for comprehensive coverageMotivation
Part of TheRock component onboarding requirements - Security & Compliance check.
Testing
Workflow will run automatically on this PR. Expected to complete successfully with the minimal build configuration.