mihari 5.7.1 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/config.ru +2 -0
  3. data/lib/mihari/analyzers/dnstwister.rb +2 -4
  4. data/lib/mihari/analyzers/urlscan.rb +1 -4
  5. data/lib/mihari/cli/main.rb +4 -12
  6. data/lib/mihari/clients/base.rb +23 -1
  7. data/lib/mihari/clients/binaryedge.rb +1 -3
  8. data/lib/mihari/clients/censys.rb +1 -2
  9. data/lib/mihari/clients/crtsh.rb +2 -3
  10. data/lib/mihari/clients/dnstwister.rb +1 -2
  11. data/lib/mihari/clients/fofa.rb +1 -3
  12. data/lib/mihari/clients/greynoise.rb +1 -2
  13. data/lib/mihari/clients/hunterhow.rb +1 -2
  14. data/lib/mihari/clients/misp.rb +1 -2
  15. data/lib/mihari/clients/onyphe.rb +1 -2
  16. data/lib/mihari/clients/otx.rb +2 -14
  17. data/lib/mihari/clients/passivetotal.rb +3 -16
  18. data/lib/mihari/clients/publsedive.rb +2 -17
  19. data/lib/mihari/clients/securitytrails.rb +3 -25
  20. data/lib/mihari/clients/shodan.rb +1 -2
  21. data/lib/mihari/clients/the_hive.rb +1 -2
  22. data/lib/mihari/clients/urlscan.rb +1 -2
  23. data/lib/mihari/clients/virustotal.rb +3 -17
  24. data/lib/mihari/clients/zoomeye.rb +9 -19
  25. data/lib/mihari/commands/alert.rb +11 -11
  26. data/lib/mihari/commands/database.rb +4 -2
  27. data/lib/mihari/commands/mixins.rb +11 -0
  28. data/lib/mihari/commands/search.rb +15 -15
  29. data/lib/mihari/constants.rb +1 -1
  30. data/lib/mihari/database.rb +3 -5
  31. data/lib/mihari/emitters/slack.rb +3 -6
  32. data/lib/mihari/emitters/the_hive.rb +3 -7
  33. data/lib/mihari/enrichers/google_public_dns.rb +2 -7
  34. data/lib/mihari/enrichers/ipinfo.rb +1 -3
  35. data/lib/mihari/enrichers/shodan.rb +1 -3
  36. data/lib/mihari/enrichers/whois.rb +0 -4
  37. data/lib/mihari/http.rb +13 -11
  38. data/lib/mihari/mixins/refang.rb +1 -4
  39. data/lib/mihari/mixins/unwrap_error.rb +27 -0
  40. data/lib/mihari/models/alert.rb +1 -3
  41. data/lib/mihari/models/artifact.rb +5 -7
  42. data/lib/mihari/models/rule.rb +1 -2
  43. data/lib/mihari/rule.rb +14 -10
  44. data/lib/mihari/service.rb +2 -0
  45. data/lib/mihari/services/rule_builder.rb +2 -4
  46. data/lib/mihari/structs/fofa.rb +2 -0
  47. data/lib/mihari/version.rb +1 -1
  48. data/lib/mihari/web/app.rb +3 -1
  49. data/lib/mihari/web/endpoints/alerts.rb +14 -18
  50. data/lib/mihari/web/endpoints/artifacts.rb +17 -22
  51. data/lib/mihari/web/endpoints/configs.rb +0 -1
  52. data/lib/mihari/web/endpoints/ip_addresses.rb +1 -1
  53. data/lib/mihari/web/endpoints/rules.rb +27 -32
  54. data/lib/mihari/web/endpoints/tags.rb +7 -9
  55. data/lib/mihari/web/middleware/connection_adapter.rb +3 -5
  56. data/lib/mihari/web/middleware/error_notification_adapter.rb +15 -6
  57. data/lib/mihari/web/public/assets/{index-07fafab5.js → index-07cddfcd.js} +44 -44
  58. data/lib/mihari/web/public/index.html +1 -1
  59. data/lib/mihari/web/public/redoc-static.html +381 -401
  60. data/lib/mihari.rb +1 -2
  61. data/mihari.gemspec +14 -16
  62. data/mkdocs.yml +14 -8
  63. data/requirements.txt +1 -1
  64. metadata +81 -39
  65. data/lib/mihari/mixins/error_notification.rb +0 -21
  66. data/lib/mihari/services/rule_runner.rb +0 -19
