Skip to main content

PyJoern lifts Joern data and APIs into Pythonic form, focused on graph manipulation.

Project description

PyJoern

A Python frontend and lifter for Joern API, focused on CFG manipulation.

Install

This package requires you to have Java 19, Graphviz, and Unzip installed on your machine before running the pip installer. In you don't have them on your system, use the install_dependencies.sh script found in the source repo.

pip3 install pyjoern && pyjoern --install

Running pyjoern --install will init the Joern package for this first time, which will download the backend.

Usage

Use PyJoern as a library for lifting source into a CFG. The IL the source is lifted to is described in JIL.

from pyjoern import fast_cfgs_from_source

cfgs = fast_cfgs_from_source("tests/source/simple.c")
main_func = cfgs["main"]
print(main_func.edges)

Versioning

The current version of PyJoern can be found in [pyjoern/__init__.py] as __version__. The point in the version is the PyJoern specific updates. The first three are the current version of Joern that PyJoern is supporting.

Example:

__version__ = "v1.2.18.1"

This would mean Joern version v1.2.18, with PyJoern update 1.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjoern-1.2.18.6.tar.gz (14.0 kB view hashes)

Uploaded Source

Built Distribution

pyjoern-1.2.18.6-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page