-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change vulnerability statement merging to include base_cpe.
- Loading branch information
1 parent
1e80074
commit 010ff53
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,7 @@ public void toJsonTest() { | |
public void testMerge() { | ||
// Construct the first one | ||
Vulnerability v1 = new Vulnerability("test-id"); | ||
v1.setBaseCpe("base_cpe_test"); | ||
v1.addPurl("pgk:pypi/[email protected]"); | ||
v1.setPublishedDate("20/06/2020"); | ||
v1.addReference("www.reference.com"); | ||
|
@@ -134,7 +135,9 @@ public void testMerge() { | |
v2.setVectorCVSS3("7.4"); | ||
|
||
v1.merge(v2); | ||
assertEquals("base_cpe_test", v1.getBaseCpe()); | ||
assertTrue(v1.getPurls().contains("pgk:pypi/[email protected]")); | ||
assertTrue(v1.getPurls().contains("pgk:pypi/[email protected]")); | ||
assertTrue(v1.getReferences().contains("www.anotherreference.com")); | ||
assertTrue(v1.getPatchLinks().contains("www.patch.com")); | ||
assertEquals(v1.getSeverity(), Severity.CRITICAL); | ||
|