data/lib/mihari.rb CHANGED
@@ -53,9 +53,9 @@ require "mihari/config"
53
53
  require "mihari/mixins/autonomous_system"
54
54
  require "mihari/mixins/configurable"
55
55
  require "mihari/mixins/falsepositive"
56
- require "mihari/mixins/error_notification"
57
56
  require "mihari/mixins/refang"
58
57
  require "mihari/mixins/retriable"
58
+ require "mihari/mixins/unwrap_error"
59
59
 
60
60
  #
61
61
  # Mihari module
@@ -261,7 +261,6 @@ require "mihari/schemas/rule"
261
261
 
262
262
  # Services
263
263
  require "mihari/services/rule_builder"
264
- require "mihari/services/rule_runner"
265
264
 
266
265
  require "mihari/services/alert_builder"
267
266
  require "mihari/services/alert_runner"
data/mihari.gemspec CHANGED
@@ -10,10 +10,6 @@ def ci_env?
10
10
  ENV["CI"]
11
11
  end
12
12
 
13
- def is_ruby2?
14
- RUBY_VERSION.to_s.start_with?("2.")
15
- end
16
-
17
13
  Gem::Specification.new do |spec|
18
14
  spec.name = "mihari"
19
15
  spec.version = Mihari::VERSION
@@ -24,7 +20,7 @@ Gem::Specification.new do |spec|
24
20
  spec.homepage = "https://github.com/ninoseki/mihari"
25
21
  spec.license = "MIT"
26
22
 
27
- spec.required_ruby_version = ">= 2.7"
23
+ spec.required_ruby_version = ">= 3.1"
28
24
 
29
25
  spec.metadata["rubygems_mfa_required"] = "true"
30
26
 
@@ -40,6 +36,8 @@ Gem::Specification.new do |spec|
40
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
41
37
  spec.require_paths = ["lib"]
42
38
 
39
+ spec.add_development_dependency "better_errors", "~> 2.10"
40
+ spec.add_development_dependency "binding_of_caller", "~> 1.0"
43
41
  spec.add_development_dependency "bundler", "~> 2.4"
44
42
  spec.add_development_dependency "coveralls_reborn", "~> 0.28"
45
43
  spec.add_development_dependency "fakefs", "~> 2.5"
@@ -48,26 +46,26 @@ Gem::Specification.new do |spec|
48
46
  spec.add_development_dependency "mysql2", "~> 0.5"
49
47
  spec.add_development_dependency "pg", "~> 1.5"
50
48
  spec.add_development_dependency "rack-test", "~> 2.1"
51
- spec.add_development_dependency "rake", "~> 13.0"
49
+ spec.add_development_dependency "rake", "~> 13.1"
52
50
  spec.add_development_dependency "rb-fsevent", "~> 0.11"
53
51
  spec.add_development_dependency "rerun", "~> 0.14"
54
52
  spec.add_development_dependency "rspec", "~> 3.12"
53
+ spec.add_development_dependency "rspec-parameterized", "~> 1.0"
55
54
  spec.add_development_dependency "rubocop-rspec", "~> 2.25"
55
+ spec.add_development_dependency "rubocop-yard", "~> 0.8"
56
56
  spec.add_development_dependency "simplecov-lcov", "~> 0.8"
57
- spec.add_development_dependency "standard", "~> 1.31"
57
+ spec.add_development_dependency "standard", "~> 1.32"
58
58
  spec.add_development_dependency "test-prof", "~> 1.2"
