-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
How to load Java property files for CodeQL analysis
I'm using CodeQL CLI version 1.25.0 to analyse a Java Spring project that is built using Gradle 6.5.1.
When creating the query database, I'm able to create it such that both main and test Java files are present.
However, the property files in main/resources
and test/resources
fail to be included in the query database - I'm able to confirm this by:
- using Visual Studio Code to navigate the CodeQL source DB and observe that no property files are present within the directory structure (which is also verified by repeating the search at the command by unzipping
source_db/src.zip
) - using CodeQL and running the query
from JavaProperty prop select prop
to observe no results are returned.
I've attempted to load property files by specifying the relevant Spring active profile (e.g. by passing -Dspring.active.profile=XXX
to the ./gradlew clean compile
command as passed to CodeQL), but have not changed my outcomes.
Any pointers, tips, ideas, etc. as to how to get Spring property files loaded into CodeQL for analysis are greatly appreciated.