- UserScan - global XML wrapper
- keywordScan // regroups a series of keywords/patterns, e.g. for Java JDKs, it will create .timestamp.JavaJDKs.csv as the scan output
- patternGroup // where you create a pattern (e.g. JDK 1.8) made of one or multiple combined search as follows:
- pattern // a set of search that composes a pattern
- search // ID of your search within a pattern
- filename // File search (can be a file name or folder name, wildcards can be used)
- content // File content search (wildcards can be used)
- formula // verification of your pattern (e.g. "(search_1 or search_2) and search_3" => TRUE
- search // ID of your search within a pattern
- pattern // a set of search that composes a pattern
- patternGroup // where you create a pattern (e.g. JDK 1.8) made of one or multiple combined search as follows:
- keywordScan // regroups a series of keywords/patterns, e.g. for Java JDKs, it will create .timestamp.JavaJDKs.csv as the scan output
Let's detect some JDK 1.8!
Having that mechanic in mind, let's see now how to capture the version 1.8 of the JDK that a Java-based application may use, as specified in Maven's dependency/build file (pom.xml)...<keywordScan name="Java Runtime Checks" version="1.0"> <patternGroup name="JRE 1.8" weight="1" sensitive="0" full_word="0"> <patterns> <search id="JRE_18_plugin"> <filename>pom.xml</filename> <content><target>1.8</target></content> </search> <search id="JRE_18_properties"> <filename>pom.xml</filename> <content><maven.compiler.target>1.8</maven.compiler.target></content> </search> </patterns> <formula value="(JRE_18_plugin or JRE_18_properties)"/> </patternGroup> </keywordScan>
- First way: indicated by "<target>1.8</target>" in Maven's plugin configuration
- Second way: indicated by "<maven.compiler.target>1.8</maven.compiler.target>" in the build properties
For reference only. For the complete details please refer the original article
https://doc.casthighlight.com/how-to-detect-apps-using-oracles-jdk-1-8-others-portfolio-level/
https://doc.casthighlight.com/how-to-detect-apps-using-oracles-jdk-1-8-others-portfolio-level/
Comments