Package io.jenkins.plugins.wiz
Class WizScannerResult
java.lang.Object
io.jenkins.plugins.wiz.WizScannerResult
Represents the results of a Wiz security scan.
This class handles parsing and storing scan results from JSON format.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
static class
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WizScannerResult
fromJsonFile
(FilePath jsonFile) Creates a WizScannerResult from a JSON fileint
Gets the count of critical severity matches from scan statistics.int
Gets the count of high severity matches from scan statistics.int
Gets the count of informational severity matches from scan statistics.int
Gets the count of low severity matches from scan statistics.int
Gets the count of medium severity matches from scan statistics.int
Gets the count of critical severity secrets.int
Gets the count of high severity secrets.int
Gets the count of informational severity secrets.int
Gets the count of low severity secrets.int
Gets the count of medium severity secrets.int
Gets the count of critical vulnerabilities.int
Gets the count of high severity vulnerabilities.int
Gets the count of info severity vulnerabilities.int
Gets the count of low severity vulnerabilities.int
Gets the count of medium severity vulnerabilities.static WizScannerResult
parseJsonContent
(net.sf.json.JSONObject root) Parses a WizScannerResult from a JSON objectvoid
setReportUrl
(String url) void
setScannedResource
(String resource) void
void
setScanTime
(String time) void
setSecrets
(WizScannerResult.Secrets secrets) void
setStatus
(WizScannerResult.ScanStatus status) void
toString()
-
Constructor Details
-
WizScannerResult
public WizScannerResult()
-
-
Method Details
-
getScannedResource
-
setScannedResource
-
getScanTime
-
setScanTime
-
getStatus
-
setStatus
-
getVulnerabilities
-
setVulnerabilities
-
getScanStatistics
-
setScanStatistics
-
getSecrets
-
setSecrets
-
getReportUrl
-
setReportUrl
-
fromJsonFile
Creates a WizScannerResult from a JSON file- Parameters:
jsonFile
- The JSON file to parse- Returns:
- The parsed WizScannerResult or null if parsing fails
-
parseJsonContent
Parses a WizScannerResult from a JSON object- Parameters:
root
- The JSON object to parse- Returns:
- The parsed WizScannerResult or null if parsing fails
-
toString
-
getVulnerabilitiesCriticalCount
public int getVulnerabilitiesCriticalCount()Gets the count of critical vulnerabilities.- Returns:
- The number of critical vulnerabilities found
-
getVulnerabilitiesHighCount
public int getVulnerabilitiesHighCount()Gets the count of high severity vulnerabilities.- Returns:
- The number of high severity vulnerabilities found
-
getVulnerabilitiesMediumCount
public int getVulnerabilitiesMediumCount()Gets the count of medium severity vulnerabilities.- Returns:
- The number of medium severity vulnerabilities found
-
getVulnerabilitiesLowCount
public int getVulnerabilitiesLowCount()Gets the count of low severity vulnerabilities.- Returns:
- The number of low severity vulnerabilities found
-
getVulnerabilitiesInfoCount
public int getVulnerabilitiesInfoCount()Gets the count of info severity vulnerabilities.- Returns:
- The number of info severity vulnerabilities found
-
getScanStatisticsCriticalMatches
public int getScanStatisticsCriticalMatches()Gets the count of critical severity matches from scan statistics.- Returns:
- The number of critical severity matches found
-
getScanStatisticsHighMatches
public int getScanStatisticsHighMatches()Gets the count of high severity matches from scan statistics.- Returns:
- The number of high severity matches found
-
getScanStatisticsMediumMatches
public int getScanStatisticsMediumMatches()Gets the count of medium severity matches from scan statistics.- Returns:
- The number of medium severity matches found
-
getScanStatisticsLowMatches
public int getScanStatisticsLowMatches()Gets the count of low severity matches from scan statistics.- Returns:
- The number of low severity matches found
-
getScanStatisticsInfoMatches
public int getScanStatisticsInfoMatches()Gets the count of informational severity matches from scan statistics.- Returns:
- The number of informational severity matches found
-
getSecretsCriticalCount
public int getSecretsCriticalCount()Gets the count of critical severity secrets.- Returns:
- The number of critical severity secrets found
-
getSecretsHighCount
public int getSecretsHighCount()Gets the count of high severity secrets.- Returns:
- The number of high severity secrets found
-
getSecretsMediumCount
public int getSecretsMediumCount()Gets the count of medium severity secrets.- Returns:
- The number of medium severity secrets found
-
getSecretsLowCount
public int getSecretsLowCount()Gets the count of low severity secrets.- Returns:
- The number of low severity secrets found
-
getSecretsInfoCount
public int getSecretsInfoCount()Gets the count of informational severity secrets.- Returns:
- The number of informational severity secrets found
-