forked from joernio/joern
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge 4-0-153 to backup_sync #145
Open
github-actions
wants to merge
266
commits into
backup_sync
Choose a base branch
from
4-0-153
base: backup_sync
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
As the `<body>` call is synthetic and meant to be immediately deterministic, so there is no reason it should be re-determined.
* upgrade cpg and adapt * use released cpg
…joernio#4729) ``` [warn] -- [E092] Pattern Match Unchecked Warning: /home/mp/Projects/shiftleft/joern.1/joern-cli/frontends/pysrc2cpg/src/test/scala/io/joern/pysrc2cpg/PySrc2CpgFixture.scala:74:61 [warn] 74 | path.resultPairs().collect { case (firstElement: String, secondElement: Option[Integer]) => [warn] | ^ [warn] |the type test for Option[Integer] cannot be checked at runtime because its type arguments can't be determined from Option[Int] [warn] | [warn] | longer explanation available when compiling with `-explain` } ```
Earlier, if we pass the directory path which contains multiple go modules. Processing was done with all the `.go` files mapped to single `go.mod` file. With this change, we have segregated the processing by first isolating all the files mapped to respective `go.mod`. This will also make sure to cleanup the memory footprint after every module is being processed. However, this will increase the processing when used with download dependency as it will process all the `go.mod` files for identifying and processing used dependencies.
This PR changes the modelling of Singleton methods on objects. Ex: ```ruby class Animal; end animal = Animal.new class << animal def bark "woof" end end ``` Creates a lambda method for `animal.bark`, and assigns `animal.bark = methodRef(bark)` Resolves joernio#4721
- we had one stackoverflow in fullname - evaluation.getOverload may return null
…oernio#4733) * Fix always-crashing array initializer type resolution * Fix exception when trying to cast ArrayType to ClassOrInterfaceType * Fix formatting
…g merge (joernio#4737) * minify the flatgraph diff by bringing various things in before the big merge * fmt * revert accidental change
For new frontends with potentially malformed ASTs, type recovery must safely handle instances where members don't have AST parents.
The parser emits calls to `super` as different from simple calls, this PR handles them.
Also: no more empty method fullnames
* Safely handles the case when `super` call has a `null` argument from the parser * Shadows keywords when they are used as keys in association keys for named arguments in calls * Handles singleton methods in implicit returns
This PR fixes a bug where method members were not correctly linked to surrounding methods' bound type decls. Additionally, this handles `return` statements without any proceeding expression. Resolves joernio#4732
The initial implementation of the edge creation and captured local node was wrongly added to the `Ast` object instead of the diff graph. This PR rectifies this.
Due to Ruby method references being called via a `.call()` method, the type ref that should be emitted, is one that contains the `.call` method, but is not necessarily the same type as the one bound to the actual lambda. This makes that change, however, data-flow no longer works in the open-source data-flow tracker as this is not supported.
* [ruby] Remodelled methods defined on singleton objects to no longer be lambdas * [ruby] Review comments
* Renamed `:program` to `<main>` * Replaced `:` method separator to `.` * Removed `<global>` from full names of types and methods
In the case of a type or method re-definition, the full name is ensured to be unique by a set that tracks all full-names for that compilation unit, and a counter. Resolves joernio#4742
This PR remodels `yield` calls as explicit invocations of the implicit or explicit block parameter of the surrounding method. Resolves joernio#4760
Getters and setters were modelled as their CPG operations in isolation, and not using the ordinary AST creator hooks. This PR lowers the getters and setters as their `RubyNode` equivalents, and hands off the AST creation to `astForMethodDeclaration`.
* [php2cpg] Support array/list unpacking in assignment * [php2cpg] Rename method and fix some tests * [php2cpg] code clean and improved test * [php2cpg] improved test
…ode (joernio#5076) * [javasrc2cpg] support flows for field accesses with a TYPE_REF base node * scalafmt * simplify `.where(_.or...)` with `.or(...)` cf. review suggestion Co-authored-by: maltek <[email protected]> --------- Co-authored-by: maltek <[email protected]>
* Convert `FieldIdentifier` nodes to `MemberAccess` if they reach AstCreator for call targets * Handle forwarded args which were a cause for some null pointer exceptions * Fixed `kwrestarg` null value issue, which turned out to be a `**` parameter Resolves joernio#5063 Resolves joernio#5064 Resolves joernio#5065
Signed-off-by: ricekot <[email protected]>
* [ruby] Bitwise Assignment Operators Added handling for `|=`, `&=`, `<<=`, and `>>=` * Added tests
* Added handling for yield in Constructor * Added common fields to traits
* Fixed lifting of fieldStmts causing type recovery to fall over. Changed typerecovery to use lastOption * Revert iterations to 4
* kotlin2cpg: run cleanupDelombokOutput and clearJavaParserCaches after using the AstCreationPass from javasrc2cpg (somehow it was forgotten there) * some minor cleanup/refactoring
It's mostly upper-casing constants.
Brings in a fix to relative path calculation. For: https://shiftleftinc.atlassian.net/browse/SEN-3411
* upgrade ghidra * new try * latest
Desugars aliased methods to the form ```ruby def new_name(*args, &block) old_name(*args, &block) end ``` Resolves joernio#5110
Co-authored-by: Hamza Mouhcine <[email protected]>
usage example for extension mechanism: ``` echo 'Help.additionalHelpEntries += (("aa", "bb", "cc"))' > test-help.sc ./joern --import test-help.sc joern> help ... ┌────────────────┬────────────────┬─────────────────────────┐ │command │description │example │ ├────────────────┼────────────────┼─────────────────────────┤ │aa │bb │cc │ ... ```
…5122) * Fixed warning on calling function that shadows a reserved keyword * Moved lowering to AstCreator
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.
Created by Github action