Skip to content

Commit 601aaf0

Browse files
author
Jakob Maier
committed
added regex component name match
1 parent 204c79d commit 601aaf0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/client/get_project_vulnerabilites_as_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161
for vulnverable_component in bd.get_resource('vulnerable-components', version):
6262
componentName = vulnverable_component["componentName"]
6363

64-
if (re.search(component, componentName, re.IGNORECASE) or component == None):
64+
if (component == None or re.search(component, componentName, re.IGNORECASE)):
6565
componentVersion = vulnverable_component["componentVersionName"]
6666
remediation = vulnverable_component['vulnerabilityWithRemediation']
6767

examples/vuln_batch_remediation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def main(argv=None): # IGNORE:C0111
232232
if (process_cve_remediation):
233233
if (local_cve_remediation_file):
234234
cve_remediation_file = local_cve_remediation_file
235-
print (f' Opening: {cve_remediation_file}')
235+
print (f' Opening CVE remediation file: {cve_remediation_file}')
236236
else:
237237
cve_remediation_file = find_custom_field_value (custom_fields, args.cve_remediation_list_custom_field_label)
238238
print (f' Opening: {args.cve_remediation_list_custom_field_label}:{cve_remediation_file}')
@@ -244,7 +244,7 @@ def main(argv=None): # IGNORE:C0111
244244
if (process_origin_exclulsion):
245245
if local_origin_exclusion_file:
246246
exclusion_list_file = local_origin_exclusion_file
247-
print (f' Opening: {exclusion_list_file}')
247+
print (f' Opening origin exclusion list: {exclusion_list_file}')
248248
else:
249249
exclusion_list_file = find_custom_field_value (custom_fields, args.origin_exclusion_list_custom_field_label)
250250
print (f' Opening: {args.origin_exclusion_list_custom_field_label}:{exclusion_list_file}')

0 commit comments

Comments
 (0)