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

[microsoft-sentinel-incidents]: "NoneType" exception when converting HostEntity #3539

Closed
romain-filigran opened this issue Mar 3, 2025 · 0 comments
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@romain-filigran
Copy link
Member

Description

An exception is thrown when converting certain alerts containing a HostEntity that does not contain a “hostname” field.

Traceback (most recent call last): File "/opt/opencti-connector-microsoft-defender-incidents/microsoft_defender_incidents_connector/connector.py", line 359, in process_message incident_stix_objects = self._extract_intelligence(incident) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/opencti-connector-microsoft-defender-incidents/microsoft_defender_incidents_connector/connector.py", line 191, in _extract_intelligence self.converter_to_stix.create_evidence_identity_system( File "/opt/opencti-connector-microsoft-defender-incidents/microsoft_defender_incidents_connector/converter_to_stix.py", line 27, in decorator return decorated_function(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/opencti-connector-microsoft-defender-incidents/microsoft_defender_incidents_connector/converter_to_stix.py", line 280, in create_evidence_identity_system id=Identity.generate_id( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pycti/entities/opencti_identity.py", line 229, in generate_id data = {"name": name.lower().strip(), "identity_class": identity_class.lower()} ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'lower'

Environment

OpenCTI version: 6.5.3

@romain-filigran romain-filigran added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team and removed needs triage use to identify issue needing triage from Filigran Product team labels Mar 3, 2025
@romain-filigran romain-filigran added this to the Bugs backlog milestone Mar 3, 2025
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Mar 4, 2025
SamuelHassine pushed a commit that referenced this issue Mar 4, 2025
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 solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

2 participants