59
59
  spec.add_development_dependency "timecop", "~> 0.9"
60
60
  spec.add_development_dependency "vcr", "~> 6.2"
61
61
  spec.add_development_dependency "webmock", "~> 3.19"
62
62
 
63
- spec.add_development_dependency "rubocop-yard", "~> 0.7" unless is_ruby2?
64
-
65
63
  unless ci_env?
66
64
  spec.add_development_dependency "lefthook", "~> 1.5"
67
65
  spec.add_development_dependency "solargraph", "~> 0.49"
68
66
  end
69
67
 
70
- spec.add_dependency "activerecord", "7.1.1"
68
+ spec.add_dependency "activerecord", "7.1.2"
71
69
  spec.add_dependency "addressable", "2.8.5"
72
70
  spec.add_dependency "anyway_config", "2.5.4"
73
71
  spec.add_dependency "awrence", "2.0.1"
@@ -79,9 +77,9 @@ Gem::Specification.new do |spec|
79
77
  spec.add_dependency "dry-struct", "1.6.0"
80
78
  spec.add_dependency "dry-validation", "1.10.0"
81
79
  spec.add_dependency "email_address", "0.2.4"
82
- spec.add_dependency "grape", "1.8.0"
80
+ spec.add_dependency "grape", "2.0.0"
83
81
  spec.add_dependency "grape-entity", "1.0.0"
84
- spec.add_dependency "grape-swagger", "1.6.1"
82
+ spec.add_dependency "grape-swagger", "2.0.0"
85
83
  spec.add_dependency "grape-swagger-entity", "0.5.2"
86
84
  spec.add_dependency "http", "5.1.1"
87
85
  spec.add_dependency "jr-cli", "0.6.0"
@@ -90,18 +88,18 @@ Gem::Specification.new do |spec|
90
88
  spec.add_dependency "normalize_country", "0.3.2"
91
89
  spec.add_dependency "parallel", "1.23.0"
92
90
  spec.add_dependency "plissken", "2.0.1"
93
- spec.add_dependency "public_suffix", "5.0.3"
91
+ spec.add_dependency "public_suffix", "5.0.4"
94
92
  spec.add_dependency "puma", "6.4.0"
95
93
  spec.add_dependency "rack", "3.0.8"
96
94
  spec.add_dependency "rack-cors", "2.0.1"
97
95
  spec.add_dependency "rackup", "2.1.0"
98
- spec.add_dependency "semantic_logger", "4.14.0"
99
- spec.add_dependency "sentry-ruby", "5.12.0"
96
+ spec.add_dependency "semantic_logger", "4.15.0"
97
+ spec.add_dependency "sentry-ruby", "5.13.0"
100
98
  spec.add_dependency "slack-notifier", "2.4.0"
101
99
  spec.add_dependency "sqlite3", "1.6.8"
102
100
  spec.add_dependency "thor", "1.3.0"
103
101
  spec.add_dependency "thor-hollaback", "0.2.1"
104
102
  spec.add_dependency "uuidtools", "2.2.0"
105
- spec.add_dependency "whois", "5.1.0"
103
+ spec.add_dependency "whois", "5.1.1"
106
104
  spec.add_dependency "whois-parser", "2.0.0"
107
105
  end
data/mkdocs.yml CHANGED
@@ -16,14 +16,16 @@ nav:
16
16
  - Usage: usage.md
17
17
  - Configuration: configuration.md
18
18
  - Tips:
19
- - Docker: docker.md
20
- - GitHub Actions: github_actions.md
21
- - Alternatives: alternatives.md
19
+ - Docker: tips/docker.md
20
+ - GitHub Actions: tips/github_actions.md
21
+ - Superset: tips/superset.md
22
+ - Alternatives: tips/alternatives.md
22
23
  - References:
