Package com.veracode.jenkins.plugin
Class DynamicAnalysisResultsAction
- java.lang.Object
-
- com.veracode.jenkins.plugin.DynamicAnalysisResultsAction
-
- All Implemented Interfaces:
Action
,ModelObject
,RunAction2
public class DynamicAnalysisResultsAction extends Object implements RunAction2
This class represents the post build Veracode step on the build page.
-
-
Constructor Summary
Constructors Constructor Description DynamicAnalysisResultsAction()
Constructor for DynamicAnalysisResultsAction.DynamicAnalysisResultsAction(DAScanHistory scanHistory, String xmlApiHost)
Constructor for DynamicAnalysisResultsAction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doGraph(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Creates a trend chart with scan history.int
getAnalysisScore()
Run<?,?>
getBuild()
String
getDetailedReportURLForHTMLAttr()
Get the URL to the Detailed Report for this scan that is escaped for HTML attributeString
getDisplayName()
String
getFlawsCount(int severity)
List<Map<String,Long>>
getFlawsCountHistory()
int
getFlawsCountInt(int severity)
String
getIconFileName()
Used by Jenkins framework to display our logo on the left panel on the build page.String
getNetChange(int severity)
String
getNewFlaws(int severity)
String
getOpenNewWindow16()
Use by index.jelly for DynamicAnalysisResultsAction to display the open new window iconboolean
getPolicyAffection(int severity)
Get if the each severity level contains flaws which affect policy complianceString
getPolicyComplianceComponentIconUri(boolean isViolatedPolicy)
Used by index.jelly for DynamicResultsAction to display the policy compliance iconString
getPolicyComplianceStatus()
Get the policy compliance statusString
getPolicyComplianceStatusForHTML()
Get the policy compliance status for displaying in HTML Note that the "PASS" status is returned as "Passed" for displaying purpose.String
getPolicyComplianceStatusIconUri16()
Used by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon (16x16).String
getPolicyComplianceStatusIconUri24()
Use by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon (24x24)String
getPolicyComplianceStatusIconUri32()
Used by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon (32x32).String
getPolicyComplianceStatusIconUri48()
Used by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon.String
getPolicyName()
Get the policy nameString
getPolicyNameForHTML()
Get the policy name suitable for displaying in HTMLString
getScanOverdueStatus()
int
getTotalFlawsCount()
int
getTotalNetChangeCount()
int
getTotalNewFlawsCount()
String
getUrlName()
String
getVeracodeLevel()
Get the Veracode levelString
getVeracodeLevelForHTML()
Get the Veracode level to be displayed in HTMLString
getVeracodeLogo48()
Used by summary.jelly for DynamicAnalysisResultsAction to display our logo.boolean
isScanHistoryAvailable()
boolean
isStaticSevLevelMitigated(int severity)
Find out if the flaw count of the given severity is lower than the actual count due to mitigationvoid
onAttached(Run<?,?> r)
void
onLoad(Run<?,?> r)
-
-
-
Constructor Detail
-
DynamicAnalysisResultsAction
public DynamicAnalysisResultsAction()
Constructor for DynamicAnalysisResultsAction.
-
DynamicAnalysisResultsAction
public DynamicAnalysisResultsAction(DAScanHistory scanHistory, String xmlApiHost)
Constructor for DynamicAnalysisResultsAction.- Parameters:
scanHistory
- aDAScanHistory
object.xmlApiHost
- the object to store the specific region url
-
-
Method Detail
-
getIconFileName
public String getIconFileName()
Used by Jenkins framework to display our logo on the left panel on the build page.- Specified by:
getIconFileName
in interfaceAction
- Returns:
- URI to the 24x24 Veracode logo icon
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
onAttached
public void onAttached(Run<?,?> r)
- Specified by:
onAttached
in interfaceRunAction2
-
onLoad
public void onLoad(Run<?,?> r)
- Specified by:
onLoad
in interfaceRunAction2
-
getPolicyName
public String getPolicyName()
Get the policy name- Returns:
- the policy name
-
getPolicyNameForHTML
public String getPolicyNameForHTML()
Get the policy name suitable for displaying in HTML- Returns:
- policy name escaped for HTML
-
getPolicyComplianceStatus
public String getPolicyComplianceStatus()
Get the policy compliance status- Returns:
- policy compliance status
-
getPolicyComplianceStatusForHTML
public String getPolicyComplianceStatusForHTML()
Get the policy compliance status for displaying in HTML Note that the "PASS" status is returned as "Passed" for displaying purpose.- Returns:
- policy compliance status escaped for HTML
-
getVeracodeLevel
public String getVeracodeLevel()
Get the Veracode level- Returns:
- Veracode level
-
getVeracodeLevelForHTML
public String getVeracodeLevelForHTML()
Get the Veracode level to be displayed in HTML- Returns:
- Veracode level escaped for HTML
-
getAnalysisScore
public int getAnalysisScore()
-
getScanOverdueStatus
public String getScanOverdueStatus()
-
getVeracodeLogo48
public String getVeracodeLogo48()
Used by summary.jelly for DynamicAnalysisResultsAction to display our logo.- Returns:
- URI to the 48x48 Veracode logo icon
-
getPolicyComplianceStatusIconUri16
public String getPolicyComplianceStatusIconUri16()
Used by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon (16x16).- Returns:
- relative URI of the status icon
-
getPolicyComplianceStatusIconUri24
public String getPolicyComplianceStatusIconUri24()
Use by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon (24x24)- Returns:
- relative URI of the status icon
-
getPolicyComplianceStatusIconUri32
public String getPolicyComplianceStatusIconUri32()
Used by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon (32x32).- Returns:
- relative URI of the status icon
-
getPolicyComplianceStatusIconUri48
public String getPolicyComplianceStatusIconUri48()
Used by summary.jelly for DynamicAnalysisResultsAction to display the correct status icon.- Returns:
- relative URI of the status icon
-
getOpenNewWindow16
public String getOpenNewWindow16()
Use by index.jelly for DynamicAnalysisResultsAction to display the open new window icon- Returns:
- String
-
isStaticSevLevelMitigated
public boolean isStaticSevLevelMitigated(int severity)
Find out if the flaw count of the given severity is lower than the actual count due to mitigation- Parameters:
severity
- - A severity level- Returns:
- true if the count is lower due to mitigation, false otherwise.
-
getFlawsCount
public String getFlawsCount(int severity)
-
getFlawsCountInt
public int getFlawsCountInt(int severity)
-
getTotalFlawsCount
public int getTotalFlawsCount()
-
getTotalNewFlawsCount
public int getTotalNewFlawsCount()
-
getTotalNetChangeCount
public int getTotalNetChangeCount()
-
getNetChange
public String getNetChange(int severity)
-
getNewFlaws
public String getNewFlaws(int severity)
-
doGraph
public void doGraph(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Creates a trend chart with scan history.- Parameters:
request
- aStaplerRequest
object.response
- aStaplerResponse
object.
-
getDetailedReportURLForHTMLAttr
public String getDetailedReportURLForHTMLAttr()
Get the URL to the Detailed Report for this scan that is escaped for HTML attribute- Returns:
- Detailed Report URL escaped for HTML attribute
-
isScanHistoryAvailable
public boolean isScanHistoryAvailable()
-
getBuild
public Run<?,?> getBuild()
-
getPolicyAffection
public boolean getPolicyAffection(int severity)
Get if the each severity level contains flaws which affect policy compliance- Parameters:
severity
- - A severity level- Returns:
- policy affection
-
getPolicyComplianceComponentIconUri
public String getPolicyComplianceComponentIconUri(boolean isViolatedPolicy)
Used by index.jelly for DynamicResultsAction to display the policy compliance icon- Parameters:
isViolatedPolicy
- boolean- Returns:
- relative URI of the status icon
-
-