Skip to main content

A Python implementation of a Code Property Graph.

Project description

Code Property Graph

Github Stars GitHub release (latest SemVer) Maintenance

Code Property Graph Logo

This library is an implementation of a Code Property Graph as seen in the paper published by Fabian Yamaguchi on Modeling and Discovering Vulnerabilities with Code Property Graphs

A code property graph is a highly efficient data structure designed to mine large codebases for similar programming patterns. The data structure can be loaded into a graph database where properties of code can be queried. Code property graphs are intended to be code-agnostic and highly scalable making it one of the best choices for code representation.

Installation

pip install codepropertygraph

Usage

from codepropertygraph.core import CPG

code_cpg = CPG('C:/Users/Gacoka/python_project/')
code_cpg.files.count
code_cpg.files.l

code.cpg.methods.l

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

codepropertygraph-0.0.3.tar.gz (11.8 kB view details)

Uploaded Source

File details

Details for the file codepropertygraph-0.0.3.tar.gz.

File metadata

  • Download URL: codepropertygraph-0.0.3.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for codepropertygraph-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1d0f504c1bfc11c875febf912a9eb6e591aec8c1e6a95cdbdd24c577acfcbe84
MD5 b0b4eb44c57e00cdeaac59662b4dc698
BLAKE2b-256 e52607697d00b38a26a9dc26b21e54d1e2ae59fcde68cfee589d6ac8e2abb9d2

See more details on using hashes here.

Supported by

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