[Connectors] Introduce CTIConnector to standardize CTI connectors and support data model enrichment - #3891
Conversation
|
Hey @mlodic, I would like to get your insights and thoughts over the changes I have done in this PR. CTIConnector class
The connectors are inheriting the above class and then sending enrichment data accordingly. MISP
OpenCTI
YETI
I would like to know if this is fine or I should send it some other way. Also, will fix any deepsource errors, for now just want your thoughts over the changes I have done. |
mlodic
left a comment
There was a problem hiding this comment.
broadly speaking I like how the structure of the connectors is more simple now.
|
|
||
| def get_observable_type(self) -> str: | ||
| if self._job.is_sample: | ||
| if self.classification == "file": |
There was a problem hiding this comment.
don't we already have a constant for this?
| ip_ver = self.ip_version | ||
| if ip_ver in [4, 6]: |
There was a problem hiding this comment.
you could use := here to reduce it to a single line



(Please add to the PR name the issue/s that this PR would close if merged by using a Github keyword. Example:
<feature name>. Closes #999. If your PR is made by a single commit, please add that clause in the commit too. This is all required to automate the closure of related issues.)Description
Please include a summary of the change and link to the related issue.
Type of change
Please delete options that are not relevant.
Checklist
developdumpplugincommand and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zipand you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERSplaybook by following this guide.urlthat contains this information. This is required for Health Checks (HEAD HTTP requests).get_mocker_response()method of the unittest class. This serves us to provide a valid sample for testing.DataModelfor the new analyzer following the documentation# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl # See the file 'LICENSE' for copying permission.Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.testsfolder). All the tests (new and old ones) gave 0 errors.DeepSource,Django Doctorsor other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules