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

[CAPE] AttributeError: type object 'Malware' has no attribute 'generate_id' #3355

Closed
t-mtsmt opened this issue Jan 30, 2025 · 0 comments · Fixed by #3356
Closed

[CAPE] AttributeError: type object 'Malware' has no attribute 'generate_id' #3355

t-mtsmt opened this issue Jan 30, 2025 · 0 comments · Fixed by #3356
Assignees
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

@t-mtsmt
Copy link
Contributor

t-mtsmt commented Jan 30, 2025

Description

The connector-cape is not functioning correctly and throws the following error:

$ sudo docker compose logs | grep cape
connector-cape-1              | {"timestamp": "2025-01-30T17:05:55.767988Z", "level": "ERROR", "name": "CAPE", "message": "An error Occured fetching task 1; type object 'Malware' has no attribute 'generate_id'", "exc_info": "Traceback (most recent call last):\n  File \"/opt/opencti-cape/main.py\", line 163, in run\n    openCTIInterface(\n  File \"/opt/opencti-cape/cape/telemetry.py\", line 70, in __init__\n    self.processAndSubmit()  # This is where the magic happens\n    ^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/opencti-cape/cape/telemetry.py\", line 570, in processAndSubmit\n    Malware = self.Get_Malware(self.report.detections)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/opencti-cape/cape/telemetry.py\", line 464, in Get_Malware\n    id=Malware.generate_id(name=Detection), name=Detection, is_family=False\n       ^^^^^^^^^^^^^^^^^^^\nAttributeError: type object 'Malware' has no attribute 'generate_id'", "taskName": null}

It appears that the Malware class name from stix2.v21 is conflicting with the Malware class from pycti, causing the generate_id method to be inaccessible.

Environment

  1. OS (where OpenCTI server runs): Ubuntu 22.04.4 LTS
  2. OpenCTI version: OpenCTI 6.4.10
  3. OpenCTI client: python
  4. Connector: connector-cape 6.4.10

Reproducible Steps

Configure connector-cape on 6.4.10, observe nothing produced by connector other than above error

Expected Output

Connector takes in CAPE reports.

Actual Output

No output.

@t-mtsmt t-mtsmt added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Jan 30, 2025
@t-mtsmt t-mtsmt mentioned this issue Jan 30, 2025
4 tasks
@romain-filigran romain-filigran removed the needs triage use to identify issue needing triage from Filigran Product team label Jan 31, 2025
@romain-filigran romain-filigran added this to the Bugs backlog milestone Jan 31, 2025
@flavienSindou flavienSindou linked a pull request Feb 4, 2025 that will close this issue
4 tasks
@flavienSindou flavienSindou added the solved use to identify issue that has been solved (must be linked to the solving PR) label Feb 4, 2025
@labo-flg labo-flg modified the milestones: Release 6.4.11, Release 6.5.0 Feb 5, 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

Successfully merging a pull request may close this issue.

4 participants