public class VulnerabilityTrendHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_SELECT |
static List<String> |
SEVERITIES |
| Constructor and Description |
|---|
VulnerabilityTrendHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildAppVersionTag(hudson.model.Run<?,?> build) |
static String |
buildAppVersionTag(hudson.model.Run<?,?> build,
String applicationId) |
static String |
buildAppVersionTagHierarchical(hudson.model.Run<?,?> build,
String applicationId) |
static com.contrastsecurity.sdk.ContrastSDK |
createSDK(String username,
String serviceKey,
String apiKey,
String teamServerUrl) |
static com.contrastsecurity.models.AgentType |
getAgentTypeFromString(String type) |
static hudson.util.ListBoxModel |
getAgentTypeListBoxModel()
The available agent types for the configuration dropdown
|
static hudson.util.ListBoxModel |
getApplicationIds(String teamServerProfileName)
The apps for a profile
|
static List<GlobalThresholdCondition> |
getGlobalThresholdConditions(String profileName) |
static TeamServerProfile |
getProfile(String profileName) |
static hudson.util.ListBoxModel |
getProfileNames()
The configured profile names for the dropdowns
|
static EnumSet<com.contrastsecurity.http.RuleSeverity> |
getSeverityList(String severity)
Returns the sublist of severities greater than or equal to the configured severity level
|
static hudson.util.ListBoxModel |
getSeverityListBoxModel()
The available severities for the configuration dropdowns
|
static List<ThresholdCondition> |
getThresholdConditions(List<ThresholdCondition> thresholdConditions,
List<GlobalThresholdCondition> globalThresholdConditions)
Helper method for combining global threshold conditions and threshold conditions configured in jobs.
|
static String |
getVulnerabilityInfoString(com.contrastsecurity.models.Traces traces)
Number of traces by severity
|
static hudson.util.ListBoxModel |
getVulnerabilityTypes(String teamServerProfileName)
The vulnerability types for a profile
|
static void |
logMessage(hudson.model.TaskListener listener,
String msg)
Helper method for logging messages.
|
static List<App> |
saveApplicationIds(com.contrastsecurity.sdk.ContrastSDK sdk,
String organizationUuid)
Retrieves the applications
|
static List<VulnerabilityType> |
saveRules(com.contrastsecurity.sdk.ContrastSDK sdk,
String organizationUuid)
Retrieves the enabled rules for an organization
|
public static final String EMPTY_SELECT
public static com.contrastsecurity.sdk.ContrastSDK createSDK(String username, String serviceKey, String apiKey, String teamServerUrl)
public static TeamServerProfile getProfile(String profileName)
public static List<GlobalThresholdCondition> getGlobalThresholdConditions(String profileName)
public static List<ThresholdCondition> getThresholdConditions(List<ThresholdCondition> thresholdConditions, List<GlobalThresholdCondition> globalThresholdConditions)
thresholdConditions - globalThresholdConditions - public static void logMessage(hudson.model.TaskListener listener,
String msg)
listener - Listenermsg - String to logpublic static EnumSet<com.contrastsecurity.http.RuleSeverity> getSeverityList(String severity)
severity - include severity to filter with severity list withpublic static List<VulnerabilityType> saveRules(com.contrastsecurity.sdk.ContrastSDK sdk, String organizationUuid)
sdk - Contrast SDK objectorganizationUuid - uuid of the organizationpublic static hudson.util.ListBoxModel getSeverityListBoxModel()
public static hudson.util.ListBoxModel getProfileNames()
public static hudson.util.ListBoxModel getVulnerabilityTypes(String teamServerProfileName)
teamServerProfileName - Name of the profilepublic static hudson.util.ListBoxModel getAgentTypeListBoxModel()
public static com.contrastsecurity.models.AgentType getAgentTypeFromString(String type)
public static String buildAppVersionTag(hudson.model.Run<?,?> build)
public static String buildAppVersionTag(hudson.model.Run<?,?> build, String applicationId)
public static String buildAppVersionTagHierarchical(hudson.model.Run<?,?> build, String applicationId)
public static String getVulnerabilityInfoString(com.contrastsecurity.models.Traces traces)
traces - public static hudson.util.ListBoxModel getApplicationIds(String teamServerProfileName)
teamServerProfileName - Name of the profileCopyright © 2016–2018. All rights reserved.