Python: Disable standard library extraction on GHES#3794
Merged
henrymercer merged 2 commits intomainfrom Apr 1, 2026
Merged
Conversation
mbg
approved these changes
Apr 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the now-unneeded feature flag and init-time override that forced Python standard library extraction on GHES, aligning the Action’s behavior with the CodeQL CLI default (stdlib models instead of extraction) and documenting the change.
Changes:
- Remove the
PythonDefaultIsToNotExtractStdlibtools feature and corresponding Action feature flag/config. - Delete the init-time logic that conditionally exported
CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB=truewhen the flag wasn’t rolled out. - Add a CHANGELOG entry describing the GHES behavior change and expected impact.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tools-features.ts | Drops the tools feature enum entry used to gate the previous Python stdlib extraction override. |
| src/init-action.ts | Removes the Python stdlib extraction override/export logic from init. |
| src/feature-flags.ts | Removes the corresponding feature flag enum value and featureConfig entry. |
| CHANGELOG.md | Documents that Python analysis on GHES no longer extracts the standard library (uses models instead). |
| lib/init-action.js | Generated output reflecting removal of the override logic and feature config. |
| lib/init-action-post.js | Generated output reflecting removal of the feature config entry. |
| lib/analyze-action.js | Generated output reflecting removal of the feature config entry. |
| lib/analyze-action-post.js | Generated output reflecting removal of the feature config entry. |
| lib/autobuild-action.js | Generated output reflecting removal of the feature config entry. |
| lib/setup-codeql-action.js | Generated output reflecting removal of the feature config entry. |
| lib/resolve-environment-action.js | Generated output reflecting removal of the feature config entry. |
| lib/start-proxy-action.js | Generated output reflecting removal of the feature config entry. |
| lib/start-proxy-action-post.js | Generated output reflecting removal of the feature config entry. |
| lib/upload-lib.js | Generated output reflecting removal of the feature config entry. |
| lib/upload-sarif-action.js | Generated output reflecting removal of the feature config entry. |
| lib/upload-sarif-action-post.js | Generated output reflecting removal of the feature config entry. |
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.
This has been the CLI default for some time now that Python analysis contains models of the standard library. However due to the default value of the feature flag we have been manually enabling standard library extraction on GHES.
This PR cleans up that feature and removes the override logic.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, Code Quality, ...).Products:
analysis-kinds: code-scanning.analysis-kinds: code-quality.Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
If there's a subtle bug here, we'd realistically probably only catch it in the release QA process.
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist