-
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.
* Use generate directive * Readme update * Temp commit
- Loading branch information
Prabhu Subramanian
authored
Dec 27, 2022
1 parent
a7c5cbf
commit 69c4488
Showing
13 changed files
with
3,593 additions
and
3,548 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
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
Binary file not shown.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
|
||
import threat_db.loader as loader | ||
|
||
|
||
def test_get_pkg_vulns(): | ||
parsed_obj = loader.get_pkg_vulns_json( | ||
os.path.join( | ||
os.path.dirname(__file__), "data", "NodeGoat", "sbom-nodejs.vex.json" | ||
) | ||
) | ||
assert ( | ||
parsed_obj["serial_number"] == "urn:uuid:25223366-1379-41f4-8abf-3a4e11d6548f" | ||
) | ||
assert parsed_obj["metadata"] | ||
assert len(parsed_obj["components"]) == 1080 | ||
assert len(parsed_obj["services"]) == 0 | ||
assert len(parsed_obj["vulnerabilities"]) == 99 | ||
|
||
parsed_obj = loader.get_pkg_vulns_json( | ||
os.path.join( | ||
os.path.dirname(__file__), "data", "NodeGoat", "sbom-yaml-manifest.vex.json" | ||
) | ||
) | ||
assert ( | ||
parsed_obj["serial_number"] == "urn:uuid:1a1ffcb3-2c26-43af-8032-d312627ab9f8" | ||
) | ||
assert parsed_obj["metadata"] | ||
assert len(parsed_obj["components"]) == 207 | ||
assert len(parsed_obj["services"]) == 2 | ||
assert len(parsed_obj["vulnerabilities"]) == 11 |
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
Oops, something went wrong.