Compiling Databases
https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/
In order to analyze a codebase using CodeQL, the project's codebase will need to be built into a database.
Creating Database for Compiled Languages
For compiled languages such as Java and C#, this will require compiling the codebase.
An example of compiling a Java project:
Note: The following commands assume the current directory is the source root; if not use the --source-root
argument to specify the root of the project.
If the Java project is built with a build tool such as Gradle and Maven, CodeQL has autobuilders that can support this:
Creating Database for Interpreted Languages
For interpreted (non-compiled) languages such as Javascript and Python:
When creating a database for Python; ensure that the following is available:
All the required versions of Python are installed.
pip is installed and can install any packages that the codebase depends on.
The virtualenv module is installed.
Last updated
Was this helpful?