Closed cristiano-corrado closed 4 years ago
it seems that the below fixes it, it is the handling of the TempUploadFile @/dojo/tools/hadolint/parser.py", line 17 it's enough to change the parse_json function to the code reported below. Now the issues are imported and displayed in django with no errors.
def parse_json(self, json_output):
json_output = json_output.read()
try:
tree = json.loads(json_output.decode('utf-8').strip())
except:
raise Exception("Invalid format")
return tree
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bug description importing an hadolint scan will generate error 500
Steps to reproduce Steps to reproduce the behavior:
Expected behavior The application should report and process the results
Deployment method (select with an
X
)Environment information
d8cd7607: Merge pull request #1729 from DefectDojo/Maffooch-patch-1 [2020-01-03 18:41:53 -0600]
Sample scan files (optional)
hadolint-sample-report.json.zip
Screenshots (optional)
Console logs (optional)
Additional context (optional) Tried to upload the scan both using API and manual file upload