-
Notifications
You must be signed in to change notification settings - Fork 270
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
ossdataflowengine: fix edge case when tracking from receivers #2722
Merged
Conversation
This file contains 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
DavidBakerEffendi
approved these changes
May 16, 2023
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.
Just one more Scala-centric style suggestion
...ngineoss/src/main/scala/io/joern/dataflowengineoss/queryengine/SourcesToStartingPoints.scala
Outdated
Show resolved
Hide resolved
ml86
approved these changes
May 16, 2023
…eryengine/SourcesToStartingPoints.scala Co-authored-by: David Baker Effendi <dbe@sun.ac.za>
DavidBakerEffendi
added a commit
that referenced
this pull request
Jun 1, 2023
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`
DavidBakerEffendi
added a commit
that referenced
this pull request
Jun 7, 2023
Extended the fix #2722 by testing when the source is an identifier and accommodating this case
DavidBakerEffendi
added a commit
that referenced
this pull request
Jun 7, 2023
Extended the fix #2722 by testing when the source is an identifier and accommodating this case
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 problem became apparent after #2680 was merged: when using a receiver as a source, and we manage to track back all the way to an invocation on that receiver, we do not consider the call on that receiver to be a source as well. In fact, it's somewhat debatable whether we should. The reason I believe we should is that if we are unable to resolve the method, we will actually jump back to the receiver, while if we can resolve it, we don't. In order to be consistent regardless of whether the method can be resolved or not, this change is necessary.