mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 10:01:35 +01:00
Added support for cpeStartsWithFilter to scan agent
This commit is contained in:
@@ -155,6 +155,10 @@ public class DependencyCheckScanAgent {
|
|||||||
* The password to use when connecting to the database.
|
* The password to use when connecting to the database.
|
||||||
*/
|
*/
|
||||||
private String databasePassword;
|
private String databasePassword;
|
||||||
|
/**
|
||||||
|
* The starting string that identifies CPEs that are qualified to be imported.
|
||||||
|
*/
|
||||||
|
private String cpeStartsWithFilter;
|
||||||
/**
|
/**
|
||||||
* Whether or not the Maven Central analyzer is enabled.
|
* Whether or not the Maven Central analyzer is enabled.
|
||||||
*/
|
*/
|
||||||
@@ -560,6 +564,22 @@ public class DependencyCheckScanAgent {
|
|||||||
this.showSummary = showSummary;
|
this.showSummary = showSummary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets starting string that identifies CPEs that are qualified to be imported.
|
||||||
|
* @param cpeStartsWithFilter filters CPEs based on this starting string (i.e. cpe:/a: )
|
||||||
|
*/
|
||||||
|
public void setCpeStartsWithFilter(String cpeStartsWithFilter) {
|
||||||
|
this.cpeStartsWithFilter = cpeStartsWithFilter;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the starting string that identifies CPEs that are qualified to be imported.
|
||||||
|
* @return the CPE starting filter (i.e. cpe:/a: )
|
||||||
|
*/
|
||||||
|
public String getCpeStartsWithFilter() {
|
||||||
|
return cpeStartsWithFilter;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of centralAnalyzerEnabled.
|
* Get the value of centralAnalyzerEnabled.
|
||||||
*
|
*
|
||||||
@@ -948,6 +968,7 @@ public class DependencyCheckScanAgent {
|
|||||||
settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPassword);
|
settings.setStringIfNotEmpty(Settings.KEYS.PROXY_PASSWORD, proxyPassword);
|
||||||
settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
|
settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
|
||||||
settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
|
settings.setStringIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
|
||||||
|
settings.setStringIfNotEmpty(Settings.KEYS.CVE_CPE_STARTS_WITH_FILTER, cpeStartsWithFilter);
|
||||||
settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
|
settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
|
||||||
settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_CENTRAL_URL, centralUrl);
|
settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_CENTRAL_URL, centralUrl);
|
||||||
settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
|
settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
|
||||||
|
|||||||
Reference in New Issue
Block a user