TheHive-Project / TheHive-Project/Cortex
[Data field] Cannot be searched by the data field
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
Request Type
Bug
Work Environment
| Question | Answer |
|---|---|
| OS version (server) | Debian |
| Cortex version / git hash | 3.0.0-1 |
| Package Type | Docker |
Problem Description
I don't know if it is already reported or not, but I have noticed that in the "job history" view when I try to search for the value of an observable, for example 8.8.8.8, the search engine does nothing.
I have investigated and pulling the thread I have arrived to that the field data, in the mapping of the cortex index comes as binary, and according to the documentation of elastic this type cannot be indexed to search by it.
https://www.elastic.co/guide/en/elasticsearch/reference/current/binary.html
Steps to Reproduce
- Search by putting something in the data field
- Look in your browser's dev tools for the console, and see the error that it is not searchable
- In elastic make the following request and search for the data field: GET CORTEX_INDEX/_mapping
Possible Solutions
I think you should change the type of mapping you do to this field.
I don't know, if it's a common fault or if it's given me to me only in my instance.
thanks for all!!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the job history search failure for an observable such as 8.8.8.8, then inspect the browser console and run GET CORTEX_INDEX/_mapping in Elasticsearch. Trace where the data field mapping is defined and verify that the completed change makes values in that field searchable without the console error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, scala
- Domain
- databases, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100