Describe the bug
The VirusTotal service fails with an exception when it uploads a file. If the file already exists in VT, everything works.
To Reproduce
Steps to reproduce the behavior:
- Have a file that is not yet in the VT
- Have VT service configured to upload missing files
- Submit file with the VT enabled
- See error like:
File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/assemblyline_v4_service/common/base.py", line 177, in handle_task
self.execute(request)
File "/opt/al_service/virustotal/virustotal.py", line 220, in execute
request.temp_submission_data["virus_total_vt3_files"] = package_scan_report(result_collection["file"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/al_service/virustotal/report.py", line 49, in package_scan_report
json.dumps([
^
File "/opt/al_service/virustotal/report.py", line 50, in <listcomp>
_prune_vt3_summary(f)
File "/opt/al_service/virustotal/report.py", line 37, in _prune_vt3_summary
"md5": file["attributes"]["md5"],
~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'md5'
Expected behavior
File is uploaded, and the results are downloaded.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information if pertinent):
Additional context
In the last 4.6.x version of VT service, I have also observed another problematic behavior: the service was not able to upload a new file at all, usually timeouting. I suspect it was waiting till VT finishes behavioral analysis, which could take a while.
Describe the bug
The VirusTotal service fails with an exception when it uploads a file. If the file already exists in VT, everything works.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
File is uploaded, and the results are downloaded.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information if pertinent):
Additional context
In the last 4.6.x version of VT service, I have also observed another problematic behavior: the service was not able to upload a new file at all, usually timeouting. I suspect it was waiting till VT finishes behavioral analysis, which could take a while.