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

The Python frontend depends on two native backends: Java 19 and Graphviz. You must have these installed on your machine before pip installing this library. To install everything in a working condition, do the following for Ubuntu:

sudo apt-get install -y openjdk-19-jdk graphviz-dev
pip3 install pyjoern && pyjoern --install

When you run pyjoern --install (which should be in your path after pip install), it wil download the latest Joern binaries and install them inside the Python package.

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.

For instance:

__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.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

pyjoern-1.2.18.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pyjoern-1.2.18.1.tar.gz.

File metadata

  • Download URL: pyjoern-1.2.18.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyjoern-1.2.18.1.tar.gz
Algorithm Hash digest
SHA256 1c3faaab9b68a75b264d00530a76778ac7d2491f92e991fc013eeb24a80324dc
MD5 f3a4d7250950b1b0e0372e1a39c4c467
BLAKE2b-256 3b3a5eba5087d36f8386920ed2f75a6683c7ac2a56cdf1bb15e504985a5bec44

See more details on using hashes here.

File details

Details for the file pyjoern-1.2.18.1-py3-none-any.whl.

File metadata

  • Download URL: pyjoern-1.2.18.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyjoern-1.2.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d3c09a2bdf3e8056a45359fc954279557ac69a90b683bc272413b7c5082a341
MD5 850abda03dff2e548b9a40504172191d
BLAKE2b-256 b10d8eadce84a04a9dd1600660c55c28d6a8c80a5469847083da0fac36da5d94

See more details on using hashes here.

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