-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Refactor analyze job to reusable workflow and enable on Windows CI #26322
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
Conversation
Co-authored-by: TravisEz13 <[email protected]>
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
This PR refactors the CodeQL analysis workflow by extracting the inline CodeQL job from linux-ci.yml into a new reusable workflow file (analyze-reusable.yml). This allows the same CodeQL analysis to be shared across multiple CI workflows (Linux and Windows).
Key Changes
- Created a new reusable workflow
analyze-reusable.ymlcontaining the CodeQL analysis steps - Replaced the inline CodeQL job in
linux-ci.ymlwith a call to the reusable workflow - Added CodeQL analysis to
windows-ci.ymlusing the same reusable workflow
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/analyze-reusable.yml |
New reusable workflow containing CodeQL analysis logic with configurable runner OS |
.github/workflows/linux-ci.yml |
Replaced inline CodeQL job with a call to the reusable workflow |
.github/workflows/windows-ci.yml |
Added CodeQL analysis job using the reusable workflow and updated ready_to_merge dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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. |
…for CodeQL Co-authored-by: TravisEz13 <[email protected]>
Implemented in commit f13b39a. Added Configuration parameter to Invoke-CIBuild (defaults to 'Release' for backward compatibility) and updated analyze workflow to use StaticAnalysis configuration. This avoids code duplication while providing the appropriate build configuration for CodeQL analysis. |
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
📣 Hey @@Copilot, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
…owerShell#26322) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TravisEz13 <[email protected]>
…owerShell#26322) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TravisEz13 <[email protected]>
…owerShell#26322) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TravisEz13 <[email protected]>
The CodeQL analyze job was duplicated inline in linux-ci.yml and missing from windows-ci.yml, limiting security coverage to Linux only.
Changes
Created
.github/workflows/analyze-reusable.ymlworkflow_calltriggerrunner_osinput (defaults toubuntu-latest)StaticAnalysisconfiguration for CodeQL builds to provide full symbolsUpdated
.github/workflows/linux-ci.ymlrunner_os: ubuntu-latestUpdated
.github/workflows/windows-ci.ymlrunner_os: windows-latestready_to_mergedependenciesUpdated
tools/ci.psm1Configurationparameter toInvoke-CIBuildfunction with ValidateSet for 'Debug', 'Release', 'CodeCoverage', 'StaticAnalysis'StaticAnalysisconfiguration without code duplicationUsage Pattern
Windows CI now receives the same CodeQL security analysis as Linux CI. Future analyze job updates only require changes in one location. The StaticAnalysis configuration provides full symbols for better code analysis while avoiding duplication of build logic.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.