mihari 7.1.3 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +2 -2
  3. data/Rakefile +8 -1
  4. data/lefthook.yml +4 -1
  5. data/lib/mihari/actor.rb +16 -0
  6. data/lib/mihari/analyzers/base.rb +7 -25
  7. data/lib/mihari/analyzers/binaryedge.rb +0 -6
  8. data/lib/mihari/analyzers/censys.rb +0 -9
  9. data/lib/mihari/analyzers/circl.rb +0 -6
  10. data/lib/mihari/analyzers/fofa.rb +0 -6
  11. data/lib/mihari/analyzers/greynoise.rb +0 -6
  12. data/lib/mihari/analyzers/hunterhow.rb +0 -6
  13. data/lib/mihari/analyzers/onyphe.rb +0 -6
  14. data/lib/mihari/analyzers/otx.rb +0 -6
  15. data/lib/mihari/analyzers/passivetotal.rb +0 -4
  16. data/lib/mihari/analyzers/pulsedive.rb +0 -6
  17. data/lib/mihari/analyzers/securitytrails.rb +0 -4
  18. data/lib/mihari/analyzers/shodan.rb +0 -6
  19. data/lib/mihari/analyzers/urlscan.rb +0 -6
  20. data/lib/mihari/analyzers/virustotal.rb +0 -4
  21. data/lib/mihari/analyzers/virustotal_intelligence.rb +7 -6
  22. data/lib/mihari/analyzers/zoomeye.rb +0 -6
  23. data/lib/mihari/commands/web.rb +1 -1
  24. data/lib/mihari/concerns/falsepositive_normalizable.rb +30 -0
  25. data/lib/mihari/concerns/falsepositive_validatable.rb +1 -17
  26. data/lib/mihari/config.rb +1 -1
  27. data/lib/mihari/database.rb +18 -1
  28. data/lib/mihari/emitters/database.rb +0 -6
  29. data/lib/mihari/emitters/misp.rb +0 -6
  30. data/lib/mihari/emitters/slack.rb +5 -21
  31. data/lib/mihari/emitters/the_hive.rb +0 -6
  32. data/lib/mihari/enrichers/base.rb +54 -12
  33. data/lib/mihari/enrichers/google_public_dns.rb +28 -7
  34. data/lib/mihari/enrichers/mmdb.rb +25 -7
  35. data/lib/mihari/enrichers/shodan.rb +35 -4
  36. data/lib/mihari/enrichers/whois.rb +37 -31
  37. data/lib/mihari/entities/artifact.rb +6 -2
  38. data/lib/mihari/entities/autonomous_system.rb +1 -1
  39. data/lib/mihari/entities/cpe.rb +1 -1
  40. data/lib/mihari/entities/port.rb +1 -1
  41. data/lib/mihari/entities/vulnerability.rb +10 -0
  42. data/lib/mihari/errors.rb +2 -0
  43. data/lib/mihari/models/alert.rb +12 -0
  44. data/lib/mihari/models/artifact.rb +118 -159
  45. data/lib/mihari/models/rule.rb +21 -0
  46. data/lib/mihari/models/vulnerability.rb +12 -0
  47. data/lib/mihari/rule.rb +44 -29
  48. data/lib/mihari/schemas/alert.rb +3 -3
  49. data/lib/mihari/schemas/analyzer.rb +27 -27
  50. data/lib/mihari/schemas/emitter.rb +9 -9
  51. data/lib/mihari/schemas/macros.rb +2 -2
  52. data/lib/mihari/schemas/options.rb +2 -5
  53. data/lib/mihari/schemas/rule.rb +19 -12
  54. data/lib/mihari/services/builders.rb +0 -134
  55. data/lib/mihari/services/enrichers.rb +3 -1
  56. data/lib/mihari/services/feed.rb +2 -5
  57. data/lib/mihari/services/getters.rb +1 -1
  58. data/lib/mihari/services/proxies.rb +3 -3
  59. data/lib/mihari/structs/censys.rb +2 -2
  60. data/lib/mihari/structs/greynoise.rb +1 -1
  61. data/lib/mihari/structs/onyphe.rb +1 -1
  62. data/lib/mihari/structs/shodan.rb +59 -21
  63. data/lib/mihari/version.rb +1 -1
  64. data/lib/mihari/web/endpoints/artifacts.rb +4 -2
  65. data/lib/mihari/web/endpoints/rules.rb +1 -1
  66. data/lib/mihari/web/public/assets/{index-TOeU8PE2.js → index-JHS0L8KZ.js} +47 -47
  67. data/lib/mihari/web/public/assets/{index-dVaNxqTC.css → index-ReF8ffd-.css} +1 -1
  68. data/lib/mihari/web/public/index.html +2 -2
  69. data/lib/mihari/web/public/redoc-static.html +17 -17
  70. data/lib/mihari.rb +3 -0
  71. data/mihari.gemspec +2 -2
  72. data/requirements.txt +1 -1
  73. metadata +11 -8
data/lib/mihari.rb CHANGED
@@ -55,6 +55,7 @@ require "mihari/concerns/autonomous_system_normalizable"
55
55
  require "mihari/concerns/configurable"
56
56
  require "mihari/concerns/database_connectable"
57
57
  require "mihari/concerns/error_unwrappable"
58
+ require "mihari/concerns/falsepositive_normalizable"
58
59
  require "mihari/concerns/falsepositive_validatable"
59
60
  require "mihari/concerns/refangable"
60
61
  require "mihari/concerns/retriable"
@@ -207,6 +208,7 @@ require "mihari/models/reverse_dns"
207
208
  require "mihari/models/rule"
208
209
  require "mihari/models/tag"
