Skip to content

Commit 8bf93ac

Browse files
author
Jakob Maier
committed
fixed minor bug
1 parent 990b9ad commit 8bf93ac

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/client/get_project_vulnerabilites_as_csv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
)
2828

2929
def strip_newline(str):
30-
return str.replace('\r', '').replace('\n', '')
30+
return str.replace('\r', '').replace('\n', ' ')
3131

3232
def match_component(selected_components, component):
3333
if (len(selected_components) == 0):
@@ -77,7 +77,7 @@ def main():
7777
if (match_component(components, componentName)):
7878
componentVersion = vulnverable_component["componentVersionName"]
7979
remediation = vulnverable_component['vulnerabilityWithRemediation']
80-
80+
8181
status = remediation['remediationStatus']
8282
identifier = remediation['vulnerabilityName']
8383
description = strip_newline(remediation['description'])

examples/vuln_batch_remediation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
import json
7070
import csv
7171
import traceback
72-
72+
from pprint import pprint
7373
from argparse import ArgumentParser
7474
from argparse import RawDescriptionHelpFormatter
7575

@@ -138,6 +138,8 @@ def process_vulnerabilities(hub, vulnerable_components, remediation_data=None, e
138138
if vuln['vulnerabilityWithRemediation']['remediationStatus'] == "NEW":
139139
if (remediation_data):
140140
remediation_action = remediation_is_valid(vuln, remediation_data)
141+
else:
142+
remediation_action = None
141143

142144
if (exclusion_data):
143145
exclusion_action = origin_is_excluded(vuln, exclusion_data)

0 commit comments

Comments
 (0)