Skip to content
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

Make pysrc2cpg compatible with closed source data flow tracker again. #2680

Merged
merged 7 commits into from
May 9, 2023

Conversation

ml86
Copy link
Contributor

@ml86 ml86 commented May 9, 2023

This change roles back some of the changes made to ease type
propagation which collided with the needs of the closed source data flow tracker.

In order to keep at least so of the changes to ease type propagation, we added
more flexible scope naming.

This allows full names which so far were based on context and thus
structure to be independent from it. In specific the methods
scope will not be part of the full names of elements structurally below it.

Not all tests are passing yet. Note that the calls to extractTypesFromHing
have been removed which renders some of the type propagations assumptions
invalid.

ml86 added 3 commits May 2, 2023 16:11
This allows full names which so far were based on context and thus structure
to be independent from it.

In specific the <body> methods scope will not be part of the full names
of elements structurally below it.
Copy link
Collaborator

@DavidBakerEffendi DavidBakerEffendi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added my one or two changes to get this to work, @ml86 you may also want to give your blessing to the final product

@ml86 ml86 merged commit 744fc30 into master May 9, 2023
dbMundada added a commit to dbMundada/joern that referenced this pull request May 17, 2023
fabsx00 pushed a commit that referenced this pull request May 17, 2023
fabsx00 added a commit that referenced this pull request May 17, 2023
#2731)

* Revert "Make pysrc2cpg compatible with closed source data flow tracker again. (#2680)"

This reverts commit 744fc30.

* Revert "ossdataflowengine: fix edge case when tracking from receivers (#2722)"

This reverts commit 97a7fac.

---------

Co-authored-by: Fabian Yamaguchi <fabs@joern.io>
DavidBakerEffendi added a commit that referenced this pull request Jun 2, 2023
* Make pysrc2cpg compatible with closed source data flow tracker again. (#2680)

* ossdataflowengine: fix edge case when tracking from receivers (#2722)

* Type Recovery Tweaks
* Added tests that were resulting in some failure
* Added support for string constant type hints (idk how but this is valid Python)
* Using `ForkJoinParallelCpgPass` for `DynamicTypeHintFullNamePass`
* Making sure that `DynamicTypeHintFullNamePass` considers types within the current scope
* Sharing the logic for import path resolution between `XInheritanceFullNamePass` and `DynamicTypeHintFullNamePass`
@max-leuthaeuser max-leuthaeuser deleted the markus/pysrc2cpgFixing branch July 18, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants