Skip to content

Commit

Permalink
Show version fixed in cve details page
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe committed Nov 25, 2024
1 parent bee56a9 commit 0edd8cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/io/gardenlinux/glvd/db/CveDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class CveDetails {
@Column(name = "source_package_version", nullable = false)
private List<String> sourcePackageVersion;

@Column(name = "version_fixed", nullable = false)
private List<String> versionFixed;

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

Expand Down Expand Up @@ -65,7 +68,7 @@ public class CveDetails {
public CveDetails() {
}

public CveDetails(String cveId, String vulnStatus, String description, String cvePublishedDate, List<String> distro, List<String> distroVersion, List<Boolean> isVulnerable, List<String> sourcePackageName, List<String> sourcePackageVersion, Float baseScoreV40, Float baseScoreV31, Float baseScoreV30, Float baseScoreV2, String vectorStringV40, String vectorStringV31, String vectorStringV30, String vectorStringV2) {
public CveDetails(String cveId, String vulnStatus, String description, String cvePublishedDate, List<String> distro, List<String> distroVersion, List<Boolean> isVulnerable, List<String> sourcePackageName, List<String> sourcePackageVersion, List<String> versionFixed, Float baseScoreV40, Float baseScoreV31, Float baseScoreV30, Float baseScoreV2, String vectorStringV40, String vectorStringV31, String vectorStringV30, String vectorStringV2) {
this.cveId = cveId;
this.vulnStatus = vulnStatus;
this.description = description;
Expand All @@ -75,6 +78,7 @@ public CveDetails(String cveId, String vulnStatus, String description, String cv
this.isVulnerable = isVulnerable;
this.sourcePackageName = sourcePackageName;
this.sourcePackageVersion = sourcePackageVersion;
this.versionFixed = versionFixed;
this.baseScoreV40 = baseScoreV40;
this.baseScoreV31 = baseScoreV31;
this.baseScoreV30 = baseScoreV30;
Expand Down Expand Up @@ -121,6 +125,10 @@ public List<String> getSourcePackageVersion() {
return sourcePackageVersion;
}

public List<String> getVersionFixed() {
return versionFixed;
}

public Float getBaseScoreV40() {
return baseScoreV40;
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/getCveDetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ <h2>Affected Linux Versions</h2>
<th>Source Package</th>
<th>Package Version</th>
<th>Is Vulnerable</th>
<th>Is fixed in Version</th>
</tr>
</thead>
<tr th:each="distro,iterStat : ${cveDetails.distro}">
Expand All @@ -49,6 +50,7 @@ <h2>Affected Linux Versions</h2>
<td th:text="${cveDetails.sourcePackageName[__${iterStat.index}__]}"></td>
<td th:text="${cveDetails.sourcePackageVersion[__${iterStat.index}__]}"></td>
<td th:text="${cveDetails.isVulnerable[__${iterStat.index}__]}"></td>
<td th:text="${cveDetails.versionFixed[__${iterStat.index}__]}"></td>
</tr>

</table>
Expand Down

0 comments on commit 0edd8cb

Please sign in to comment.