-
Notifications
You must be signed in to change notification settings - Fork 12
IaC Extractor: Windows Support #237
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?
IaC Extractor: Windows Support #237
Conversation
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 adds Windows support to the CodeQL IAC extractor by creating PowerShell equivalents of existing bash scripts and enabling Windows in CI/CD workflows.
- Adds PowerShell scripts for Windows:
create-extractor-pack.ps1,run-tests.ps1, andinstall-extractor.ps1 - Updates CI/CD workflows to include Windows platform in the build matrix
- Updates extractor configuration to support additional file extensions (.tfvars, .bicep) and changes language identifier from "hcl" to "iac"
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tools/qltest.cmd |
Added .tfvars and .bicep file extensions; changed language from "hcl" to "iac" |
tools/index-files.cmd |
Added "extract" subcommand to extractor invocation |
scripts/run-tests.ps1 |
New PowerShell script for running tests on Windows |
scripts/install-extractor.ps1 |
New PowerShell script for installing extractor on Windows |
scripts/create-extractor-pack.ps1 |
Rewritten PowerShell script with improved structure and error handling |
.github/workflows/publish.yml |
Added Windows to build matrix and fixed typo in "Download" |
.github/workflows/build.yml |
Added Windows to test matrix with platform-specific build and test steps |
Comments suppressed due to low confidence (1)
.github/workflows/build.yml:63
- Corrected spelling of 'extensions' to 'extension'. The command should be 'gh extension install' not 'gh extensions install'.
gh extensions install github/gh-codeql
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| codeql query format -i ql\src\codeql_ql\ast\internal\TreeSitter.qll | ||
| # Check for CodeQL binary | ||
| if (Get-Command "codeql" -ErrorAction SilentlyContinue) { | ||
| $CODEQL_BINARY = "codeql" |
Copilot
AI
Nov 3, 2025
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.
Inconsistent indentation: Line 8 uses tabs while most other lines in the file use spaces. This line should use spaces to match the rest of the file's indentation style.
| $CODEQL_BINARY = "codeql" | |
| $CODEQL_BINARY = "codeql" |
| gh codeql version 2>&1 | Out-Null | ||
| $CODEQL_BINARY = "gh codeql" | ||
| } | ||
| catch { |
Copilot
AI
Nov 3, 2025
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.
Inconsistent indentation: Line 15 uses a leading space before 'catch' while other lines use tabs or no leading space. This should be aligned consistently with the surrounding try-catch block.
| catch { | |
| catch { |
| Write-Error "Neither 'codeql' nor 'gh' command found" | ||
| exit 1 |
Copilot
AI
Nov 3, 2025
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.
Inconsistent indentation: Lines 22-23 use tabs while most other lines in the file use spaces. These lines should use spaces to match the rest of the file's indentation style.
| Write-Error "Neither 'codeql' nor 'gh' command found" | |
| exit 1 | |
| Write-Error "Neither 'codeql' nor 'gh' command found" | |
| exit 1 |
Uh oh!
There was an error while loading. Please reload this page.