diff --git a/pyt/vulnerabilities/vulnerabilities.py b/pyt/vulnerabilities/vulnerabilities.py index 7fd14cd7..f169c4b2 100644 --- a/pyt/vulnerabilities/vulnerabilities.py +++ b/pyt/vulnerabilities/vulnerabilities.py @@ -540,6 +540,9 @@ def find_vulnerabilities( vulnerabilities, nosec_lines ) - with open(blackbox_mapping_file, 'w') as outfile: - json.dump(blackbox_mapping, outfile, indent=4) + + if ui_mode == UImode.INTERACTIVE: + with open(blackbox_mapping_file, 'w') as outfile: + json.dump(blackbox_mapping, outfile, indent=4) + return vulnerabilities