Skip to content

cpggen

Actions
Generate CPG for multiple languages for use with joern and Qwiet.AI
v1
Latest
Star (0)

CPG Generator

 ██████╗██████╗  ██████╗
██╔════╝██╔══██╗██╔════╝
██║     ██████╔╝██║  ███╗
██║     ██╔═══╝ ██║   ██║
╚██████╗██║     ╚██████╔╝
 ╚═════╝╚═╝      ╚═════╝

This action wraps CPG Generator (cpggen) a python cli tool to generate Code Property Graph for multiple languages. The generated CPG can be directly imported to Joern for analysis.

Usage

Autodetect languages storing CPGs in a directory called cpg_out

- uses: AppThreat/cpggen-action@main
  with:
    out_dir: "/github/workspace/cpg_out"

Use lang argument to force the language type. Comma separated values are accepted.

- uses: AppThreat/cpggen-action@main
  with:
    out_dir: "/github/workspace/cpg_out"
    lang: java

To export the generated CPGs to dot format, set the environment variable CPG_EXPORT.

- uses: AppThreat/cpggen-action@main
  with:
    out_dir: "/github/workspace/cpg_out"
    lang: java
  env:
    CPG_EXPORT: true

To customize the export representation and format use the environment variables CPG_EXPORT_REPR and CPG_EXPORT_FORMAT. Refer to the source for all supported values.

Optionally, the upload the generated CPGs as build artifacts use the below step.

- name: Upload cpg
  uses: actions/upload-artifact@v1.0.0
  with:
    name: cpg
    path: cpg_out

Languages supported

Language Requires build
C No
C++ No
Java No (*)
JavaScript No
TypeScript No
Kotlin No (*)
Php No
Python No

(*) - Precision could be improved with dependencies

Environment variables

Name Purpose
AT_DEBUG_MODE Set to debug to enable debug logging

License

Apache-2.0

cpggen is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Generate CPG for multiple languages for use with joern and Qwiet.AI
v1
Latest

cpggen is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.