ci: replace settings-generated CodeQL job with containerized workflow#73
ci: replace settings-generated CodeQL job with containerized workflow#73Copilot wants to merge 4 commits into
Conversation
|
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. |
|
@copilot There are several errors including "git call failed" in the CI log https://github.com/sdbx/Utils/actions/runs/27260741265/job/80505580578. Is this fine? |
The job completed successfully (
|
There was a problem hiding this comment.
Pull request overview
This PR adds a checked-in GitHub Actions CodeQL workflow for C/C++ that runs entirely inside a buildpack-deps:jammy container on the self-hosted runner, aiming to eliminate workspace cleanup permission/ownership issues caused by host/container artifact ownership drift.
Changes:
- Adds a new
.github/workflows/codeql.ymlworkflow to replace the repository-settings-generated CodeQL configuration. - Runs checkout → CodeQL init →
makebuild → CodeQL analyze inside a container to keep filesystem ownership consistent. - Schedules CodeQL on pushes/PRs to
mainand a weekly cron.
|
|
||
| steps: | ||
| - name: Configure Git safe directory | ||
| run: git config --global --add safe.directory '*' |
|
|
||
| - name: Build | ||
| run: | | ||
| make clean || true # tolerate missing or no-op clean target |
The repository-settings-generated CodeQL job was failing during workspace cleanup on the self-hosted runner due to permission errors on build artifacts (
hd/rust/hd,test/test,test/test_maker,.git/FETCH_HEAD) created with mismatched ownership. No checked-in workflow file existed to fix or override this.Changes
.github/workflows/codeql.yml(new): Checked-in CodeQL workflow for C/C++ analysis, replacing the settings-generated setupcheckout→init→build→analyze) inside abuildpack-deps:jammycontainer, matching the existing C test workflow — eliminates the ownership/permission drift on the host workspacemainand weekly schedulegithub/codeql-action/{init,analyze}@v4andactions/checkout@v6defaults.run.shell: bash(container jobs default tosh)make clean || true && make -j"$(nproc)"