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

[Export] Error when exporting "all selected" related entities of an entity #7625

Closed
Lhorus6 opened this issue Jul 7, 2024 · 3 comments · Fixed by #7641
Closed

[Export] Error when exporting "all selected" related entities of an entity #7625

Lhorus6 opened this issue Jul 7, 2024 · 3 comments · Fixed by #7641
Assignees
Labels
bug use for describing something not working as expected critical use to identify critical bug to fix ASAP export Functional scope : EXPORT solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@Lhorus6
Copy link

Lhorus6 commented Jul 7, 2024

Description

When trying to export Tools associated with a specific Intrusion set, the export starts, runs for minutes and then crashes (an error is raised)

Screenshot 2024-07-07 181942

Environment

OCTI 6.2.1

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Go to an Intrusion set
  2. Go to the Knowledge tab then Tools
  3. If no Tools are present, add one or several Tools
  4. Click on “select all” then on the button to export them
  5. Choose "test/csv" in export format and nothing else
  6. Start the export and wait
    -> An error appears after several minutes

Additional information

Screenshot 2024-07-07 182346

Exec info logs:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/pycti/connector/opencti_connector_helper.py", line 349, in _data_handler message = self.callback(event_data) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/opencti-connector-export-file-csv/export-file-csv.py", line 277, in _process_message entities_list = self.helper.api_impersonate.stix2.export_entities_list( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pycti/utils/opencti_stix2.py", line 2316, in export_entities_list return do_list( ^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pycti/entities/opencti_stix_core_object.py", line 1383, in list result = self.opencti.query( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pycti/api/opencti_api_client.py", line 363, in query raise ValueError(value_error) ValueError: {'name': 'Runtime Object type "User" is not a possible type for "Identity".', 'error_message': 'Runtime Object type "User" is not a possible type for "Identity".'}

@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 Jul 7, 2024
@romain-filigran
Copy link
Member

Reproduced. I have the feeling that the export doesn't scope on the selected entity but tries to export all related entities.

@romain-filigran romain-filigran removed the needs triage use to identify issue needing triage from Filigran Product team label Jul 8, 2024
@romain-filigran romain-filigran added this to the Bugs backlog milestone Jul 8, 2024
@romain-filigran romain-filigran added the export Functional scope : EXPORT label Jul 8, 2024
@romain-filigran
Copy link
Member

Not specific to tools and CSV. It's seems to be the case when trying to export "all selected" related entities and for the various export format.

@romain-filigran romain-filigran changed the title [CSV export] Error when exporting Tool to CSV [Export] Error when exporting "all selected" related entities of an entity Jul 8, 2024
@Lhorus6
Copy link
Author

Lhorus6 commented Jul 8, 2024

Exporting data from the platform is a basic and widely-used feature. So this is true : "the export doesn't scope on the selected entity but tries to export all related entities"

-> maybe we should make it "critical", what do you think?

@SouadHadjiat SouadHadjiat self-assigned this Jul 8, 2024
@SamuelHassine SamuelHassine added the critical use to identify critical bug to fix ASAP label Jul 8, 2024
@SouadHadjiat SouadHadjiat linked a pull request Jul 8, 2024 that will close this issue
5 tasks
SouadHadjiat added a commit that referenced this issue Jul 9, 2024
…Component to list entities through relations (#6867)" (#7625)
@SouadHadjiat SouadHadjiat added the solved use to identify issue that has been solved (must be linked to the solving PR) label Jul 9, 2024
JeremyCloarec added a commit that referenced this issue Jul 11, 2024
…sComponent to list entities through relations (#6867)" (#7625)

This reverts commit b6f7240.
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 critical use to identify critical bug to fix ASAP export Functional scope : EXPORT solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
4 participants