Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Virustotal] Error when enriching certain entities #2713

Open
Lhorus6 opened this issue Sep 25, 2024 · 1 comment
Open

[Virustotal] Error when enriching certain entities #2713

Lhorus6 opened this issue Sep 25, 2024 · 1 comment
Labels
bug use for describing something not working as expected

Comments

@Lhorus6
Copy link
Contributor

Lhorus6 commented Sep 25, 2024

Description

On some entity, this error appears:

{ "timestamp": "2024-09-25T07:45:21.751840Z", "level": "ERROR", "name": "VirusTotal", "message": "Error in message processing, reporting error to API", "exc_info": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.11/site-packages/pycti/connector/opencti_connector_helper.py\", line 352, in _data_handler\n message = self.callback(event_data)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/opencti-connector-virustotal/virustotal/virustotal.py\", line 425, in _process_message\n return self._process_file(stix_objects, stix_entity, opencti_entity)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/opencti-connector-virustotal/virustotal/virustotal.py\", line 269, in _process_file\n \"| \"\nTypeError: can only concatenate str (not \"NoneType\") to str" }

Environment

OCTI 6.2.18

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Enable the Virustotal enrichment connector
  2. Try to enrich entities, hoping that an entity will raise this error

Additional information

Line 278 of the script we check that the variable is not None, otherwise we use the string "N/A".

However, for all the other previous ones (e.g. line 269) we don't do that and that seems to be the problem. Adding verification steps like in line 278 should fix the error.

@Lhorus6 Lhorus6 added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Sep 25, 2024
@romain-filigran
Copy link
Member

related to : #2671

@romain-filigran romain-filigran removed the needs triage use to identify issue needing triage from Filigran Product team label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants