OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
6.13k stars 907 forks source link

CSV import is buggy #7992

Open nino-filigran opened 1 month ago

nino-filigran commented 1 month ago

Description

When trying to import data through the CSV, the output of the import in the UI displays that the import is successuful but the value is = null/amount of entities to be ingested (ex: null/7)

However when navigating to the type of entities I've tried to import, I find them. And when navigating back to the data/import, I see the correct number. I basically need to refresh the page to see updates. And sometimes, I even need to refresh 2 or 3 times to see the sucessful result.

Environment

Demo public & internal

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Create a CSV mapper
  2. Upload the CSV
  3. Import the CSV

Expected Output

If the import is successful, I expect to see the correct number of entities (ex 5/5)

Actual Output

Null/5 in that specific case

Additional information

CSV mapper: image (4) image (3) image (2)

CSV file: test_csv_5 (2).csv

Screenshots (optional)

In the following video, we see that I successfully find the needed observables

https://github.com/user-attachments/assets/26dd9e9f-410c-4a76-83c2-aa15691f2329

frapuks commented 1 month ago

At 00:27, you have the update (just before your refresh), null/7 is changed by 7/7. That i understanded about this, you have 3 steps :

I think it's not a bug, it's just the delay

nino-filigran commented 1 month ago

But then, don't you find it weird to display a success even if it's null/X? I think it would make more sense to show a loader for both step 1 & 2 and only show the result when the worker has finished. I've created this bug a user asked us why it's import was marked as null/7 (and therefore not finding the 7 entities in the platform) even though it's sucessful.