io.github.algomaster99.terminator.commons.cyclonedx.Vulnerability Maven / Gradle / Ivy
package io.github.algomaster99.terminator.commons.cyclonedx;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
/**
* Vulnerability
*
* Defines a weakness in a component or service that could be exploited or triggered by a threat source.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"bom-ref",
"id",
"source",
"references",
"ratings",
"cwes",
"description",
"detail",
"recommendation",
"workaround",
"proofOfConcept",
"advisories",
"created",
"published",
"updated",
"rejected",
"credits",
"tools",
"analysis",
"affects",
"properties"
})
@Generated("jsonschema2pojo")
public class Vulnerability {
/**
* Identifier for referable and therefore interlink-able elements.value SHOULD not start with the BOM-Link intro 'urn:cdx:'
*
*/
@JsonProperty("bom-ref")
@JsonPropertyDescription("Identifier for referable and therefore interlink-able elements.")
private String bomRef;
/**
* ID
*
* The identifier that uniquely identifies the vulnerability.
*
*/
@JsonProperty("id")
@JsonPropertyDescription("The identifier that uniquely identifies the vulnerability.")
private String id;
/**
* Source
*
* The source of vulnerability information. This is often the organization that published the vulnerability.
*
*/
@JsonProperty("source")
@JsonPropertyDescription("The source of vulnerability information. This is often the organization that published the vulnerability.")
private VulnerabilitySource source;
/**
* References
*
* Zero or more pointers to vulnerabilities that are the equivalent of the vulnerability specified. Often times, the same vulnerability may exist in multiple sources of vulnerability intelligence, but have different identifiers. References provide a way to correlate vulnerabilities across multiple sources of vulnerability intelligence.
*
*/
@JsonProperty("references")
@JsonPropertyDescription("Zero or more pointers to vulnerabilities that are the equivalent of the vulnerability specified. Often times, the same vulnerability may exist in multiple sources of vulnerability intelligence, but have different identifiers. References provide a way to correlate vulnerabilities across multiple sources of vulnerability intelligence.")
private List references = new ArrayList();
/**
* Ratings
*
* List of vulnerability ratings
*
*/
@JsonProperty("ratings")
@JsonPropertyDescription("List of vulnerability ratings")
private List ratings = new ArrayList();
/**
* CWEs
*
* List of Common Weaknesses Enumerations (CWEs) codes that describes this vulnerability. For example 399 (of https://cwe.mitre.org/data/definitions/399.html)
*
*/
@JsonProperty("cwes")
@JsonPropertyDescription("List of Common Weaknesses Enumerations (CWEs) codes that describes this vulnerability. For example 399 (of https://cwe.mitre.org/data/definitions/399.html)")
private List cwes = new ArrayList();
/**
* Description
*
* A description of the vulnerability as provided by the source.
*
*/
@JsonProperty("description")
@JsonPropertyDescription("A description of the vulnerability as provided by the source.")
private String description;
/**
* Details
*
* If available, an in-depth description of the vulnerability as provided by the source organization. Details often include information useful in understanding root cause.
*
*/
@JsonProperty("detail")
@JsonPropertyDescription("If available, an in-depth description of the vulnerability as provided by the source organization. Details often include information useful in understanding root cause.")
private String detail;
/**
* Recommendation
*
* Recommendations of how the vulnerability can be remediated or mitigated.
*
*/
@JsonProperty("recommendation")
@JsonPropertyDescription("Recommendations of how the vulnerability can be remediated or mitigated.")
private String recommendation;
/**
* Workarounds
*
* A bypass, usually temporary, of the vulnerability that reduces its likelihood and/or impact. Workarounds often involve changes to configuration or deployments.
*
*/
@JsonProperty("workaround")
@JsonPropertyDescription("A bypass, usually temporary, of the vulnerability that reduces its likelihood and/or impact. Workarounds often involve changes to configuration or deployments.")
private String workaround;
/**
* Proof of Concept
*
* Evidence used to reproduce the vulnerability.
*
*/
@JsonProperty("proofOfConcept")
@JsonPropertyDescription("Evidence used to reproduce the vulnerability.")
private ProofOfConcept proofOfConcept;
/**
* Advisories
*
* Published advisories of the vulnerability if provided.
*
*/
@JsonProperty("advisories")
@JsonPropertyDescription("Published advisories of the vulnerability if provided.")
private List advisories = new ArrayList();
/**
* Created
*
* The date and time (timestamp) when the vulnerability record was created in the vulnerability database.
*
*/
@JsonProperty("created")
@JsonPropertyDescription("The date and time (timestamp) when the vulnerability record was created in the vulnerability database.")
private Date created;
/**
* Published
*
* The date and time (timestamp) when the vulnerability record was first published.
*
*/
@JsonProperty("published")
@JsonPropertyDescription("The date and time (timestamp) when the vulnerability record was first published.")
private Date published;
/**
* Updated
*
* The date and time (timestamp) when the vulnerability record was last updated.
*
*/
@JsonProperty("updated")
@JsonPropertyDescription("The date and time (timestamp) when the vulnerability record was last updated.")
private Date updated;
/**
* Rejected
*
* The date and time (timestamp) when the vulnerability record was rejected (if applicable).
*
*/
@JsonProperty("rejected")
@JsonPropertyDescription("The date and time (timestamp) when the vulnerability record was rejected (if applicable).")
private Date rejected;
/**
* Credits
*
* Individuals or organizations credited with the discovery of the vulnerability.
*
*/
@JsonProperty("credits")
@JsonPropertyDescription("Individuals or organizations credited with the discovery of the vulnerability.")
private Credits credits;
@JsonProperty("tools")
private Object tools;
/**
* Impact Analysis
*
* An assessment of the impact and exploitability of the vulnerability.
*
*/
@JsonProperty("analysis")
@JsonPropertyDescription("An assessment of the impact and exploitability of the vulnerability.")
private Analysis analysis;
/**
* Affects
*
* The components or services that are affected by the vulnerability.
*
*/
@JsonProperty("affects")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("The components or services that are affected by the vulnerability.")
private Set affects = new LinkedHashSet();
/**
* Properties
*
* Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.
*
*/
@JsonProperty("properties")
@JsonPropertyDescription("Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.")
private List properties = new ArrayList();
/**
* Identifier for referable and therefore interlink-able elements.value SHOULD not start with the BOM-Link intro 'urn:cdx:'
*
*/
@JsonProperty("bom-ref")
public String getBomRef() {
return bomRef;
}
/**
* Identifier for referable and therefore interlink-able elements.value SHOULD not start with the BOM-Link intro 'urn:cdx:'
*
*/
@JsonProperty("bom-ref")
public void setBomRef(String bomRef) {
this.bomRef = bomRef;
}
/**
* ID
*
* The identifier that uniquely identifies the vulnerability.
*
*/
@JsonProperty("id")
public String getId() {
return id;
}
/**
* ID
*
* The identifier that uniquely identifies the vulnerability.
*
*/
@JsonProperty("id")
public void setId(String id) {
this.id = id;
}
/**
* Source
*
* The source of vulnerability information. This is often the organization that published the vulnerability.
*
*/
@JsonProperty("source")
public VulnerabilitySource getSource() {
return source;
}
/**
* Source
*
* The source of vulnerability information. This is often the organization that published the vulnerability.
*
*/
@JsonProperty("source")
public void setSource(VulnerabilitySource source) {
this.source = source;
}
/**
* References
*
* Zero or more pointers to vulnerabilities that are the equivalent of the vulnerability specified. Often times, the same vulnerability may exist in multiple sources of vulnerability intelligence, but have different identifiers. References provide a way to correlate vulnerabilities across multiple sources of vulnerability intelligence.
*
*/
@JsonProperty("references")
public List getReferences() {
return references;
}
/**
* References
*
* Zero or more pointers to vulnerabilities that are the equivalent of the vulnerability specified. Often times, the same vulnerability may exist in multiple sources of vulnerability intelligence, but have different identifiers. References provide a way to correlate vulnerabilities across multiple sources of vulnerability intelligence.
*
*/
@JsonProperty("references")
public void setReferences(List references) {
this.references = references;
}
/**
* Ratings
*
* List of vulnerability ratings
*
*/
@JsonProperty("ratings")
public List getRatings() {
return ratings;
}
/**
* Ratings
*
* List of vulnerability ratings
*
*/
@JsonProperty("ratings")
public void setRatings(List ratings) {
this.ratings = ratings;
}
/**
* CWEs
*
* List of Common Weaknesses Enumerations (CWEs) codes that describes this vulnerability. For example 399 (of https://cwe.mitre.org/data/definitions/399.html)
*
*/
@JsonProperty("cwes")
public List getCwes() {
return cwes;
}
/**
* CWEs
*
* List of Common Weaknesses Enumerations (CWEs) codes that describes this vulnerability. For example 399 (of https://cwe.mitre.org/data/definitions/399.html)
*
*/
@JsonProperty("cwes")
public void setCwes(List cwes) {
this.cwes = cwes;
}
/**
* Description
*
* A description of the vulnerability as provided by the source.
*
*/
@JsonProperty("description")
public String getDescription() {
return description;
}
/**
* Description
*
* A description of the vulnerability as provided by the source.
*
*/
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
/**
* Details
*
* If available, an in-depth description of the vulnerability as provided by the source organization. Details often include information useful in understanding root cause.
*
*/
@JsonProperty("detail")
public String getDetail() {
return detail;
}
/**
* Details
*
* If available, an in-depth description of the vulnerability as provided by the source organization. Details often include information useful in understanding root cause.
*
*/
@JsonProperty("detail")
public void setDetail(String detail) {
this.detail = detail;
}
/**
* Recommendation
*
* Recommendations of how the vulnerability can be remediated or mitigated.
*
*/
@JsonProperty("recommendation")
public String getRecommendation() {
return recommendation;
}
/**
* Recommendation
*
* Recommendations of how the vulnerability can be remediated or mitigated.
*
*/
@JsonProperty("recommendation")
public void setRecommendation(String recommendation) {
this.recommendation = recommendation;
}
/**
* Workarounds
*
* A bypass, usually temporary, of the vulnerability that reduces its likelihood and/or impact. Workarounds often involve changes to configuration or deployments.
*
*/
@JsonProperty("workaround")
public String getWorkaround() {
return workaround;
}
/**
* Workarounds
*
* A bypass, usually temporary, of the vulnerability that reduces its likelihood and/or impact. Workarounds often involve changes to configuration or deployments.
*
*/
@JsonProperty("workaround")
public void setWorkaround(String workaround) {
this.workaround = workaround;
}
/**
* Proof of Concept
*
* Evidence used to reproduce the vulnerability.
*
*/
@JsonProperty("proofOfConcept")
public ProofOfConcept getProofOfConcept() {
return proofOfConcept;
}
/**
* Proof of Concept
*
* Evidence used to reproduce the vulnerability.
*
*/
@JsonProperty("proofOfConcept")
public void setProofOfConcept(ProofOfConcept proofOfConcept) {
this.proofOfConcept = proofOfConcept;
}
/**
* Advisories
*
* Published advisories of the vulnerability if provided.
*
*/
@JsonProperty("advisories")
public List getAdvisories() {
return advisories;
}
/**
* Advisories
*
* Published advisories of the vulnerability if provided.
*
*/
@JsonProperty("advisories")
public void setAdvisories(List advisories) {
this.advisories = advisories;
}
/**
* Created
*
* The date and time (timestamp) when the vulnerability record was created in the vulnerability database.
*
*/
@JsonProperty("created")
public Date getCreated() {
return created;
}
/**
* Created
*
* The date and time (timestamp) when the vulnerability record was created in the vulnerability database.
*
*/
@JsonProperty("created")
public void setCreated(Date created) {
this.created = created;
}
/**
* Published
*
* The date and time (timestamp) when the vulnerability record was first published.
*
*/
@JsonProperty("published")
public Date getPublished() {
return published;
}
/**
* Published
*
* The date and time (timestamp) when the vulnerability record was first published.
*
*/
@JsonProperty("published")
public void setPublished(Date published) {
this.published = published;
}
/**
* Updated
*
* The date and time (timestamp) when the vulnerability record was last updated.
*
*/
@JsonProperty("updated")
public Date getUpdated() {
return updated;
}
/**
* Updated
*
* The date and time (timestamp) when the vulnerability record was last updated.
*
*/
@JsonProperty("updated")
public void setUpdated(Date updated) {
this.updated = updated;
}
/**
* Rejected
*
* The date and time (timestamp) when the vulnerability record was rejected (if applicable).
*
*/
@JsonProperty("rejected")
public Date getRejected() {
return rejected;
}
/**
* Rejected
*
* The date and time (timestamp) when the vulnerability record was rejected (if applicable).
*
*/
@JsonProperty("rejected")
public void setRejected(Date rejected) {
this.rejected = rejected;
}
/**
* Credits
*
* Individuals or organizations credited with the discovery of the vulnerability.
*
*/
@JsonProperty("credits")
public Credits getCredits() {
return credits;
}
/**
* Credits
*
* Individuals or organizations credited with the discovery of the vulnerability.
*
*/
@JsonProperty("credits")
public void setCredits(Credits credits) {
this.credits = credits;
}
@JsonProperty("tools")
public Object getTools() {
return tools;
}
@JsonProperty("tools")
public void setTools(Object tools) {
this.tools = tools;
}
/**
* Impact Analysis
*
* An assessment of the impact and exploitability of the vulnerability.
*
*/
@JsonProperty("analysis")
public Analysis getAnalysis() {
return analysis;
}
/**
* Impact Analysis
*
* An assessment of the impact and exploitability of the vulnerability.
*
*/
@JsonProperty("analysis")
public void setAnalysis(Analysis analysis) {
this.analysis = analysis;
}
/**
* Affects
*
* The components or services that are affected by the vulnerability.
*
*/
@JsonProperty("affects")
public Set getAffects() {
return affects;
}
/**
* Affects
*
* The components or services that are affected by the vulnerability.
*
*/
@JsonProperty("affects")
public void setAffects(Set affects) {
this.affects = affects;
}
/**
* Properties
*
* Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.
*
*/
@JsonProperty("properties")
public List getProperties() {
return properties;
}
/**
* Properties
*
* Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.
*
*/
@JsonProperty("properties")
public void setProperties(List properties) {
this.properties = properties;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Vulnerability.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("bomRef");
sb.append('=');
sb.append(((this.bomRef == null)?"":this.bomRef));
sb.append(',');
sb.append("id");
sb.append('=');
sb.append(((this.id == null)?"":this.id));
sb.append(',');
sb.append("source");
sb.append('=');
sb.append(((this.source == null)?"":this.source));
sb.append(',');
sb.append("references");
sb.append('=');
sb.append(((this.references == null)?"":this.references));
sb.append(',');
sb.append("ratings");
sb.append('=');
sb.append(((this.ratings == null)?"":this.ratings));
sb.append(',');
sb.append("cwes");
sb.append('=');
sb.append(((this.cwes == null)?"":this.cwes));
sb.append(',');
sb.append("description");
sb.append('=');
sb.append(((this.description == null)?"":this.description));
sb.append(',');
sb.append("detail");
sb.append('=');
sb.append(((this.detail == null)?"":this.detail));
sb.append(',');
sb.append("recommendation");
sb.append('=');
sb.append(((this.recommendation == null)?"":this.recommendation));
sb.append(',');
sb.append("workaround");
sb.append('=');
sb.append(((this.workaround == null)?"":this.workaround));
sb.append(',');
sb.append("proofOfConcept");
sb.append('=');
sb.append(((this.proofOfConcept == null)?"":this.proofOfConcept));
sb.append(',');
sb.append("advisories");
sb.append('=');
sb.append(((this.advisories == null)?"":this.advisories));
sb.append(',');
sb.append("created");
sb.append('=');
sb.append(((this.created == null)?"":this.created));
sb.append(',');
sb.append("published");
sb.append('=');
sb.append(((this.published == null)?"":this.published));
sb.append(',');
sb.append("updated");
sb.append('=');
sb.append(((this.updated == null)?"":this.updated));
sb.append(',');
sb.append("rejected");
sb.append('=');
sb.append(((this.rejected == null)?"":this.rejected));
sb.append(',');
sb.append("credits");
sb.append('=');
sb.append(((this.credits == null)?"":this.credits));
sb.append(',');
sb.append("tools");
sb.append('=');
sb.append(((this.tools == null)?"":this.tools));
sb.append(',');
sb.append("analysis");
sb.append('=');
sb.append(((this.analysis == null)?"":this.analysis));
sb.append(',');
sb.append("affects");
sb.append('=');
sb.append(((this.affects == null)?"":this.affects));
sb.append(',');
sb.append("properties");
sb.append('=');
sb.append(((this.properties == null)?"":this.properties));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.advisories == null)? 0 :this.advisories.hashCode()));
result = ((result* 31)+((this.references == null)? 0 :this.references.hashCode()));
result = ((result* 31)+((this.rejected == null)? 0 :this.rejected.hashCode()));
result = ((result* 31)+((this.created == null)? 0 :this.created.hashCode()));
result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
result = ((result* 31)+((this.recommendation == null)? 0 :this.recommendation.hashCode()));
result = ((result* 31)+((this.affects == null)? 0 :this.affects.hashCode()));
result = ((result* 31)+((this.source == null)? 0 :this.source.hashCode()));
result = ((result* 31)+((this.published == null)? 0 :this.published.hashCode()));
result = ((result* 31)+((this.cwes == null)? 0 :this.cwes.hashCode()));
result = ((result* 31)+((this.analysis == null)? 0 :this.analysis.hashCode()));
result = ((result* 31)+((this.tools == null)? 0 :this.tools.hashCode()));
result = ((result* 31)+((this.workaround == null)? 0 :this.workaround.hashCode()));
result = ((result* 31)+((this.credits == null)? 0 :this.credits.hashCode()));
result = ((result* 31)+((this.ratings == null)? 0 :this.ratings.hashCode()));
result = ((result* 31)+((this.bomRef == null)? 0 :this.bomRef.hashCode()));
result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
result = ((result* 31)+((this.detail == null)? 0 :this.detail.hashCode()));
result = ((result* 31)+((this.updated == null)? 0 :this.updated.hashCode()));
result = ((result* 31)+((this.properties == null)? 0 :this.properties.hashCode()));
result = ((result* 31)+((this.proofOfConcept == null)? 0 :this.proofOfConcept.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Vulnerability) == false) {
return false;
}
Vulnerability rhs = ((Vulnerability) other);
return ((((((((((((((((((((((this.advisories == rhs.advisories)||((this.advisories!= null)&&this.advisories.equals(rhs.advisories)))&&((this.references == rhs.references)||((this.references!= null)&&this.references.equals(rhs.references))))&&((this.rejected == rhs.rejected)||((this.rejected!= null)&&this.rejected.equals(rhs.rejected))))&&((this.created == rhs.created)||((this.created!= null)&&this.created.equals(rhs.created))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.recommendation == rhs.recommendation)||((this.recommendation!= null)&&this.recommendation.equals(rhs.recommendation))))&&((this.affects == rhs.affects)||((this.affects!= null)&&this.affects.equals(rhs.affects))))&&((this.source == rhs.source)||((this.source!= null)&&this.source.equals(rhs.source))))&&((this.published == rhs.published)||((this.published!= null)&&this.published.equals(rhs.published))))&&((this.cwes == rhs.cwes)||((this.cwes!= null)&&this.cwes.equals(rhs.cwes))))&&((this.analysis == rhs.analysis)||((this.analysis!= null)&&this.analysis.equals(rhs.analysis))))&&((this.tools == rhs.tools)||((this.tools!= null)&&this.tools.equals(rhs.tools))))&&((this.workaround == rhs.workaround)||((this.workaround!= null)&&this.workaround.equals(rhs.workaround))))&&((this.credits == rhs.credits)||((this.credits!= null)&&this.credits.equals(rhs.credits))))&&((this.ratings == rhs.ratings)||((this.ratings!= null)&&this.ratings.equals(rhs.ratings))))&&((this.bomRef == rhs.bomRef)||((this.bomRef!= null)&&this.bomRef.equals(rhs.bomRef))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.detail == rhs.detail)||((this.detail!= null)&&this.detail.equals(rhs.detail))))&&((this.updated == rhs.updated)||((this.updated!= null)&&this.updated.equals(rhs.updated))))&&((this.properties == rhs.properties)||((this.properties!= null)&&this.properties.equals(rhs.properties))))&&((this.proofOfConcept == rhs.proofOfConcept)||((this.proofOfConcept!= null)&&this.proofOfConcept.equals(rhs.proofOfConcept))));
}
}