Class DynamicAnalysisResultsAction

    • Constructor Detail

      • DynamicAnalysisResultsAction

        public DynamicAnalysisResultsAction()
        Constructor for DynamicAnalysisResultsAction.
      • DynamicAnalysisResultsAction

        public DynamicAnalysisResultsAction​(DAScanHistory scanHistory,
                                            String xmlApiHost)
        Constructor for DynamicAnalysisResultsAction.
        Parameters:
        scanHistory - a DAScanHistory 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 interface Action
        Returns:
        URI to the 24x24 Veracode logo icon
      • onLoad

        public void onLoad​(Run<?,​?> r)
        Specified by:
        onLoad in interface RunAction2
      • 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 - a StaplerRequest object.
        response - a StaplerResponse 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