[BUG] Finding Based Detection - Possible timezone issue in detection_time_range_lookup

Aperta
#4,399 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, security

Direzione di ricerca

Start by locating the detection_time_range_lookup definition and the Finding Based Detection code that updates it after an edit; the issue does not name file paths or tests. Trace how timezone settings affect the lookup values and the SPL earliest/latest bounds, then check the job timerange from both UTC and UTC+1 users. Done means edited detections produce a timerange that is not in the future and can return results.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

I'm confused about the behaviour of Finding Based Detections, maybe there is a time issue with the lookup detection_time_range_lookup

Here is the scenario with ES 8.6.1 running on a server in UTC.

User admin_1, with timezone setting UTC, creates a FBD. The detection_time_range_lookup now looks like this:

Image

The job details timerange for the initial run:

Image

Job details for the second run:

Image

The SPL translates earliest and latest:

Image

This all looks fine. The job details show correct timeranges for a user admin_2 with a timezone setting UTC+1 as well.

Some minutes later admin_2 makes a change to the FBD. The lookup now shows

Image

When the FDB runs, the SPL uses this earliest and latest:

Image

Looking into the job details with admin_2 (UTC+1) shows a timerange in the future:

Image

Looking into the same job details with user admin_1 (UTC) also shows a timerange which is in the future:

Image

As a result, the FBD will never find any results.

Lingua principale
Python
Stelle
1.7k
Fork
505
Merge medio
3g 17h
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di splunk/security_content

Tutte le issue di splunk/security_content

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.