org.spdx.spdx_to_osv.osvmodel.OsvAffected Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spdx-to-osv Show documentation
Show all versions of spdx-to-osv Show documentation
Produces an OSV vulnerability JSON report from an SPDX file
/**
* SPDX-License-Identifier: Apache-2.0
* Copyright (c) 2021 Source Auditor Inc.
*/
package org.spdx.spdx_to_osv.osvmodel;
import java.util.List;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
/**
* OSV Affected object as described at https://docs.google.com/document/d/1sylBGNooKtf220RHQn1I8pZRmqXZQADDQ_TOABrKTpA/edit
*
* @author Gary O'Neall
*/
public class OsvAffected {
/**
* Package information and version.
*/
@SerializedName(value="package")
OsvPackage osvPackage;
/**
* Required. Range information.
*/
List ranges;
/**
* Optional. List of affected versions.
*/
List versions;
/**
* Optional. JSON object holding additional information about the vulnerability
* as defined by the ecosystem for which the record applies.
*/
JsonObject ecosystemSpecific;
/**
* Optional. JSON object holding additional information about the vulnerability
* as defined by the database for which the record applies.
*/
JsonObject databaseSpecific;
/**
* Required empty constructor
*/
public OsvAffected() {
}
/**
* @return the osvPackage
*/
public OsvPackage getOsvPackage() {
return osvPackage;
}
/**
* @param osvPackage the osvPackage to set
*/
public void setOsvPackage(OsvPackage osvPackage) {
this.osvPackage = osvPackage;
}
/**
* @return the ranges
*/
public List getRanges() {
return ranges;
}
/**
* @param ranges the ranges to set
*/
public void setRanges(List ranges) {
this.ranges = ranges;
}
/**
* @return the versions
*/
public List getVersions() {
return versions;
}
/**
* @param versions the versions to set
*/
public void setVersions(List versions) {
this.versions = versions;
}
/**
* @return the ecosystemSpecific
*/
public JsonObject getEcosystemSpecific() {
return ecosystemSpecific;
}
/**
* @param ecosystemSpecific the ecosystemSpecific to set
*/
public void setEcosystemSpecific(JsonObject ecosystemSpecific) {
this.ecosystemSpecific = ecosystemSpecific;
}
/**
* @return the databaseSpecific
*/
public JsonObject getDatabaseSpecific() {
return databaseSpecific;
}
/**
* @param databaseSpecific the databaseSpecific to set
*/
public void setDatabaseSpecific(JsonObject databaseSpecific) {
this.databaseSpecific = databaseSpecific;
}
}