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 Details

    • SecurityVulnerabilityDescriptor

      public SecurityVulnerabilityDescriptor()
  • Method Details

    • setId

      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

      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

      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:
      true when the extension has some known vulnerabilities, but all are reviewed as safe, false otherwise
      Since:
      15.6RC1
    • setSafe

      @Unstable public SecurityVulnerabilityDescriptor setSafe(boolean safe)
      Parameters:
      safe - true when the extension has some known vulnerabilities, but all are reviewed as safe, false otherwise
      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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object