[Zvelo]: Connector stops working if data is invalid or incorrectly formatted #3372
Labels
bug
use for describing something not working as expected
filigran support
[optional] use to identify an issue related to feature developed & maintained by Filigran.
solved
use to identify issue that has been solved (must be linked to the solving PR)
Milestone
Description
We've observed that some of the indicators provided by Zvelo can be incorrectly formatted, causing the connector to stop with the following exception (the problem comes from the URL formatting).
Traceback (most recent call last): File "/opt/opencti-connector-zvelo/zvelo_connector/connector.py", line 132, in process_message stix_objects = self._collect_intelligence(from_date=last_run) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/opencti-connector-zvelo/zvelo_connector/connector.py", line 77, in _collect_intelligence self.converter_to_stix.convert_phish_to_stix(entity) File "/opt/opencti-connector-zvelo/zvelo_connector/converter_to_stix.py", line 287, in convert_phish_to_stix stix_indicator = stix2.Indicator( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/stix2/v21/sdo.py", line 250, in __init__ super(Indicator, self).__init__(*args, **kwargs) File "/usr/local/lib/python3.12/site-packages/stix2/base.py", line 232, in __init__ self._check_object_constraints() File "/usr/local/lib/python3.12/site-packages/stix2/v21/sdo.py", line 270, in _check_object_constraints raise InvalidValueError(self.__class__, 'pattern', str(errors[0])) stix2.exceptions.InvalidValueError: Invalid value for Indicator 'pattern': FAIL: Error found at line 1:13. mismatched input ''' expecting {IntNegLiteral, IntPosLiteral, FloatNegLiteral, FloatPosLiteral, HexLiteral, BinaryLiteral, StringLiteral, BoolLiteral, TimestampLiteral}
Environment
The text was updated successfully, but these errors were encountered: