mihari 4.6.0 → 4.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f340898bd140d76041cde8c5cb266bcb379f056bac511fcd9de9a4dd20fc299
4
- data.tar.gz: fb96310ecb6efb1dd5059feea692a8128bdff3610579473134653979c2f0512c
3
+ metadata.gz: 491cb9d0477c4101251c1f3e5705328008a196920efb41c239048247937f21f4
4
+ data.tar.gz: 14bcfd11b8871a759e70f6658cf2773dadc6afe7ffde44dbbffaef99961b8e00
5
5
  SHA512:
6
- metadata.gz: 8d9758d027fc056f52be261fb2d7c6fa81dc402d4f47c01a8e49c93e1bc084a501af74c0e51c73ac2967c7795529130f1c34801661f1a9935075e197eaf446b0
7
- data.tar.gz: e48d29aa3756a260cc273f9b05e65aa28e6e9e67f377fcc9c4ff722931f7789f363478c9a33470aea41a1bd72a9c9e73c05b76583d52bdb80096c2fdaf627b54
6
+ metadata.gz: d833915545629ade609ec994e6139387fd66247fa1c48fdbe4e3eab01679fb42820e3b07cb95fdbb8cff092753394f1dfa9aaa4459259837c2c0d7d5f2f855ed
7
+ data.tar.gz: dcbb112faa805b27157ec72d0f3544031c7e7789e855eb082a69a76216d0fcd644013ade95aea28ae138ebfb3bc8eb90d8fb922c83999d292c12b78d15acfe5c
@@ -14,7 +14,7 @@ module Mihari
14
14
  #
15
15
  def build_by_ip(ip)
16
16
  res = Enrichers::Shodan.query(ip)
17
- return if res.nil?
17
+ return [] if res.nil?
18
18
 
19
19
  res.cpes.map { |cpe| new(cpe: cpe) }
20
20
  end
@@ -14,7 +14,7 @@ module Mihari
14
14
  #
15
15
  def build_by_ip(ip)
16
16
  res = Enrichers::Shodan.query(ip)
17
- return if res.nil?
17
+ return [] if res.nil?
18
18
 
19
19
  res.hostnames.map { |name| new(name: name) }
20
20
  end
@@ -4,7 +4,7 @@ module Mihari
4
4
  module Structs
5
5
  module VirusTotalIntelligence
6
6
  class ContextAttributes < Dry::Struct
7
- attribute :url, Types.Array(Types::String).optional
7
+ attribute :url, Types::String.optional
8
8
 
9
9
  def self.from_dynamic!(d)
10
10
  d = Types::Hash[d]
@@ -25,7 +25,7 @@ module Mihari
25
25
  when "file"
26
26
  id
27
27
  when "url"
28
- (context_attributes.url || []).first
28
+ context_attributes&.url
29
29
  when "domain"
30
30
  id
31
31
  when "ip_address"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mihari
4
- VERSION = "4.6.0"
4
+ VERSION = "4.6.1"
5
5
  end
@@ -53,6 +53,9 @@ module Mihari
53
53
 
54
54
  Rack::Handler::Puma.run(instance, Port: port, Host: host, Threads: threads, Verbose: verbose) do |_launcher|
55
55
  Launchy.open(url) if ENV["RACK_ENV"] != "development"
56
+ rescue Launchy::CommandNotFoundError
57
+ # ref. https://github.com/ninoseki/mihari/issues/477
58
+ # do nothing
56
59
  end
57
60
  end
58
61
  end
data/mihari.gemspec CHANGED
@@ -89,7 +89,7 @@ Gem::Specification.new do |spec|
89
89
  spec.add_dependency "rack-cors", "1.1.1"
90
90
  spec.add_dependency "securitytrails", "1.0.0"
91
91
  spec.add_dependency "semantic_logger", "4.11.0"
92
- spec.add_dependency "sentry-ruby", "5.3.0"
92
+ spec.add_dependency "sentry-ruby", "5.3.1"
93
93
  spec.add_dependency "shodanx", "0.2.1"
94
94
  spec.add_dependency "slack-notifier", "2.4.0"
95
95
  spec.add_dependency "spysex", "0.2.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mihari
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0
4
+ version: 4.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-15 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -870,14 +870,14 @@ dependencies:
870
870
  requirements:
871
871
  - - '='
872
872
  - !ruby/object:Gem::Version
873
- version: 5.3.0
873
+ version: 5.3.1
874
874
  type: :runtime
875
875
  prerelease: false
876
876
  version_requirements: !ruby/object:Gem::Requirement
877
877
  requirements:
878
878
  - - '='
879
879
  - !ruby/object:Gem::Version
880
- version: 5.3.0
880
+ version: 5.3.1
881
881
  - !ruby/object:Gem::Dependency
882
882
  name: shodanx
883
883
  requirement: !ruby/object:Gem::Requirement