23
- - Analyzers: "analyzers/index.md"
24
- - Enrichers: "enrichers/index.md"
25
- - Emitters: "emitters/index.md"
26
- - Tags: "./tags.md"
24
+ - Analyzers: analyzers/index.md
25
+ - Enrichers: enrichers/index.md
26
+ - Emitters: emitters/index.md
27
+ - Database: database.md
28
+ - Tags: tags.md
27
29
 
28
30
  markdown_extensions:
29
31
  - toc:
@@ -33,4 +35,8 @@ markdown_extensions:
33
35
  - pymdownx.extra
34
36
  - pymdownx.highlight
35
37
  - pymdownx.magiclink
36
- - pymdownx.superfences
38
+ - pymdownx.superfences:
39
+ custom_fences:
40
+ - name: mermaid
41
+ class: mermaid
42
+ format: !!python/name:pymdownx.superfences.fence_code_format
data/requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
1
  mkdocs==1.5.3
2
- mkdocs-material==9.4.7
2
+ mkdocs-material==9.4.8
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mihari
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.7.1
4
+ version: 6.0.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: 2023-11-05 00:00:00.000000000 Z
11
+ date: 2023-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: better_errors
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: binding_of_caller
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: bundler
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +156,14 @@ dependencies:
128
156
  requirements:
129
157
  - - "~>"
130
158
  - !ruby/object:Gem::Version
131
- version: '13.0'
159
+ version: '13.1'
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '13.0'
166
+ version: '13.1'
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: rb-fsevent
141
169
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +206,20 @@ dependencies:
178
206
  - - "~>"
179
207
  - !ruby/object:Gem::Version
180
208
  version: '3.12'
209
+ - !ruby/object:Gem::Dependency
210
+ name: rspec-parameterized
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '1.0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '1.0'
181
223
  - !ruby/object:Gem::Dependency
182
224
  name: rubocop-rspec
183
225
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +234,20 @@ dependencies:
192
234
  - - "~>"
193
235
  - !ruby/object:Gem::Version
194
236
  version: '2.25'
237
+ - !ruby/object:Gem::Dependency
238
+ name: rubocop-yard
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '0.8'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '0.8'
195
251
  - !ruby/object:Gem::Dependency
196
252
  name: simplecov-lcov
197
253
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +268,14 @@ dependencies:
212
268
  requirements:
213
269
  - - "~>"
214
270
  - !ruby/object:Gem::Version
215
- version: '1.31'
271
+ version: '1.32'
216
272
  type: :development
217
273
  prerelease: false
218
274
  version_requirements: !ruby/object:Gem::Requirement
219
275
  requirements:
220
276
  - - "~>"
221
277
  - !ruby/object:Gem::Version
222
- version: '1.31'
278
+ version: '1.32'
223
279
  - !ruby/object:Gem::Dependency
224
280
  name: test-prof
225
281
  requirement: !ruby/object:Gem::Requirement
@@ -276,20 +332,6 @@ dependencies:
276
332
  - - "~>"
277
333
  - !ruby/object:Gem::Version
278
334
  version: '3.19'
279
- - !ruby/object:Gem::Dependency
280
- name: rubocop-yard
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - "~>"
284
- - !ruby/object:Gem::Version
285
- version: '0.7'
286
- type: :development
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - "~>"
291
- - !ruby/object:Gem::Version
292
- version: '0.7'
293
335
  - !ruby/object:Gem::Dependency
294
336
  name: lefthook
295
337
  requirement: !ruby/object:Gem::Requirement
@@ -324,14 +366,14 @@ dependencies:
324
366
  requirements:
325
367
  - - '='
326
368
  - !ruby/object:Gem::Version
327
- version: 7.1.1
369
+ version: 7.1.2
328
370
  type: :runtime
329
371
  prerelease: false
330
372
  version_requirements: !ruby/object:Gem::Requirement
331
373
  requirements:
332
374
  - - '='
333
375
  - !ruby/object:Gem::Version
334
- version: 7.1.1
376
+ version: 7.1.2
335
377
  - !ruby/object:Gem::Dependency
