-
Notifications
You must be signed in to change notification settings - Fork 380
Enable CodeQL security analysis #754
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: harsha-simhadri <5590673+harsha-simhadri@users.noreply.github.com>
Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com>
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.
Pull request overview
Adds CodeQL code scanning to the existing CI workflow so Rust security analysis runs as part of the required “basics” gate before more expensive jobs execute.
Changes:
- Grants workflow permissions needed to upload CodeQL results (
security-events: write). - Adds a new
codeqljob that initializes CodeQL for Rust, builds the workspace, and uploads analysis results. - Includes the
codeqljob in thebasicsgating job’sneedslist.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
Copilot
AI
Feb 10, 2026
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 codeql job’s steps block uses an indentless sequence (steps: followed by - name at the same indentation). The rest of this workflow consistently indents step list items under steps:; aligning the indentation here improves consistency/readability and avoids potential YAML parsing differences across tooling.
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.
Fixed the indentation in commit cbdbb77. The steps are now properly indented to match the rest of the workflow.
| permissions: | ||
| contents: read | ||
| security-events: write | ||
|
|
Copilot
AI
Feb 10, 2026
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.
security-events: write is granted at the workflow level, which gives every job broader permissions than needed. To follow least-privilege, keep the top-level permissions minimal (e.g., contents: read) and set permissions: { security-events: write, contents: read } only on the codeql job (or only on the analyze step).
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.
Seconded.
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.
Fixed in commit cbdbb77. The security-events: write permission is now scoped only to the codeql job instead of being granted at the workflow level, following the least-privilege principle.
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #754 +/- ##
=======================================
Coverage 88.99% 88.99%
=======================================
Files 428 428
Lines 78234 78235 +1
=======================================
+ Hits 69626 69627 +1
Misses 8608 8608
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
A few comments:
|
@copilot - would you be able to weigh-in on these comments? |
Co-authored-by: hildebrandmw <24898651+hildebrandmw@users.noreply.github.com>
Addressed in commit cbdbb77:
|
Co-authored-by: hildebrandmw <24898651+hildebrandmw@users.noreply.github.com>
CodeQL Enablement
Summary
CodeQL is now integrated into the CI workflow and runs in parallel with all other jobs. It is not part of the "basics" gate, which means:
The job follows least-privilege principles with scoped permissions and uses the ci profile for build caching consistency.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.