Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show version fixed in cve details page #61

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading