[Recorded Future]: threat pipeline errors on blank file hash Algorithm (Unsupported hash algorithm '')

Aperta Adatta ai principianti
#22,479 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

Inizia da packages/ti_recordedfuture/data_stream/threat/elasticsearch/ingest_pipeline/default.yml ed esamina il passaggio script_map_file_hashes e il passaggio del tipo di indicatore file menzionato nel report. Controlla come vengono gestiti i valori Algorithm vuoti e nulli, quindi esegui i test della pipeline Recorded Future threat. Il lavoro è completato quando gli algoritmi vuoti non producono più l’errore di algoritmo non supportato e gli hash validi continuano a essere mappati correttamente.

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

Descrizione

bug Integration:ti_recordedfuture Team:SDE-Crest Team:Security-Service Integrations
Integration Name

Recorded Future [packages/ti_recordedfuture]

Dataset Name

ti_recordedfuture.threat

Integration Version

2.7.3 (the pipeline on main, 2.12.0, has the same code)

Error Message
Failed to map fileHashes field: Unsupported hash algorithm ''
What did you do?

Ran the threat data stream (CEL input, risklist/Fusion ingestion) as a standalone Elastic Agent.

What did you see?

A small number of documents per day (about 1-2) are indexed with the error message above. They have event.kind: enrichment.

The script_map_file_hashes step in data_stream/threat/elasticsearch/ingest_pipeline/default.yml runs when ctx.json.Algorithm != null. It looks the value up in a fixed map (MD5, SHA-1, SHA-256, SHA-384, SHA-512) and throws when the value is not in the map. The logged algorithm is the empty string, so I believe these are risklist rows where the Algorithm column is present but blank. A blank string passes the != null check and then fails the lookup.

I could not confirm the raw source row, because the indexed documents do not retain it. The blank Algorithm is inferred from the pipeline code and the error text.

Impact is low: the documents are still indexed, but with error.message set and no file hash mapped.

What did you expect to see?

Rows with a blank Algorithm should not raise a pipeline error. Possible approaches:

  • Treat blank like null, e.g. if: ctx.json.Algorithm != null && ctx.json.Algorithm != '' on both the threat.indicator.type: file set step and the hash-mapping script.
  • Or infer the algorithm from the hash length (32 = MD5, 40 = SHA-1, 64 = SHA-256).
Anything else?

The error has been occurring at a steady 1-2 documents per day since at least 2026-11-12.

Lingua principale
Handlebars
Stelle
339
Fork
688
Merge medio
3g 15h
PR unite (30g)
183

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 elastic/integrations

Tutte le issue di elastic/integrations

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.