336
378
  name: addressable
337
379
  requirement: !ruby/object:Gem::Requirement
@@ -492,14 +534,14 @@ dependencies:
492
534
  requirements:
493
535
  - - '='
494
536
  - !ruby/object:Gem::Version
495
- version: 1.8.0
537
+ version: 2.0.0
496
538
  type: :runtime
497
539
  prerelease: false
498
540
  version_requirements: !ruby/object:Gem::Requirement
499
541
  requirements:
500
542
  - - '='
501
543
  - !ruby/object:Gem::Version
502
- version: 1.8.0
544
+ version: 2.0.0
503
545
  - !ruby/object:Gem::Dependency
504
546
  name: grape-entity
505
547
  requirement: !ruby/object:Gem::Requirement
@@ -520,14 +562,14 @@ dependencies:
520
562
  requirements:
521
563
  - - '='
522
564
  - !ruby/object:Gem::Version
523
- version: 1.6.1
565
+ version: 2.0.0
524
566
  type: :runtime
525
567
  prerelease: false
526
568
  version_requirements: !ruby/object:Gem::Requirement
527
569
  requirements:
528
570
  - - '='
529
571
  - !ruby/object:Gem::Version
530
- version: 1.6.1
572
+ version: 2.0.0
531
573
  - !ruby/object:Gem::Dependency
532
574
  name: grape-swagger-entity
533
575
  requirement: !ruby/object:Gem::Requirement
@@ -646,14 +688,14 @@ dependencies:
646
688
  requirements:
647
689
  - - '='
648
690
  - !ruby/object:Gem::Version
649
- version: 5.0.3
691
+ version: 5.0.4
650
692
  type: :runtime
651
693
  prerelease: false
652
694
  version_requirements: !ruby/object:Gem::Requirement
653
695
  requirements:
654
696
  - - '='
655
697
  - !ruby/object:Gem::Version
656
- version: 5.0.3
698
+ version: 5.0.4
657
699
  - !ruby/object:Gem::Dependency
658
700
  name: puma
659
701
  requirement: !ruby/object:Gem::Requirement
@@ -716,28 +758,28 @@ dependencies:
716
758
  requirements:
717
759
  - - '='
718
760
  - !ruby/object:Gem::Version
719
- version: 4.14.0
761
+ version: 4.15.0
720
762
  type: :runtime
721
763
  prerelease: false
722
764
  version_requirements: !ruby/object:Gem::Requirement
723
765
  requirements:
724
766
  - - '='
725
767
  - !ruby/object:Gem::Version
726
- version: 4.14.0
768
+ version: 4.15.0
727
769
  - !ruby/object:Gem::Dependency
728
770
  name: sentry-ruby
729
771
  requirement: !ruby/object:Gem::Requirement
730
772
  requirements:
731
773
  - - '='
732
774
  - !ruby/object:Gem::Version
733
- version: 5.12.0
775
+ version: 5.13.0
734
776
  type: :runtime
735
777
  prerelease: false
736
778
  version_requirements: !ruby/object:Gem::Requirement
737
779
  requirements:
738
780
  - - '='
739
781
  - !ruby/object:Gem::Version
740
- version: 5.12.0
782
+ version: 5.13.0
741
783
  - !ruby/object:Gem::Dependency
742
784
  name: slack-notifier
743
785
  requirement: !ruby/object:Gem::Requirement
@@ -814,14 +856,14 @@ dependencies:
814
856
  requirements:
815
857
  - - '='
816
858
  - !ruby/object:Gem::Version
817
- version: 5.1.0
859
+ version: 5.1.1
818
860
  type: :runtime
819
861
  prerelease: false
820
862
  version_requirements: !ruby/object:Gem::Requirement
821
863
  requirements:
822
864
  - - '='
823
865
  - !ruby/object:Gem::Version
824
- version: 5.1.0
866
+ version: 5.1.1
825
867
  - !ruby/object:Gem::Dependency
