@NotThreadSafe public class SuppressionRule extends Object
| Constructor and Description |
|---|
SuppressionRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCpe(PropertyType cpe)
Adds the CPE to the CPE list.
|
void |
addCve(String cve)
Adds the CVE to the CVE list.
|
void |
addCvssBelow(Float cvss)
Adds the CVSS to the cvssBelow list.
|
void |
addCwe(String cwe)
Adds the CWE to the CWE list.
|
void |
addNotes(String notes)
Adds the notes to the cve 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.
|
List<PropertyType> |
getCpe()
Get the value of CPE.
|
List<String> |
getCve()
Get the value of CVE.
|
List<Float> |
getCvssBelow()
Get the value of cvssBelow.
|
List<String> |
getCwe()
Get the value of CWE.
|
PropertyType |
getFilePath()
Get the value of filePath.
|
PropertyType |
getGav()
Get the value of Maven GAV.
|
String |
getNotes()
Get the value of notes.
|
String |
getSha1()
Get the value of sha1.
|
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 suppressions.
|
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.
|
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(List<PropertyType> cpe)
Set the value of CPE.
|
void |
setCve(List<String> cve)
Set the value of CVE.
|
void |
setCvssBelow(List<Float> cvssBelow)
Set the value of cvssBelow.
|
void |
setCwe(List<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 |
setNotes(String notes)
Set the value of notes.
|
void |
setPackageUrl(PropertyType purl)
Set the value of Package URL.
|
void |
setSha1(String sha1)
Set the value of SHA1.
|
void |
setUntil(Calendar until)
Set the value of until.
|
String |
toString()
Standard toString implementation.
|
public Calendar getUntil()
public void setUntil(Calendar until)
until - new value of untilpublic PropertyType getFilePath()
public void setFilePath(PropertyType filePath)
filePath - new value of filePathpublic String getSha1()
public void setSha1(String sha1)
sha1 - new value of SHA1public List<PropertyType> getCpe()
public void setCpe(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 List<Float> getCvssBelow()
public void setCvssBelow(List<Float> cvssBelow)
cvssBelow - new value of cvssBelowpublic void addCvssBelow(Float cvss)
cvss - the CVSS to addpublic boolean hasCvssBelow()
public String getNotes()
public void setNotes(String notes)
notes - new value of cvepublic void addNotes(String notes)
notes - the cve to addpublic boolean hasNotes()
public void setCwe(List<String> cwe)
cwe - new value of CWEpublic void addCwe(String cwe)
cwe - the CWE to addpublic boolean hasCwe()
public void setCve(List<String> cve)
cve - new value of CVEpublic void addCve(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 checkCopyright © 2012–2020 OWASP. All rights reserved.