Skip to content

Commit c34d2eb

Browse files
authored
Merge pull request DefectDojo#1018 from dr3dd589/npm-audit-scan-parser-unittest
add unittest for npm audit scan parser
2 parents cc83143 + f15461b commit c34d2eb

File tree

5 files changed

+528
-0
lines changed

5 files changed

+528
-0
lines changed

dojo/tools/npmaudit/parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def __init__(self, json_output, test):
1414
self.items = []
1515

1616
def parse_json(self, json_output):
17+
if json_output is None:
18+
self.items = []
19+
return
1720
try:
1821
tree = json.load(json_output)
1922
subtree = tree.get('advisories')

0 commit comments

Comments
 (0)