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

Merge 2-0-448 to backup_sync #59

Open
wants to merge 50 commits into
base: backup_sync
Choose a base branch
from
Open

Merge 2-0-448 to backup_sync #59

wants to merge 50 commits into from

Commits on Jul 1, 2024

  1. [c2cpg] Safe getType / getNodeType (joernio#4706)

    They may fail throwing an unrecoverable exception in case of unresolved includes etc.
    Also, some minor clean-up.
    max-leuthaeuser committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    fe7b8b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5d58eb4 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Configuration menu
    Copy the full SHA
    9e5a6b2 View commit details
    Browse the repository at this point in the history
  2. [Ruby] Parser tests (joernio#4704)

    This PR handles:
     * Move parser tests from the `deprecated` frontend to the new `ruby` frontend.
     * Fixed parser issues with HashLiterals
     * Fixed parser issues with one-liner class definitions
     * Fixed parser issues with arguments in functions
    AndreiDreyer committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    2fa5a03 View commit details
    Browse the repository at this point in the history
  3. [jssrc2cpg] Update astgen version (joernio#4714)

    Brings in latest babel and typescript to astgen.
    max-leuthaeuser committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    336c989 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5e3e9c9 View commit details
    Browse the repository at this point in the history
  5. [ruby] Arrow Lambda Tests & self Parameter Name Fix (joernio#4716)

    * [ruby] Arrow Lambda Parameter Fix
    Tests various lambdas and fixes `self` parameter name in methods.
    DavidBakerEffendi committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    5afcd8f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b76cdda View commit details
    Browse the repository at this point in the history
  7. use scala3-style import foo.bar.* rather than ._ (joernio#4717)

    partly to minify the flatgraph diff
    mpollmeier committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    fd2894c View commit details
    Browse the repository at this point in the history
  8. [speculative] minor work on reachingDef (joernio#4715)

    * minor work on reachingDef
    
    * fmt
    
    ---------
    
    Co-authored-by: Michael Pollmeier <[email protected]>
    bbrehm and mpollmeier committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    b40cdca View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. [jssrc2cpg] Update astgen to v3.16.0 (joernio#4718)

    This astgen version skipps giant, unparsable files with EMSCRIPTEN code now by default.
    
    For: https://shiftleftinc.atlassian.net/browse/SEN-2797
    max-leuthaeuser committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    680be03 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aad9fe3 View commit details
    Browse the repository at this point in the history
  3. [c2cpg] Register call typefullnames correctly (joernio#4722)

    Also handle fullnames with generics correctly when stubbing types
    For: https://shiftleftinc.atlassian.net/browse/SEN-2840
    max-leuthaeuser committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    b33a347 View commit details
    Browse the repository at this point in the history
  4. [ruby] Parser tests (joernio#4720)

    This PR adds a few more parser tests based on tests in the `querying/` folder for Ruby.
    AndreiDreyer committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    16925e6 View commit details
    Browse the repository at this point in the history
  5. [ruby] Simplify < Base Classes (joernio#4723)

    Inheritance via `<` in Ruby can be arbitrary extensions which warrant post-processing analysis, so this removes any attempt to resolve the type at AST creation to allow for a post-processing pass to handle this instead.
    DavidBakerEffendi committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    915b0ed View commit details
    Browse the repository at this point in the history
  6. Removed joern-stats from install script (joernio#4725)

    Does not exist anymore.
    max-leuthaeuser committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    ec6d03d View commit details
    Browse the repository at this point in the history
  7. [ruby] Make <body> Call Static Dispatch (joernio#4726)

    As the `<body>` call is synthetic and meant to be immediately deterministic, so there is no reason it should be re-determined.
    DavidBakerEffendi committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    18f7fae View commit details
    Browse the repository at this point in the history
  8. upgrade cpg and adapt (joernio#4728)

    * upgrade cpg and adapt
    
    * use released cpg
    mpollmeier committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    dca780f View commit details
    Browse the repository at this point in the history
  9. minify flatgraph diff: remove unnessecary (and misleading) typescheck (

    …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`
    }
    ```
    mpollmeier committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    ea45904 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. [gosrc2cpg] Multi module support (joernio#4724)

    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.
    pandurangpatil committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    dbdb02f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59b5ada View commit details
    Browse the repository at this point in the history
  3. [ruby] Singleton methods on objects (joernio#4734)

    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
    AndreiDreyer committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    cb2bb5c View commit details
    Browse the repository at this point in the history
  4. [c2cpg] Fixed more exceptions (joernio#4736)

    - we had one stackoverflow in fullname
    - evaluation.getOverload may return null
    max-leuthaeuser committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    d3b36e9 View commit details
    Browse the repository at this point in the history
  5. [javasrc2cpg] Fix always-crashing array initializer type resolution (j…

    …oernio#4733)
    
    * Fix always-crashing array initializer type resolution
    
    * Fix exception when trying to cast ArrayType to ClassOrInterfaceType
    
    * Fix formatting
    johannescoetzee committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    ff80364 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7abe33a View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. minify the flatgraph diff by bringing various things in before the bi…

    …g merge (joernio#4737)
    
    * minify the flatgraph diff by bringing various things in before the big merge
    
    * fmt
    
    * revert accidental change
    mpollmeier committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    dd3fb0d View commit details
    Browse the repository at this point in the history
  2. [TypeRecovery] Handle Member without AST Parent Safely (joernio#4739)

    For new frontends with potentially malformed ASTs, type recovery must safely handle instances where members don't have AST parents.
    DavidBakerEffendi committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    0c49cb9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cf8d139 View commit details
    Browse the repository at this point in the history
  4. [ruby] Handle super Calls (joernio#4740)

    The parser emits calls to `super` as different from simple calls, this PR handles them.
    DavidBakerEffendi committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    3a98c4b View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. [c2cpg] Fixed MethodRef typeFullName (joernio#4743)

    Also: no more empty method fullnames
    max-leuthaeuser committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    f446279 View commit details
    Browse the repository at this point in the history
  2. [ruby] super Argument null & Association Key Handling (joernio#4746)

    * 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
    DavidBakerEffendi committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    2bbece9 View commit details
    Browse the repository at this point in the history
  3. [ruby] Bind nested method members to method type (joernio#4747)

    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
    DavidBakerEffendi committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    0acd0a2 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Configuration menu
    Copy the full SHA
    d9be183 View commit details
    Browse the repository at this point in the history
  2. [ruby] Fixed Persistence Issue of Captured Variable Info (joernio#4750)

    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.
    DavidBakerEffendi committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    914aa46 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    21d39c9 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. [ruby] Emit TypeRef instead of MethodRef for Lambdas (joernio#4753)

    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.
    DavidBakerEffendi committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    18b6d88 View commit details
    Browse the repository at this point in the history
  2. [ruby] Singleton Methods on Objects Follow-Up (joernio#4754)

    * [ruby] Remodelled methods defined on singleton objects to no longer be lambdas
    
    * [ruby] Review comments
    AndreiDreyer committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    a547cd1 View commit details
    Browse the repository at this point in the history
  3. [ruby] Method/Type Full Name Simplification (joernio#4755)

    * Renamed `:program` to `<main>`
    * Replaced `:` method separator to `.`
    * Removed `<global>` from full names of types and methods
    DavidBakerEffendi committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    777c67a View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Configuration menu
    Copy the full SHA
    d77252a View commit details
    Browse the repository at this point in the history
  2. [ruby] Handle Re-definitions (joernio#4757)

    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
    DavidBakerEffendi committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    19dd54e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e43881 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    243c29d View commit details
    Browse the repository at this point in the history
  5. [ruby] Remodel yield Calls (joernio#4763)

    This PR remodels `yield` calls as explicit invocations of the implicit or explicit block parameter of the surrounding method.
    
    Resolves joernio#4760
    DavidBakerEffendi committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    9c13325 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2024

  1. Configuration menu
    Copy the full SHA
    e6f5197 View commit details
    Browse the repository at this point in the history
  2. [ruby] Consistently Model Getters/Setters (joernio#4765)

    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`.
    DavidBakerEffendi committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    c67eeaf View commit details
    Browse the repository at this point in the history
  3. [php2cpg] Support array/list unpacking (joernio#4764)

    * [php2cpg] Support array/list unpacking in assignment
    
    * [php2cpg] Rename method and fix some tests
    
    * [php2cpg] code clean and improved test
    
    * [php2cpg] improved test
    d1tto committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    57c2dfe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b2b2bc4 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. IF Cfg creation for if-statements with empty then block. (joernio#4772

    )
    
    * IF Cfg creation for if-statements with empty `then` block.
    
    * Update joern-cli/frontends/c2cpg/src/test/scala/io/joern/c2cpg/passes/cfg/CfgCreationPassTests.scala
    
    Co-authored-by: maltek <[email protected]>
    
    ---------
    
    Co-authored-by: maltek <[email protected]>
    ml86 and maltek committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    8fac557 View commit details
    Browse the repository at this point in the history
  2. [x2cpg] Improve Cfg creation. (joernio#4773)

    - Changed test constructs used to test the CFG creation to return
      List instead of Set. This avoids deduplication which is required
      for correct tests because the number of edges between two nodes
      matters.
    
    - The above change unveiled a problem with the for-statement CFG:
      Duplicate edge between loop condition and body
    ml86 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    5336780 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. Merge branch 'master' of https://github.com/joernio/joern into 2-0-448

    GitHub Actions Bot committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    18d3ca9 View commit details
    Browse the repository at this point in the history