-
Notifications
You must be signed in to change notification settings - Fork 820
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
Searching for Entities returns inconsistent results #216
Comments
Hi @b4dpxl , can you try to reproduce on https://demo.opencti.io? I try myself on the platform and i can see the TTP Input Prompt for all the cases. Thanks. |
If it work, you can try to do this:
One more question. Do you start fresh on 1.1.2 or its an older platform migrated? |
Hi @richard-julien, thanks for the quick response. I agree, this works on the demo platform, but not on my deployment. This was migrated from 1.1.1 (well, I updated the I also tried editing the Input Prompt entity, which made no difference. Searching for variations of "Input" and "Input Prompt", in different cases, returns at most 6 TTP results on my deployment. Demo returns 18 results for "Input Prompt". Comparing the entities in the front end, they appear the same (imported from Mitre). I wonder if this is somehow related to the issue I raised here: OpenCTI-Platform/client-python#21 ? |
I think the client-python#21 is the same problem yes. The python lib just use the graphQL api, so you will have the same problem. Can you execute the docker ps command and copy/paste the result? Can you also configure your platform with logs_level = debug, restart the container and copy/paste the docker logs result when you try to update the "Input Prompt" TTP? Thanks. |
Adding I can try recreating the whole thing from scratch, but last time it took 5+ days to import the mitre feed. Incidentally, I bodged together a hack for that import, to only import entries modified since the import last run, if you're interested. It will only work if using a config file though. |
Sorry, my fault. The docker option is APP__LOGS_LEVEL=debug For your import hack to have a state for the MITR, yes it could be interesting to see your approach. We currently think about the best solution to introduce state in connectors. Dont hesitate to submit a PR in the MITR connector. |
Thanks. Log file attached. I've also created a PR. This covers adding text to the TTP description and also changing the name (from "Input Prompt" to "Input Prompts"). Neither seemed to affect the searching. It was matched on searching for "prompts" (which is only in the title), but not "input" or "input prompts". Thanks again |
Your log explicitly mention that the platform reindex the TTP.
Looks like the problem is inside the Elasticsearch stix_domain_entities index.
Thanks |
Hi. Output attached. I'm not an ES expert, but it looks like Thanks again. |
Thanks for the extract, everything seems ok. The normalizer make them lowercase but the default analyzer split on whitespace, so it should work. Looking deeply in the code I see a potential problem to find elements like InputSuffix but nothing related directly to your problem. Just to bypass openCTI completly, can you try this command :
And see if you have all the TTP in the answer? Thanks |
That query returns the expected TTPs when looking for Interestingly, |
Ok, can you try to add explain=true to the different queries and upload the result?
Thanks |
Thanks. I hope the attached helps. The individual files are named after the search, e.g. |
@b4dpxl: this should now be fixed in 2.0.1. |
Description
When trying to search for an entity to add to a report, the search results are inconsistent. For example, trying to add "Input Prompt" as a TTP:
input
does not matchinput prompt
does not matchprompt
does matchEnvironment
Reproducible Steps
Steps to create the smallest reproducible scenario:
+
buttoninput
into the search fieldExpected Output
Input Prompt
to appear under theTTP
results sectionActual Output
It is not in the list
Additional information
It appears to be matching on the description only, not the name. This makes finding Entities to add via the search harder, as you need to know the exact match, and you can't even copy/paste the Entity name from another browser tab.
The text was updated successfully, but these errors were encountered: