Giter Site home page Giter Site logo

Comments (5)

fabsx00 avatar fabsx00 commented on July 28, 2024 1

Hi! Take a look at https://github.com/ShiftLeftSecurity/joern and follow the instructions there to get access to a code property graph for C/C++ programs. It contains a control flow graph and all statements are decomposed into their expressions to yield an AST-like structure.

from codepropertygraph.

shangqing-liu avatar shangqing-liu commented on July 28, 2024

Hi! Take a look at https://github.com/ShiftLeftSecurity/joern and follow the instructions there to get access to a code property graph for C/C++ programs. It contains a control flow graph and all statements are decomposed into their expressions to yield an AST-like structure.

thanks for the reply, but I have checked the documentation, it seems there is no interface about outputting ast or cfg on this https://ocular.shiftleft.io/api/io/shiftleft/queryprimitives/index.html. The documentation only provides some high level functions such as cfg.methods. If I want to get the raw ast or cfg graph with Joern, what can I do?

from codepropertygraph.

jinho10 avatar jinho10 commented on July 28, 2024

@fabsx00 do you have an instruction to generate the java cpg?

from codepropertygraph.

fabsx00 avatar fabsx00 commented on July 28, 2024

@shangqing-liu the methods for traversing the CFG are called cfgPrev and cfgNext, and they follow incoming and outcoming CFG edges respectively. I think it might make sense if you tell us more about what you want to achieve. Do you want to have a CFG in some standard format like json? Do you want to plot the CFG?

from codepropertygraph.

fabsx00 avatar fabsx00 commented on July 28, 2024

@jinho10 currently, an open-source input module only exists for C/C++ but not for Java. Ocular at https://ocular.shiftleft.io/ has a commercial Java language frontend.

from codepropertygraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.