Class SecurityVulnerabilityDescriptor
- java.lang.Object
-
- org.xwiki.extension.index.security.SecurityVulnerabilityDescriptor
-
@Unstable public class SecurityVulnerabilityDescriptor extends Object
An individual security vulnerability descriptor.- Since:
- 15.5RC1
- Version:
- $Id: 0896bb057c9a25b6146872684744d01583c267bd $
-
-
Constructor Summary
Constructors Constructor Description SecurityVulnerabilityDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Set<String>getAliases()Retrieves the set of aliases associated with the current object.org.xwiki.extension.version.VersiongetFixVersion()StringgetId()StringgetReviews()doublegetScore()StringgetURL()inthashCode()booleanisSafe()SecurityVulnerabilityDescriptorsetAliases(Set<String> aliases)Sets the set of aliases associated with the current object.SecurityVulnerabilityDescriptorsetFixVersion(org.xwiki.extension.version.Version fixVersion)SecurityVulnerabilityDescriptorsetId(String id)SecurityVulnerabilityDescriptorsetReviews(String reviews)SecurityVulnerabilityDescriptorsetSafe(boolean safe)SecurityVulnerabilityDescriptorsetScore(double score)SecurityVulnerabilityDescriptorsetSeverityScore(String vector)Compute and store the score from the provided CVSS vector.SecurityVulnerabilityDescriptorsetURL(String url)StringtoString()
-
-
-
Method Detail
-
setId
public SecurityVulnerabilityDescriptor setId(String id)
- Parameters:
id- the security vulnerability id, by default a CVE id, or another id if no CVE is found- Returns:
- the current object
-
getId
public String getId()
- Returns:
- the security vulnerability id, by default a CVE id, or another id if no CVE is found
-
setURL
public SecurityVulnerabilityDescriptor setURL(String url)
- Parameters:
url- an external URL providing more details on the vulnerability- Returns:
- the current object
-
getURL
public String getURL()
- Returns:
- an external URL providing more details on the vulnerability
-
setSeverityScore
public SecurityVulnerabilityDescriptor setSeverityScore(String vector)
Compute and store the score from the provided CVSS vector.- Parameters:
vector- a CVSS vector to parse and compute the based score from- Returns:
- the current object
- See Also:
getScore()
-
getScore
public double getScore()
- Returns:
- the CVSS score of the security vulnerability
-
setScore
public SecurityVulnerabilityDescriptor setScore(double score)
- Parameters:
score- the CVSS score of the security vulnerability- Returns:
- the current object
-
getFixVersion
public org.xwiki.extension.version.Version getFixVersion()
- Returns:
- the minimal version to which to upgrade to get the issue fixed automatically
-
setFixVersion
public SecurityVulnerabilityDescriptor setFixVersion(org.xwiki.extension.version.Version fixVersion)
- Parameters:
fixVersion- the minimal version to which to upgrade to get the issue fixed automatically- Returns:
- the current object
-
isSafe
@Unstable public boolean isSafe()
- Returns:
truewhen the extension has some known vulnerabilities, but all are reviewed as safe,falseotherwise- Since:
- 15.6RC1
-
setSafe
@Unstable public SecurityVulnerabilityDescriptor setSafe(boolean safe)
- Parameters:
safe-truewhen the extension has some known vulnerabilities, but all are reviewed as safe,falseotherwise- Returns:
- the current object
- Since:
- 15.6RC1
-
getReviews
@Unstable public String getReviews()
- Returns:
- the ignored vulnerabilities description, this is an html content containing all the false-positive analysis
- Since:
- 15.6RC1
-
setReviews
@Unstable public SecurityVulnerabilityDescriptor setReviews(String reviews)
- Parameters:
reviews- the ignored vulnerabilities description, this is an html content containing all the false-positive analysis- Returns:
- the current object
- Since:
- 15.6RC1
-
getAliases
@Unstable public Set<String> getAliases()
Retrieves the set of aliases associated with the current object.- Returns:
- a set of aliases, used for vulnerability comparison, two vulnerabilities sharing an alias or an id are considered equals
- Since:
- 15.9RC1, 15.5.4
-
setAliases
public SecurityVulnerabilityDescriptor setAliases(Set<String> aliases)
Sets the set of aliases associated with the current object.- Parameters:
aliases- a set of aliases, used for vulnerability comparison, two vulnerabilities sharing an alias or an id are considered equals- Returns:
- the current object
- Since:
- 15.9RC1, 15.5.4
-
-