Skip to content

Python extractor: overlay support #20206

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

d10c
Copy link
Contributor

@d10c d10c commented Aug 11, 2025

Adds overlay support to the Python extractor.

Roadmap:

  • Update the dbscheme
  • Implement path transformer support
  • Read the overlay-changes JSON file
  • Read/write base metadata (CODEQL_EXTRACTOR_<LANG>_OVERLAY_BASE_METADATA_{IN,OUT})

@d10c d10c force-pushed the d10c/python-overlay branch 2 times, most recently from b18b9ce to 3015c12 Compare August 12, 2025 10:48
Comment on lines +9 to +14
/**
* A local predicate that always holds for the overlay variant and
* never holds for the base variant. This is used to define local
* predicates that behave differently for the base and overlay variant.
*/

Check warning

Code scanning / CodeQL

Predicate QLDoc style. Warning

The QLDoc for a predicate without a result should start with 'Holds'.
@d10c d10c force-pushed the d10c/python-overlay branch from b0c7a52 to b5c8338 Compare August 19, 2025 18:20
override string getPath() {
exists(@location loc | py_scope_location(loc, this) | result = getRawPathForLocation(loc))
or
result = getRawPathForModule(this.(@py_Module))

Check warning

Code scanning / CodeQL

Redundant cast Warning

Redundant cast to
@py_Module
.
@d10c d10c force-pushed the d10c/python-overlay branch from f75a392 to 63106c0 Compare August 20, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant