Mrva powershell pack split - #389
Open
Chanel (chanel-y) wants to merge 1 commit into
Open
Conversation
…A payload The microsoft/powershell-all library shipped 3283 generated framework data-extension files (~15.4 MB, 89% of the compiled pack), which inflated the MRVA query-pack submission body to ~2.47 MB base64 and caused variant-analysis submit timeouts for PowerShell queries. Move the bulk of the generated typemodels into a new opt-in model pack microsoft/powershell-frameworks-generated (extensionTargets: microsoft/powershell-all). The security-relevant core (System base, Management.Automation, IO, Net, Data/SqlClient, Security, Diagnostics.Process, plus hand-authored/internal models) stays in powershell-all. Since codeQL.runningQueries.useExtensionPacks defaults to none, the opt-in pack is not bundled into MRVA by default, cutting the default submit body to ~1.44 MB base64. Full coverage is still available via useExtensionPacks: all. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Chanel (chanel-y)
force-pushed
the
mrva-powershell-pack-split
branch
from
August 10, 2026 18:29
8ee980d to
d0c9bad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MRVA PowerShell pack split — summary
The original issue
Submitting an MRVA (multi-repository variant analysis) run for PowerShell queries timed out at the "Sending request" step.
Root cause: The
microsoft/powershell-alllibrary shipped 3283 generated .NET framework data-extension files (~15.4 MB, 89% of the compiled pack). Because every PowerShell query depends onpowershell-all, all these models were bundled into the MRVA query pack and base64-inlined into the JSON body of thePOST .../variant-analysesrequest:The GitHub endpoint processes the pack synchronously, so the oversized body pushed it past the gateway timeout (a time limit — the body was under the ~10 MB hard limit). Other languages don't hit this because they don't ship a 15 MB generated model set.
The changes (branch
mrva-powershell-pack-split, commit8ee980d48c6)microsoft/powershell-frameworks-generatedatpowershell/ql/extensions/frameworks-generated/, declaringextensionTargets: microsoft/powershell-all. It holds 2424 moved typemodels (~12.2 MB) — the UI/desktop/WCF and long-tail framework models.powershell-all: 850 security-relevant models (System base, Management.Automation, IO, Net, Data/SqlClient, Security, Diagnostics.Process, plus hand-authored/internal cmdlet/alias models).codeql-workspace.yml: registeredpowershell/ql/extensions/**/qlpack.ymlso the new pack resolves.How it resolves the issue
The VS Code setting
codeQL.runningQueries.useExtensionPacksdefaults tonone, so the new opt-in pack is not bundled into MRVA by default. The default submit body shrinks:No coverage lost for anyone who wants it: setting
useExtensionPacks: allre-applies the opt-in pack (validated — restores the full 3283-file model set), so full framework modeling remains available for local analysis on demand.Notes / follow-ups
codeql test run powershell/ql/testto confirm no expected-output regressions, and add a change-note ifpowershell-allrequires one.