All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.joern.console.scan.ScanPass.scala Maven / Gradle / Ivy

There is a newer version: 4.0.131
Show newest version
package io.joern.console.scan

import io.joern.console.Query
import io.shiftleft.codepropertygraph.generated.Cpg
import io.shiftleft.passes.CpgPass

/** Each query runs the data-flow engine, which is already parallelized. Another layer of parallelism causes undefined
  * behaviour on the underlying database. This is why we use `CpgPass` instead of `ForkJoinParallelCpgPass` or similar.
  */
class ScanPass(cpg: Cpg, queries: List[Query]) extends CpgPass(cpg) {

  override def run(diffGraph: DiffGraphBuilder): Unit = {
    queries.flatMap(_.apply(cpg)).foreach(diffGraph.addNode)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy