-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
88 additions
and
49 deletions.
There are no files selected for viewing
24 changes: 17 additions & 7 deletions
24
stackrox-container-image-scanner/src/main/java/com/stackrox/jenkins/plugins/data/CVE.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,36 @@ | ||
package com.stackrox.jenkins.plugins.data; | ||
|
||
import com.google.common.base.Strings; | ||
|
||
import com.stackrox.model.StorageEmbeddedVulnerability; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
import com.stackrox.model.StorageEmbeddedVulnerability; | ||
import javax.annotation.Nonnull; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class CVE { | ||
private final String id; | ||
private final Float cvssScore; | ||
private final String scoreType; | ||
private final String packageName; | ||
private final String packageVersion; | ||
private final String severity; | ||
private final String id; | ||
private final boolean fixable; | ||
private final String link; | ||
private final String severity; | ||
|
||
public CVE(String packageName, String packageVersion, StorageEmbeddedVulnerability vulnerability) { | ||
public CVE(String packageName, String packageVersion, @Nonnull StorageEmbeddedVulnerability vulnerability) { | ||
this( | ||
vulnerability.getCve(), | ||
vulnerability.getCvss(), | ||
vulnerability.getScoreVersion() != null ? vulnerability.getScoreVersion().toString() : null, | ||
packageName, | ||
packageVersion, | ||
SeverityUtil.prettySeverity(vulnerability.getSeverity()), | ||
vulnerability.getCve(), | ||
vulnerability.getLink() | ||
!Strings.isNullOrEmpty(vulnerability.getFixedBy()), | ||
vulnerability.getLink(), | ||
SeverityUtil.prettySeverity(vulnerability.getSeverity()) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
stackrox-container-image-scanner/src/test/resources/report/jenkins.lts/cves.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
COMPONENT,VERSION,CVE,SEVERITY,LINK | ||
util-linux,2.25.2-6,CVE-2015-5224,IMPORTANT,https://security-tracker.debian.org/tracker/CVE-2015-5224 | ||
gcc-4.8,4.8.4-1,CVE-2017-11671,MODERATE,https://security-tracker.debian.org/tracker/CVE-2017-11671 | ||
bzip2,1.0.6-7,CVE-2016-3189,LOW,https://security-tracker.debian.org/tracker/CVE-2016-3189 | ||
COMPONENT,VERSION,CVE,FIXABLE,SEVERITY,CVSS SCORE,SCORE TYPE,LINK | ||
util-linux,2.25.2-6,CVE-2015-5224,IMPORTANT,false,9.8,V3,https://security-tracker.debian.org/tracker/CVE-2015-5224 | ||
gcc-4.8,4.8.4-1,CVE-2017-11671,MODERATE,false,4.0,V3,https://security-tracker.debian.org/tracker/CVE-2017-11671 | ||
bzip2,1.0.6-7,CVE-2016-3189,LOW,true,6.5,V3,https://security-tracker.debian.org/tracker/CVE-2016-3189 |
6 changes: 3 additions & 3 deletions
6
stackrox-container-image-scanner/src/test/resources/report/nginx.latest/cves.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
COMPONENT,VERSION,CVE,SEVERITY,LINK | ||
openssl,1.1.1d-0+deb10u7,CVE-2007-6755,LOW,https://security-tracker.debian.org/tracker/CVE-2007-6755 | ||
-,-,-,UNKNOWN,- | ||
COMPONENT,VERSION,CVE,FIXABLE,SEVERITY,CVSS SCORE,SCORE TYPE,LINK | ||
openssl,1.1.1d-0+deb10u7,CVE-2007-6755,LOW,false,5.8,V2,https://security-tracker.debian.org/tracker/CVE-2007-6755 | ||
-,-,CVE-MISSING-DATA,UNKNOWN,false,0.0,-,- |