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 collecting info on source and getting a CFG. The IL the source CFG is lifted to is described in JIL.
from pyjoern import parse_source, fast_cfgs_from_source
# for full parsing
functions = parse_source("tests/source/simple.c")
main = functions["main"]
print(main.start_line)
print(main.cfg)
# for only the CFG
cfgs = fast_cfgs_from_source("tests/source/simple.c")
main_func = cfgs["main"]
print(main_func.edges)
See the tests for more examples of how to use PyJoern.
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.
Metadata
Release files for pyjoern 4.0.150.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyjoern-4.0.150.4.tar.gz | 21.6 kB | Without provenance | Details for pyjoern-4.0.150.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyjoern-4.0.150.4-py3-none-any.whl | Python 3 | none | any | Details for pyjoern-4.0.150.4-py3-none-any.whl |
Total release size: 45.4 kB
Release files / pyjoern-4.0.150.4.tar.gz
| Download URL | pyjoern-4.0.150.4.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d028d99086e24a2e8be8e816ac99f4eac5f7aec84ef390938539cb8037f5c00c
|
|
BLAKE2b-256 checksum How to use checksums |
94050de084a8c2ed7e0339045717f3c3396567a268eebd9a1db51e008df033dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Release files / pyjoern-4.0.150.4-py3-none-any.whl
| Download URL | pyjoern-4.0.150.4-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37dd3d65a2e5617063cf32e62e9408bab5612c2439af5620b7e8f8acc7afbd57
|
|
BLAKE2b-256 checksum How to use checksums |
be5bf457789da0ac3997396d3afb9d54c00714de1b2943577da8a8d6b195ab4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Security for pyjoern 4.0.150.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.