209
210
  require "mihari/models/tagging"
211
+ require "mihari/models/vulnerability"
210
212
  require "mihari/models/whois"
211
213
 
212
214
  # Emitters
@@ -323,6 +325,7 @@ require "mihari/entities/messages"
323
325
  require "mihari/entities/port"
324
326
  require "mihari/entities/reverse_dns"
325
327
  require "mihari/entities/tag"
328
+ require "mihari/entities/vulnerability"
326
329
  require "mihari/entities/whois"
327
330
 
328
331
  require "mihari/entities/artifact"
data/mihari.gemspec CHANGED
@@ -70,7 +70,7 @@ Gem::Specification.new do |spec|
70
70
  spec.add_development_dependency "solargraph", "~> 0.50"
71
71
  end
72
72
 
73
- spec.add_dependency "activerecord", "7.1.2"
73
+ spec.add_dependency "activerecord", "7.1.3"
74
74
  spec.add_dependency "addressable", "~> 2.8"
75
75
  spec.add_dependency "anyway_config", "2.6.2"
76
76
  spec.add_dependency "awrence", "2.0.1"
@@ -105,7 +105,7 @@ Gem::Specification.new do |spec|
105
105
  spec.add_dependency "semantic_logger", "4.15.0"
106
106
  spec.add_dependency "sentry-ruby", "~> 5.16"
107
107
  spec.add_dependency "sentry-sidekiq", "~> 5.16"
108
- spec.add_dependency "sidekiq", "7.2.0"
108
+ spec.add_dependency "sidekiq", "7.2.1"
109
109
  spec.add_dependency "slack-notifier", "2.4.0"
110
110
  spec.add_dependency "sqlite3", "~> 1.7"
111
111
  spec.add_dependency "thor", "1.3.0"
data/requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
1
  mkdocs==1.5.3
2
- mkdocs-material==9.5.3
2
+ mkdocs-material==9.5.4
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: 7.1.3
4
+ version: 7.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-13 00:00:00.000000000 Z
11
+ date: 2024-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_errors
@@ -394,14 +394,14 @@ dependencies:
394
394
  requirements:
395
395
  - - '='
396
396
  - !ruby/object:Gem::Version
397
- version: 7.1.2
397
+ version: 7.1.3
398
398
  type: :runtime
399
399
  prerelease: false
400
400
  version_requirements: !ruby/object:Gem::Requirement
401
401
  requirements:
402
402
  - - '='
403
403
  - !ruby/object:Gem::Version
404
- version: 7.1.2
404
+ version: 7.1.3
405
405
  - !ruby/object:Gem::Dependency
406
406
  name: addressable
407
407
  requirement: !ruby/object:Gem::Requirement
@@ -884,14 +884,14 @@ dependencies:
884
884
  requirements:
885
885
  - - '='
886
886
  - !ruby/object:Gem::Version
887
- version: 7.2.0
887
+ version: 7.2.1
888
888
  type: :runtime
889
889
  prerelease: false
890
890
  version_requirements: !ruby/object:Gem::Requirement
891
891
  requirements:
892
892
  - - '='
893
893
  - !ruby/object:Gem::Version
894
- version: 7.2.0
894
+ version: 7.2.1
895
895
  - !ruby/object:Gem::Dependency
896
896
  name: slack-notifier
897
897
  requirement: !ruby/object:Gem::Requirement
@@ -1109,6 +1109,7 @@ files:
1109
1109
  - lib/mihari/concerns/configurable.rb
1110
1110
  - lib/mihari/concerns/database_connectable.rb
1111
1111
  - lib/mihari/concerns/error_unwrappable.rb
1112
+ - lib/mihari/concerns/falsepositive_normalizable.rb
1112
1113
  - lib/mihari/concerns/falsepositive_validatable.rb
1113
1114
  - lib/mihari/concerns/refangable.rb
1114
1115
  - lib/mihari/concerns/retriable.rb
@@ -1141,6 +1142,7 @@ files:
1141
1142
  - lib/mihari/entities/reverse_dns.rb
1142
1143
  - lib/mihari/entities/rule.rb
1143
1144
  - lib/mihari/entities/tag.rb
1145
+ - lib/mihari/entities/vulnerability.rb
1144
1146
  - lib/mihari/entities/whois.rb
1145
1147
  - lib/mihari/errors.rb
1146
1148
  - lib/mihari/http.rb
@@ -1156,6 +1158,7 @@ files:
1156
1158
  - lib/mihari/models/rule.rb
1157
1159
  - lib/mihari/models/tag.rb
1158
1160
  - lib/mihari/models/tagging.rb
1161
+ - lib/mihari/models/vulnerability.rb
1159
1162
  - lib/mihari/models/whois.rb
1160
1163
  - lib/mihari/rule.rb
1161
1164
  - lib/mihari/schemas/alert.rb
@@ -1204,8 +1207,8 @@ files:
1204
1207
  - lib/mihari/web/endpoints/tags.rb
1205
1208
  - lib/mihari/web/middleware/capture_exceptions.rb
1206
1209
  - lib/mihari/web/middleware/connection.rb
1207
- - lib/mihari/web/public/assets/index-TOeU8PE2.js
1208
- - lib/mihari/web/public/assets/index-dVaNxqTC.css
1210
+ - lib/mihari/web/public/assets/index-JHS0L8KZ.js
1211
+ - lib/mihari/web/public/assets/index-ReF8ffd-.css
1209
1212
  - lib/mihari/web/public/assets/mode-yaml-BC4MIiYj.js
1210
1213
  - lib/mihari/web/public/favicon.ico
1211
1214
  - lib/mihari/web/public/index.html