Sha256: 1a401a022f21781e7e1a44b0202890ef17451b04b9f6c877bc5a534f6c592213
Contents?: true
Size: 596 Bytes
Versions: 13
Compression:
Stored size: 596 Bytes
Contents
# frozen_string_literal: true module Mihari module Services class ArtifactEnricher < Service # # @param [String] id # def call(id) artifact = Mihari::Models::Artifact.includes( :autonomous_system, :geolocation, :whois_record, :dns_records, :reverse_dns_names, :cpes, :ports ).find(id) raise UnenrichableError.new, "#{artifact.id} is already enriched or unenrichable" unless artifact.enrichable? artifact.enrich artifact.save end end end end
Version data entries
13 entries across 13 versions & 1 rubygems