Fix load error csv output error

This commit is contained in:
Kristen Newbury
2022-12-12 17:15:49 -05:00
parent 02d8f4cfa2
commit 009cf12d2c
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ def load(fname):
except json.decoder.JSONDecodeError as err: except json.decoder.JSONDecodeError as err:
logging.error('Error reading from {}: {}: line {}, column {}' logging.error('Error reading from {}: {}: line {}, column {}'
.format(fname, err.msg, err.lineno, err.colno)) .format(fname, err.msg, err.lineno, err.colno))
status_writer.file_load_error["file"] = fname status_writer.file_load_error["sarif_file"] = fname
status_writer.csv_write(status_writer.file_load_error) status_writer.csv_write(status_writer.file_load_error)
sys.exit(1) sys.exit(1)
return content return content

View File

@@ -84,7 +84,7 @@ input_sarif_missing = {
# file load error can happen on either sarif file or scan-spec.json # file load error can happen on either sarif file or scan-spec.json
file_load_error = { file_load_error = {
"file": "", "sarif_file": "",
"level": "ERROR", "level": "ERROR",
"levelcode": 3, "levelcode": 3,
"message": "Could not load file." "message": "Could not load file."