Skip to content

CodeQL extractor for java, which don't need to compile java source

Notifications You must be signed in to change notification settings

waderwu/extractor-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Extractor-java

Create CodeQL database directly from Java source code without compiling

Require

  1. Installed CodeQL
  2. Linux / Macos

Otherwise you need to manually specify the value of variables such as codeql_home,codeql_java_home

Usage

If there is only jar, you need to decompile it to get the java source code

unzip your.jar
python3 class2java.py dir

generate database for java source code

usage: run.py [-h] [-l [LIB ...]] [-ld [LIBDIR ...]] db srcroot

CodeQL java extractor.

positional arguments:
  db                    codeql database name
  srcroot               java source code dir

optional arguments:
  -h, --help            show this help message and exit
  -l [LIB ...], --lib [LIB ...]
                        lib path
  -ld [LIBDIR ...], --libdir [LIBDIR ...]
                        lib dir

example

python3 run.py dbname srcroot
python3 run.py dbname srcroot -l lib1.jar lib2.jar
python3 run.py dbname srcroot -ld libdir1 libdir2

About

CodeQL extractor for java, which don't need to compile java source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages