io.shiftleft.passes

Type members

Classlikes

case
class AppliedDiffGraph(diffGraph: DiffGraph, inverseDiffGraph: Option[DiffGraph], nodeToOdbNode: IdentityHashMap[NewNode, StoredNode])

Diff Graph that has been applied to a source graph. This is a wrapper around diff graph, which additionally provides a map from nodes to graph ids.

Diff Graph that has been applied to a source graph. This is a wrapper around diff graph, which additionally provides a map from nodes to graph ids.

class BatchUpdateBiListener(forward: Boolean, inverse: Boolean) extends ModificationListener
class BatchUpdateForwardListener extends ModificationListener
class BatchUpdateInverseListener extends ModificationListener
abstract
class ConcurrentWriterCpgPass[T <: AnyRef](cpg: Cpg, outName: String, keyPool: Option[KeyPool]) extends CpgPassBase
Companion
object
Companion
class
Companion
object
object DiffGraph
Companion
class

Provides functionality to serialize diff graphs and add them to existing serialized CPGs as graph overlays.

Provides functionality to serialize diff graphs and add them to existing serialized CPGs as graph overlays.

Companion
object
abstract
class ForkJoinParallelCpgPass[T <: AnyRef](cpg: Cpg, outName: String, keyPool: Option[KeyPool]) extends CpgPassBase
class IntervalKeyPool(val first: Long, val last: Long) extends KeyPool

A key pool that returns the integers of the interval [first, last] in a thread-safe manner.

A key pool that returns the integers of the interval [first, last] in a thread-safe manner.

trait KeyPool extends KeyPool

A pool of long integers that serve as node ids. Using the method next, the pool provides the next id in a thread-safe manner.

A pool of long integers that serve as node ids. Using the method next, the pool provides the next id in a thread-safe manner.

class ParallelIteratorExecutor[T](iterator: Iterator[T])(implicit executionContext: ExecutionContext)
class SequenceKeyPool(seq: Seq[Long]) extends KeyPool

A key pool that returns elements of seq in order in a thread-safe manner.

A key pool that returns elements of seq in order in a thread-safe manner.

abstract
class SimpleCpgPass(cpg: Cpg, outName: String, keyPool: Option[KeyPool]) extends ForkJoinParallelCpgPass[AnyRef]

Deprecated classlikes

@deprecated(message = "Please use SimpleCpgPass as a replacement.", since = "approx v1.3.503")
abstract
class CpgPass(cpg: Cpg, outName: String, keyPool: Option[KeyPool]) extends CpgPassBase

Base class for CPG pass - a program, which receives an input graph and outputs a sequence of additive diff graphs. These diff graphs can be merged into the original graph ("applied"), they can be serialized into a binary format, and finally, they can be added to an existing cpg.bin.zip file.

Base class for CPG pass - a program, which receives an input graph and outputs a sequence of additive diff graphs. These diff graphs can be merged into the original graph ("applied"), they can be serialized into a binary format, and finally, they can be added to an existing cpg.bin.zip file.

A pass is provided by inheriting from this class and implementing run, a method, which creates the sequence of diff graphs from an input graph.

Overview of steps and their meaning:

  1. Create: A sequence of diff graphs is created from the source graph 2. Apply: Each diff graph can be applied to the source graph 3. Serialize: After applying a diff graph, the diff graph can be serialized into a CPG overlay
    1. Store: The CPG overlay can be stored in a serialized CPG.
Value Params
cpg

the source CPG this pass traverses

Deprecated
[Since version approx v1.3.503] Please use SimpleCpgPass as a replacement.
@deprecated(message = "Please use overflowdb.BatchedUpdate.DiffGraph as a replacement.", since = "approx v1.3.503")
sealed
trait DiffGraph

A lightweight write-only graph used for creation of CPG graph overlays

A lightweight write-only graph used for creation of CPG graph overlays

The graph can store edges to/from nodes that do not exist in the base graph. It doesn't assign ids for these nodes until the diff graph is serialized. Ids of new nodes may collide with ids of nodes in the base graph, which are not sources or destinations of edges of the diff graph. When the CPG loader adds nodes of the overlay, it therefor needs to reassign ids for nodes if they are already used in the original CPG.

Companion
object
Deprecated
[Since version approx v1.3.503] Please use overflowdb.BatchedUpdate.DiffGraph as a replacement.
@deprecated(message = "Please use ForkJoinParallelCpgPass or ConcurrentWriterCpgPass as a replacement.", since = "approx v1.3.503")
abstract
class ParallelCpgPass[T](cpg: Cpg, outName: String, keyPools: Option[Iterator[KeyPool]]) extends CpgPassBase
Deprecated
[Since version approx v1.3.503] Please use ForkJoinParallelCpgPass or ConcurrentWriterCpgPass as a replacement.