826
868
  name: whois-parser
827
869
  requirement: !ruby/object:Gem::Requirement
@@ -907,6 +949,7 @@ files:
907
949
  - lib/mihari/clients/zoomeye.rb
908
950
  - lib/mihari/commands/alert.rb
909
951
  - lib/mihari/commands/database.rb
952
+ - lib/mihari/commands/mixins.rb
910
953
  - lib/mihari/commands/rule.rb
911
954
  - lib/mihari/commands/search.rb
912
955
  - lib/mihari/commands/version.rb
@@ -945,10 +988,10 @@ files:
945
988
  - lib/mihari/http.rb
946
989
  - lib/mihari/mixins/autonomous_system.rb
947
990
  - lib/mihari/mixins/configurable.rb
948
- - lib/mihari/mixins/error_notification.rb
949
991
  - lib/mihari/mixins/falsepositive.rb
950
992
  - lib/mihari/mixins/refang.rb
951
993
  - lib/mihari/mixins/retriable.rb
994
+ - lib/mihari/mixins/unwrap_error.rb
952
995
  - lib/mihari/models/alert.rb
953
996
  - lib/mihari/models/artifact.rb
954
997
  - lib/mihari/models/autonomous_system.rb
@@ -974,7 +1017,6 @@ files:
974
1017
  - lib/mihari/services/alert_builder.rb
975
1018
  - lib/mihari/services/alert_runner.rb
976
1019
  - lib/mihari/services/rule_builder.rb
977
- - lib/mihari/services/rule_runner.rb
978
1020
  - lib/mihari/structs/binaryedge.rb
979
1021
  - lib/mihari/structs/censys.rb
980
1022
  - lib/mihari/structs/config.rb
@@ -1001,7 +1043,7 @@ files:
1001
1043
  - lib/mihari/web/endpoints/tags.rb
1002
1044
  - lib/mihari/web/middleware/connection_adapter.rb
1003
1045
  - lib/mihari/web/middleware/error_notification_adapter.rb
1004
- - lib/mihari/web/public/assets/index-07fafab5.js
1046
+ - lib/mihari/web/public/assets/index-07cddfcd.js
1005
1047
  - lib/mihari/web/public/assets/index-56fc2187.css
1006
1048
  - lib/mihari/web/public/assets/mode-yaml-24faa242.js
1007
1049
  - lib/mihari/web/public/favicon.ico
@@ -1024,14 +1066,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1024
1066
  requirements:
1025
1067
  - - ">="
1026
1068
  - !ruby/object:Gem::Version
1027
- version: '2.7'
1069
+ version: '3.1'
1028
1070
  required_rubygems_version: !ruby/object:Gem::Requirement
1029
1071
  requirements:
1030
1072
  - - ">="
1031
1073
  - !ruby/object:Gem::Version
1032
1074
  version: '0'
1033
1075
  requirements: []
1034
- rubygems_version: 3.4.20
1076
+ rubygems_version: 3.4.10
1035
1077
  signing_key:
1036
1078
  specification_version: 4
1037
1079
  summary: A query aggregator for OSINT based threat hunting
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Mihari
4
- module Mixins
5
- #
6
- # Error notification mixin
7
- #
8
- module ErrorNotification
9
- #
10
- # Send an exception notification if there is any error in a block
11
- #
12
- def with_error_notification
13
- yield
14
- rescue StandardError => e
15
- Mihari.logger.error e
16
-
17
- Sentry.capture_exception(e) if Sentry.initialized?
18
- end
19
- end
20
- end
21
- end
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Mihari
4
- module Services
5
- #
6
- # Rule runner
7
- #
8
- class RuleRunner < Service
9
- #
10
- # @params [Mihari::Rule]
11
- #
12
- # @return [Mihari::Models::Alert, nil]
13
- #
14
- def call(rule)
15
- rule.call
16
- end
17
- end
18
- end
19
- end