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

Use "Py2CpgOnFileSystem() to create Cpg (config=config). get" for missing nodes #5134

Open
Coker-Cooler opened this issue Nov 26, 2024 · 0 comments

Comments

@Coker-Cooler
Copy link

`val config = io.joern.pysrc2cpg.Py2CpgOnFileSystemConfig()
config.inputPath = "./sast-benchmark-master-python-flask"
config.outputPath = "./cpg.bin.zip"

val cpg = Py2CpgOnFileSystem().createCpg(config = config).get
try {
  val context = new LayerCreatorContext(cpg)
  new Base().run(context)
  new TypeRelations().run(context)
  new ControlFlow().run(context)
  new CallGraph().run(context)
  val options = new OssDataFlowOptions()
  new OssDataFlow(options).run(context)
  codePropertyGraph = cpg
} catch {
  case e: Exception =>
    throw e
}
cpg.close()`

The cpg created using the above code may have missing nodes compared to the cpg nodes loaded by joern-cli's importCpg function, specifically some nodes that are dependent on third-party components. Am I missing some SDKs loaded on other edges or nodes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant