Skip to content

Commit

Permalink
add cvss base score and vector string to api response (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe authored Sep 17, 2024
1 parent 1c00791 commit d0fbb22
Showing 1 changed file with 49 additions and 5 deletions.
54 changes: 49 additions & 5 deletions src/main/java/io/gardenlinux/glvd/db/SourcePackageCve.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,54 @@ public class SourcePackageCve {
@Column(name = "cve_published_date", nullable = false)
private String cvePublishedDate;

@Column(name = "base_score_v40", nullable = true)
private Float baseScoreV40;

@Column(name = "base_score_v31", nullable = true)
private Float baseScoreV31;

@Column(name = "base_score_v30", nullable = true)
private Float baseScoreV30;

@Column(name = "vector_string_v40", nullable = true)
private String vectorStringV40;

@Column(name = "vector_string_v31", nullable = true)
private String vectorStringV31;

@Column(name = "vector_string_v30", nullable = true)
private String vectorStringV30;

public SourcePackageCve() {
}

public SourcePackageCve(String cveId, @Nonnull String sourcePackageName, @Nonnull String sourcePackageVersion, @Nonnull String gardenlinuxVersion, boolean isVulnerable, @Nonnull String cvePublishedDate) {
public SourcePackageCve(String cveId, String sourcePackageName, String sourcePackageVersion, String gardenlinuxVersion, boolean isVulnerable, String cvePublishedDate, Float baseScoreV40, Float baseScoreV31, Float baseScoreV30, String vectorStringV40, String vectorStringV31, String vectorStringV30) {
this.cveId = cveId;
this.sourcePackageName = sourcePackageName;
this.sourcePackageVersion = sourcePackageVersion;
this.gardenlinuxVersion = gardenlinuxVersion;
this.isVulnerable = isVulnerable;
this.cvePublishedDate = cvePublishedDate;
this.baseScoreV40 = baseScoreV40;
this.baseScoreV31 = baseScoreV31;
this.baseScoreV30 = baseScoreV30;
this.vectorStringV40 = vectorStringV40;
this.vectorStringV31 = vectorStringV31;
this.vectorStringV30 = vectorStringV30;
}

public String getCveId() {
return cveId;
}

@Nonnull
public String getSourcePackageName() {
return sourcePackageName;
}

@Nonnull
public String getSourcePackageVersion() {
return sourcePackageVersion;
}

@Nonnull
public String getGardenlinuxVersion() {
return gardenlinuxVersion;
}
Expand All @@ -63,8 +84,31 @@ public boolean isVulnerable() {
return isVulnerable;
}

@Nonnull
public String getCvePublishedDate() {
return cvePublishedDate;
}

public Float getBaseScoreV40() {
return baseScoreV40;
}

public Float getBaseScoreV31() {
return baseScoreV31;
}

public Float getBaseScoreV30() {
return baseScoreV30;
}

public String getVectorStringV40() {
return vectorStringV40;
}

public String getVectorStringV31() {
return vectorStringV31;
}

public String getVectorStringV30() {
return vectorStringV30;
}
}

0 comments on commit d0fbb22

Please sign in to comment.