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

Upgraded Joern and CPG and using new diff graph API #256

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.github.plume.oss.passes

import com.github.plume.oss.drivers.IDriver
import io.shiftleft.SerializedCpg
import io.shiftleft.codepropertygraph.generated.Cpg
import io.shiftleft.utils.ExecutionContextProvider
import overflowdb.BatchedUpdate.DiffGraphBuilder

Expand Down Expand Up @@ -38,7 +39,7 @@ abstract class PlumeConcurrentWriterPass[T <: AnyRef](driver: IDriver) {
if (completionQueue.size < producerQueueCapacity && partIter.hasNext) {
val next = partIter.next()
completionQueue.append(Future.apply {
val builder = new DiffGraphBuilder
val builder = Cpg.newDiffGraphBuilder
runOnPart(builder, next.asInstanceOf[T])
val builtGraph = builder.build()
driver.bulkTx(builtGraph)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.github.plume.oss.drivers.IDriver
import io.shiftleft.codepropertygraph.generated.NodeTypes.*
import io.shiftleft.codepropertygraph.generated.PropertyNames.*
import io.shiftleft.codepropertygraph.generated.nodes.*
import io.shiftleft.codepropertygraph.generated.{DispatchTypes, EdgeTypes}
import io.shiftleft.codepropertygraph.generated.{Cpg, DispatchTypes, EdgeTypes}
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll}
Expand Down Expand Up @@ -41,7 +41,7 @@ class PlumeDriverFixture(val driver: IDriver)
"overflowdb.BatchedUpdate.DiffGraph based changes" should {

"should reflect node additions in bulk transactions" in {
val diffGraph = new DiffGraphBuilder
val diffGraph = Cpg.newDiffGraphBuilder
// Create some nodes
diffGraph.addNode(nodeToNodeCreate(m1)).addNode(nodeToNodeCreate(b1))
driver.bulkTx(diffGraph.build())
Expand All @@ -54,8 +54,8 @@ class PlumeDriverFixture(val driver: IDriver)
}

"should reflect edge additions in bulk transactions" in {
val diffGraph1 = new DiffGraphBuilder
val diffGraph2 = new DiffGraphBuilder
val diffGraph1 = Cpg.newDiffGraphBuilder
val diffGraph2 = Cpg.newDiffGraphBuilder
// Create some nodes
diffGraph1.addNode(nodeToNodeCreate(m1)).addNode(b1)
driver.bulkTx(diffGraph1)
Expand Down
4 changes: 2 additions & 2 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
object Versions {

// SAST
val codePropertyGraph = "1.6.14"
val joern = "2.0.421"
val codePropertyGraph = "1.6.16"
val joern = "2.0.433"

// Drivers
val tinkerGraph = "3.4.11"
Expand Down
Loading