IntelOwl icon indicating copy to clipboard operation
IntelOwl copied to clipboard

Analyzer marked SUCCESS even when data model creation fails

Open gks281263 opened this issue 10 months ago • 2 comments

Location

File: api_app/analyzers_manager/classes.py
Method: BaseAnalyzerMixin.after_run_success()

Description

In BaseAnalyzerMixin.after_run_success(), the report status is set to SUCCESS before calling create_data_model(). If data model creation fails, the report status remains SUCCESS even though a required post-processing step did not complete.

The current code flow is:

  1. super().after_run_success(...) sets report status to SUCCESS
  2. create_data_model() is called in a try-except block
  3. If create_data_model() raises an exception, it is logged and the error is added to job.errors, but the report status is not updated

Trigger

This occurs when create_data_model() raises an exception during data model creation. Common causes may include mapping failures, database errors, or validation issues during data model construction.

Observed Behavior

When data model creation fails:

  • Analyzer report status remains SUCCESS
  • Normalized data model is not created
  • Error message is logged and stored in job.errors
  • Downstream components may operate on incomplete data

Expected Behavior

When data model creation fails after a successful analyzer run, either:

  • The report status should reflect the partial failure, or
  • The failure should be clearly indicated in the report status

This ensures the report status accurately reflects the completion state of all required steps.

Impact

Data models are used by:

  • Engine modules for post-processing and correlation
  • Pivot plugins that extract values from normalized data
  • Connectors that export structured intelligence

When data models are missing, these components may produce incomplete or incorrect results, which may lead to misleading threat intelligence.

Why This Matters

IntelOwl analyzers follow a defined lifecycle contract where after_run_success() should indicate full completion including post-processing. Marking a report as SUCCESS when data model creation fails breaks this contract and makes partial failures harder to detect during operations.

Notes

The appropriate behavior (how to reflect partial success in status) is open for discussion. The goal is to maintain lifecycle contract consistency while clearly indicating completion state.

gks281263 avatar Jan 16 '26 18:01 gks281263

Data models were introduced at a later time and are still considered optional. So this is actual intended behavior

mlodic avatar Jan 17 '26 06:01 mlodic

Thanks for the clarification, that makes sense 👍 I understand that data models are optional and this behavior is intended.

Appreciate you taking the time to explain the context. I’ll keep this in mind while looking at other parts of the pipeline.

Thanks again.

gks281263 avatar Jan 17 '26 09:01 gks281263