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 classstatic enumstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WizScannerResultfromJsonFile(FilePath jsonFile) Creates a WizScannerResult from a JSON fileintGets the count of critical severity matches from scan statistics.intGets the count of high severity matches from scan statistics.intGets the count of informational severity matches from scan statistics.intGets the count of low severity matches from scan statistics.intGets the count of medium severity matches from scan statistics.intGets the count of critical severity secrets.intGets the count of high severity secrets.intGets the count of informational severity secrets.intGets the count of low severity secrets.intGets the count of medium severity secrets.intGets the count of critical vulnerabilities.intGets the count of high severity vulnerabilities.intGets the count of info severity vulnerabilities.intGets the count of low severity vulnerabilities.intGets the count of medium severity vulnerabilities.static WizScannerResultparseJsonContent(net.sf.json.JSONObject root) Parses a WizScannerResult from a JSON objectvoidsetReportUrl(String url) voidsetScannedResource(String resource) voidvoidsetScanTime(String time) voidsetSecrets(WizScannerResult.Secrets secrets) voidsetStatus(WizScannerResult.ScanStatus status) voidtoString()
-
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
-