@NotThreadSafe
public class SuppressionRule
extends java.lang.Object
Constructor and Description |
---|
SuppressionRule() |
Modifier and Type | Method and Description |
---|---|
void |
addCpe(PropertyType cpe)
Adds the CPE to the CPE list.
|
void |
addCve(java.lang.String cve)
Adds the CVE to the CVE list.
|
void |
addCvssBelow(java.lang.Double cvss)
Adds the CVSS to the cvssBelow list.
|
void |
addCwe(java.lang.String cwe)
Adds the CWE to the CWE list.
|
void |
addVulnerabilityName(PropertyType name)
Adds the CPE to the CPE list.
|
protected boolean |
cpeHasNoVersion(PropertyType c)
Identifies if the cpe specified by the cpe suppression rule does not
specify a version.
|
java.util.List<PropertyType> |
getCpe()
Get the value of CPE.
|
java.util.List<java.lang.String> |
getCve()
Get the value of CVE.
|
java.util.List<java.lang.Double> |
getCvssBelow()
Get the value of cvssBelow.
|
java.util.List<java.lang.String> |
getCwe()
Get the value of CWE.
|
PropertyType |
getFilePath()
Get the value of filePath.
|
PropertyType |
getGav()
Get the value of Maven GAV.
|
java.lang.String |
getNotes()
Get the value of notes.
|
java.lang.String |
getSha1()
Get the value of sha1.
|
java.util.Calendar |
getUntil()
Get the (@code{nullable}) value of until.
|
boolean |
hasCpe()
Returns whether or not this suppression rule as CPE entries.
|
boolean |
hasCve()
Returns whether this suppression rule has CVE entries.
|
boolean |
hasCvssBelow()
Returns whether or not this suppression rule has CVSS suppression criteria.
|
boolean |
hasCwe()
Returns whether this suppression rule has CWE entries.
|
boolean |
hasGav()
Returns whether or not this suppression rule as GAV entries.
|
boolean |
hasNotes()
Returns whether this suppression rule has notes entries.
|
boolean |
hasPackageUrl()
Returns whether or not this suppression rule as packageUrl entries.
|
boolean |
hasVulnerabilityName()
Returns whether this suppression rule has vulnerabilityName entries.
|
protected boolean |
identifierMatches(PropertyType suppressionEntry,
Identifier identifier)
Determines if the cpeEntry specified as a PropertyType matches the given
Identifier.
|
boolean |
isBase()
Get the value of base.
|
boolean |
isMatched()
Get the value of matched.
|
void |
process(Dependency dependency)
Processes a given dependency to determine if any CPE, CVE, CWE, or CVSS
scores should be suppressed.
|
protected boolean |
purlMatches(PropertyType suppressionEntry,
Identifier identifier)
Determines if the cpeEntry specified as a PropertyType matches the given
Identifier.
|
void |
setBase(boolean base)
Set the value of base.
|
void |
setCpe(java.util.List<PropertyType> cpe)
Set the value of CPE.
|
void |
setCve(java.util.List<java.lang.String> cve)
Set the value of CVE.
|
void |
setCvssBelow(java.util.List<java.lang.Double> cvssBelow)
Set the value of cvssBelow.
|
void |
setCwe(java.util.List<java.lang.String> cwe)
Set the value of CWE.
|
void |
setFilePath(PropertyType filePath)
Set the value of filePath.
|
void |
setGav(PropertyType gav)
Set the value of Maven GAV.
|
void |
setMatched(boolean matched)
Set the value of matched.
|
void |
setNotes(java.lang.String notes)
Set the value of notes.
|
void |
setPackageUrl(PropertyType purl)
Set the value of Package URL.
|
void |
setSha1(java.lang.String sha1)
Set the value of SHA1.
|
void |
setUntil(java.util.Calendar until)
Set the value of until.
|
java.lang.String |
toString()
Standard toString implementation.
|
public boolean isMatched()
public void setMatched(boolean matched)
matched
- new value of matchedpublic java.util.Calendar getUntil()
public void setUntil(java.util.Calendar until)
until
- new value of untilpublic PropertyType getFilePath()
public void setFilePath(PropertyType filePath)
filePath
- new value of filePathpublic java.lang.String getSha1()
public void setSha1(java.lang.String sha1)
sha1
- new value of SHA1public java.util.List<PropertyType> getCpe()
public void setCpe(java.util.List<PropertyType> cpe)
cpe
- new value of CPEpublic void addCpe(PropertyType cpe)
cpe
- the CPE to addpublic void addVulnerabilityName(PropertyType name)
name
- the vulnerability name to addpublic boolean hasCpe()
public java.util.List<java.lang.Double> getCvssBelow()
public void setCvssBelow(java.util.List<java.lang.Double> cvssBelow)
cvssBelow
- new value of cvssBelowpublic void addCvssBelow(java.lang.Double cvss)
cvss
- the CVSS to addpublic boolean hasCvssBelow()
public java.lang.String getNotes()
public void setNotes(java.lang.String notes)
notes
- new value of notespublic boolean hasNotes()
public java.util.List<java.lang.String> getCwe()
public void setCwe(java.util.List<java.lang.String> cwe)
cwe
- new value of CWEpublic void addCwe(java.lang.String cwe)
cwe
- the CWE to addpublic boolean hasCwe()
public java.util.List<java.lang.String> getCve()
public void setCve(java.util.List<java.lang.String> cve)
cve
- new value of CVEpublic void addCve(java.lang.String cve)
cve
- the CVE to addpublic boolean hasCve()
public boolean hasVulnerabilityName()
public PropertyType getGav()
public void setGav(PropertyType gav)
gav
- new value of Maven GAVpublic boolean hasGav()
public void setPackageUrl(PropertyType purl)
purl
- new value of package URLpublic boolean hasPackageUrl()
public boolean isBase()
public void setBase(boolean base)
base
- new value of basepublic void process(Dependency dependency)
dependency
- a project dependency to analyzeprotected boolean cpeHasNoVersion(PropertyType c)
c
- a suppression rule identifierprotected boolean purlMatches(PropertyType suppressionEntry, Identifier identifier)
suppressionEntry
- a suppression rule entryidentifier
- a CPE identifier to checkprotected boolean identifierMatches(PropertyType suppressionEntry, Identifier identifier)
suppressionEntry
- a suppression rule entryidentifier
- a CPE identifier to checkpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright© 2012-21 Jeremy Long. All Rights Reserved.