Skip to content

Commit 5c97e7f

Browse files
Upgraded Joern and CPG and using new diff graph API (#256)
1 parent 2b886c2 commit 5c97e7f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

astcreator/src/main/scala/com/github/plume/oss/passes/PlumeConcurrentWriterPass.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.github.plume.oss.passes
22

33
import com.github.plume.oss.drivers.IDriver
44
import io.shiftleft.SerializedCpg
5+
import io.shiftleft.codepropertygraph.generated.Cpg
56
import io.shiftleft.utils.ExecutionContextProvider
67
import overflowdb.BatchedUpdate.DiffGraphBuilder
78

@@ -38,7 +39,7 @@ abstract class PlumeConcurrentWriterPass[T <: AnyRef](driver: IDriver) {
3839
if (completionQueue.size < producerQueueCapacity && partIter.hasNext) {
3940
val next = partIter.next()
4041
completionQueue.append(Future.apply {
41-
val builder = new DiffGraphBuilder
42+
val builder = Cpg.newDiffGraphBuilder
4243
runOnPart(builder, next.asInstanceOf[T])
4344
val builtGraph = builder.build()
4445
driver.bulkTx(builtGraph)

drivers/base/src/test/scala/com/github/plume/oss/testfixtures/PlumeDriverFixture.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.github.plume.oss.drivers.IDriver
44
import io.shiftleft.codepropertygraph.generated.NodeTypes.*
55
import io.shiftleft.codepropertygraph.generated.PropertyNames.*
66
import io.shiftleft.codepropertygraph.generated.nodes.*
7-
import io.shiftleft.codepropertygraph.generated.{DispatchTypes, EdgeTypes}
7+
import io.shiftleft.codepropertygraph.generated.{Cpg, DispatchTypes, EdgeTypes}
88
import org.scalatest.matchers.should.Matchers
99
import org.scalatest.wordspec.AnyWordSpec
1010
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll}
@@ -41,7 +41,7 @@ class PlumeDriverFixture(val driver: IDriver)
4141
"overflowdb.BatchedUpdate.DiffGraph based changes" should {
4242

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

5656
"should reflect edge additions in bulk transactions" in {
57-
val diffGraph1 = new DiffGraphBuilder
58-
val diffGraph2 = new DiffGraphBuilder
57+
val diffGraph1 = Cpg.newDiffGraphBuilder
58+
val diffGraph2 = Cpg.newDiffGraphBuilder
5959
// Create some nodes
6060
diffGraph1.addNode(nodeToNodeCreate(m1)).addNode(b1)
6161
driver.bulkTx(diffGraph1)

project/Versions.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
object Versions {
22

33
// SAST
4-
val codePropertyGraph = "1.6.14"
5-
val joern = "2.0.421"
4+
val codePropertyGraph = "1.6.16"
5+
val joern = "2.0.433"
66

77
// Drivers
88
val tinkerGraph = "3.4.11"

0 commit comments

Comments
 (0)