-
Notifications
You must be signed in to change notification settings - Fork 298
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
Implement standard APIs to use Python frontend #2113
Comments
The method @tuxology Can you elaborate on what you actually need as API or do you just want "one common way" of directly calling the frontend classes? |
@ml86 @fabsx00 In general, I need "one common way" in which I can reliably generate CPGs with and without all overlays. It seems to me that I already managed to modify the Python frontend without too many deep changes in the code to use this API and adjusted the tests as well. Will send a PR soon. |
@tuxology py2cpg should also implement the joern/joern-cli/frontends/pysrc2cpg/src/main/scala/io/joern/pysrc2cpg/Py2Cpg.scala Line 19 in d7e8ca0
As for |
@ml86 The new frontend API I am working on for Py2Cpg is using the |
Closing this since this is merged |
Currently the best way to use python fronted via APIs to generate CPG seems to be the use of
Py2CpgOnFileSystem.buildCpg()
API here: https://github.com/joernio/joern/blob/master/joern-cli/frontends/pysrc2cpg/src/main/scala/io/joern/pysrc2cpg/Py2CpgOnFileSystem.scala#L23 This is then followed by running default overlays like OSSdataflow separately.However, for Javasrc2cpg as well as Jssrc2cpg, we have more "standard" way of creating CPGs like
JsSrc2cpg.createCpgWithAllOverlays()
(https://github.com/joernio/joern/blob/master/joern-cli/frontends/jssrc2cpg/src/main/scala/io/joern/jssrc2cpg/JsSrc2Cpg.scala#L44). Therefore, we need a way tostandardize the APIs for Python for better integration with downstream tools.The text was updated successfully, but these errors were encountered: