Class: Mihari::Services::AlertCreator

Inherits:
Mihari::Service show all
Defined in:
lib/mihari/services/creators.rb

Overview

Alert creator

Instance Method Summary collapse

Methods inherited from Mihari::Service

call, #result, result

Instance Method Details

#call(params) ⇒ Mihari::Models::Alert

Parameters:

  • params (Hash)

Returns:



14
15
16
17
18
19
# File 'lib/mihari/services/creators.rb', line 14

def call(params)
  normalized = params.to_snake_keys
  proxy = Services::AlertProxy.new(**normalized)
  emitter = Emitters::Database.new(rule: proxy.rule)
  emitter.call proxy.artifacts
end