mihari 5.2.2 → 5.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/build_frontend.sh +1 -9
  3. data/frontend/.browserslistrc +3 -0
  4. data/frontend/.eslintrc.js +33 -0
  5. data/frontend/.gitignore +25 -0
  6. data/frontend/README.md +3 -0
  7. data/frontend/babel.config.js +3 -0
  8. data/frontend/index.html +21 -0
  9. data/frontend/jest.config.js +9 -0
  10. data/frontend/package-lock.json +13216 -0
  11. data/frontend/package.json +54 -0
  12. data/frontend/public/favicon.ico +0 -0
  13. data/frontend/scripts/swagger_doc_to_yaml.rb +23 -0
  14. data/frontend/src/App.vue +27 -0
  15. data/frontend/src/api-helper.ts +113 -0
  16. data/frontend/src/api.ts +105 -0
  17. data/frontend/src/components/ErrorMessage.vue +32 -0
  18. data/frontend/src/components/Loading.vue +15 -0
  19. data/frontend/src/components/Navbar.vue +59 -0
  20. data/frontend/src/components/Pagination.vue +126 -0
  21. data/frontend/src/components/alert/Alert.vue +92 -0
  22. data/frontend/src/components/alert/Alerts.vue +66 -0
  23. data/frontend/src/components/alert/AlertsWithPagination.vue +91 -0
  24. data/frontend/src/components/alert/AlertsWrapper.vue +141 -0
  25. data/frontend/src/components/alert/Form.vue +185 -0
  26. data/frontend/src/components/artifact/AS.vue +29 -0
  27. data/frontend/src/components/artifact/Artifact.vue +321 -0
  28. data/frontend/src/components/artifact/ArtifactTag.vue +70 -0
  29. data/frontend/src/components/artifact/ArtifactTags.vue +29 -0
  30. data/frontend/src/components/artifact/ArtifactWrapper.vue +62 -0
  31. data/frontend/src/components/artifact/CPEs.vue +23 -0
  32. data/frontend/src/components/artifact/DnsRecords.vue +38 -0
  33. data/frontend/src/components/artifact/Ports.vue +23 -0
  34. data/frontend/src/components/artifact/ReverseDnsNames.vue +31 -0
  35. data/frontend/src/components/artifact/Tags.vue +29 -0
  36. data/frontend/src/components/artifact/WhoisRecord.vue +49 -0
  37. data/frontend/src/components/config/Configs.vue +68 -0
  38. data/frontend/src/components/config/ConfigsWrapper.vue +40 -0
  39. data/frontend/src/components/link/Link.vue +32 -0
  40. data/frontend/src/components/link/Links.vue +47 -0
  41. data/frontend/src/components/rule/EditRule.vue +74 -0
  42. data/frontend/src/components/rule/EditRuleWrapper.vue +56 -0
  43. data/frontend/src/components/rule/Form.vue +160 -0
  44. data/frontend/src/components/rule/InputForm.vue +80 -0
  45. data/frontend/src/components/rule/NewRule.vue +60 -0
  46. data/frontend/src/components/rule/Rule.vue +108 -0
  47. data/frontend/src/components/rule/RuleWrapper.vue +62 -0
  48. data/frontend/src/components/rule/Rules.vue +88 -0
  49. data/frontend/src/components/rule/RulesWrapper.vue +130 -0
  50. data/frontend/src/components/rule/YAML.vue +47 -0
  51. data/frontend/src/components/tag/Tag.vue +73 -0
  52. data/frontend/src/components/tag/Tags.vue +37 -0
  53. data/frontend/src/countries.ts +350 -0
  54. data/frontend/src/index.ts +23 -0
  55. data/frontend/src/links/anyrun.ts +19 -0
  56. data/frontend/src/links/base.ts +14 -0
  57. data/frontend/src/links/censys.ts +20 -0
  58. data/frontend/src/links/crtsh.ts +20 -0
  59. data/frontend/src/links/dnslytics.ts +38 -0
  60. data/frontend/src/links/greynoise.ts +20 -0
  61. data/frontend/src/links/index.ts +40 -0
  62. data/frontend/src/links/intezer.ts +20 -0
  63. data/frontend/src/links/otx.ts +33 -0
  64. data/frontend/src/links/securitytrails.ts +38 -0
  65. data/frontend/src/links/shodan.ts +20 -0
  66. data/frontend/src/links/urlscan.ts +50 -0
  67. data/frontend/src/links/virustotal.ts +72 -0
  68. data/frontend/src/main.ts +11 -0
  69. data/frontend/src/router/index.ts +57 -0
  70. data/frontend/src/rule.ts +14 -0
  71. data/frontend/src/shims-vue.d.ts +6 -0
  72. data/frontend/src/swagger.yaml +737 -0
  73. data/frontend/src/types.ts +188 -0
  74. data/frontend/src/utils.ts +60 -0
  75. data/frontend/src/views/Alerts.vue +20 -0
  76. data/frontend/src/views/Artifact.vue +44 -0
  77. data/frontend/src/views/Configs.vue +20 -0
  78. data/frontend/src/views/EditRule.vue +44 -0
  79. data/frontend/src/views/NewRule.vue +26 -0
  80. data/frontend/src/views/Rule.vue +44 -0
  81. data/frontend/src/views/Rules.vue +20 -0
  82. data/frontend/tests/unit/utils.spec.ts +7 -0
  83. data/frontend/tsconfig.json +40 -0
  84. data/frontend/vite.config.js +24 -0
  85. data/lefthook.yml +10 -0
  86. data/lib/mihari/analyzers/base.rb +22 -5
  87. data/lib/mihari/analyzers/binaryedge.rb +0 -1
  88. data/lib/mihari/analyzers/censys.rb +7 -2
  89. data/lib/mihari/analyzers/circl.rb +1 -1
  90. data/lib/mihari/analyzers/passivetotal.rb +1 -1
  91. data/lib/mihari/analyzers/rule.rb +43 -73
  92. data/lib/mihari/analyzers/virustotal_intelligence.rb +1 -2
  93. data/lib/mihari/clients/base.rb +1 -1
  94. data/lib/mihari/commands/database.rb +12 -11
  95. data/lib/mihari/commands/rule.rb +47 -45
  96. data/lib/mihari/commands/search.rb +73 -45
  97. data/lib/mihari/commands/version.rb +8 -6
  98. data/lib/mihari/commands/web.rb +26 -23
  99. data/lib/mihari/emitters/base.rb +14 -1
  100. data/lib/mihari/emitters/database.rb +3 -10
  101. data/lib/mihari/emitters/misp.rb +16 -5
  102. data/lib/mihari/emitters/slack.rb +13 -15
  103. data/lib/mihari/emitters/the_hive.rb +17 -19
  104. data/lib/mihari/emitters/webhook.rb +23 -23
  105. data/lib/mihari/enrichers/whois.rb +1 -0
  106. data/lib/mihari/entities/rule.rb +1 -1
  107. data/lib/mihari/entities/tag.rb +1 -1
  108. data/lib/mihari/feed/parser.rb +1 -0
  109. data/lib/mihari/feed/reader.rb +29 -14
  110. data/lib/mihari/mixins/configurable.rb +13 -4
  111. data/lib/mihari/schemas/analyzer.rb +2 -7
  112. data/lib/mihari/schemas/rule.rb +1 -1
  113. data/lib/mihari/structs/censys.rb +96 -82
  114. data/lib/mihari/structs/config.rb +46 -21
  115. data/lib/mihari/structs/google_public_dns.rb +27 -23
  116. data/lib/mihari/structs/greynoise.rb +44 -38
  117. data/lib/mihari/structs/onyphe.rb +34 -30
  118. data/lib/mihari/structs/rule.rb +1 -1
  119. data/lib/mihari/structs/shodan.rb +77 -69
  120. data/lib/mihari/structs/urlscan.rb +42 -36
  121. data/lib/mihari/structs/virustotal_intelligence.rb +57 -49
  122. data/lib/mihari/type_checker.rb +10 -8
  123. data/lib/mihari/version.rb +1 -1
  124. data/lib/mihari/web/public/assets/index-ac4e5ffa.js +50 -0
  125. data/lib/mihari/web/public/index.html +1 -1
  126. data/mihari.gemspec +8 -8
  127. metadata +103 -22
  128. data/.gitmodules +0 -0
  129. data/.overcommit.yml +0 -12
  130. data/lib/mihari/web/public/assets/index-cbe1734c.js +0 -50
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
7
  <link rel="icon" href="/favicon.ico" />
8
8
  <title>Mihari</title>
9
- <script type="module" crossorigin src="/assets/index-cbe1734c.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-ac4e5ffa.js"></script>
10
10
  <link rel="stylesheet" href="/assets/index-eed1bcd8.css">
11
11
  </head>
12
12
  <body>
data/mihari.gemspec CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
 
35
35
  spec.add_development_dependency "bundler", "~> 2.4"
36
36
  spec.add_development_dependency "coveralls_reborn", "~> 0.27"
37
- spec.add_development_dependency "fakefs", "~> 2.4"
37
+ spec.add_development_dependency "fakefs", "~> 2.5"
38
38
  spec.add_development_dependency "fuubar", "~> 2.5"
39
39
  spec.add_development_dependency "mysql2", "~> 0.5"
40
40
  spec.add_development_dependency "pg", "~> 1.5"
@@ -44,19 +44,19 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency "rerun", "~> 0.14"
45
45
  spec.add_development_dependency "rspec", "~> 3.12"
46
46
  spec.add_development_dependency "simplecov-lcov", "~> 0.8.0"
47
- spec.add_development_dependency "standard", "~> 1.28"
47
+ spec.add_development_dependency "standard", "~> 1.29"
48
48
  spec.add_development_dependency "timecop", "~> 0.9"
49
49
  spec.add_development_dependency "vcr", "~> 6.1"
50
50
  spec.add_development_dependency "webmock", "~> 3.18"
51
51
 
52
52
  unless ci_env?
53
- spec.add_development_dependency "overcommit", "~> 0.60"
53
+ spec.add_development_dependency "lefthook", "~> 1.4"
54
54
  spec.add_development_dependency "ruby-lsp", "~> 0.5"
55
55
  spec.add_development_dependency "solargraph", "~> 0.49"
56
56
  spec.add_development_dependency "steep", "~> 1.4"
57
57
  end
58
58
 
59
- spec.add_dependency "activerecord", "7.0.4.3"
59
+ spec.add_dependency "activerecord", "7.0.5"
60
60
  spec.add_dependency "addressable", "2.8.4"
61
61
  spec.add_dependency "awrence", "2.0.1"
62
62
  spec.add_dependency "dotenv", "2.8.1"
@@ -64,13 +64,13 @@ Gem::Specification.new do |spec|
64
64
  spec.add_dependency "dry-container", "0.11.0"
65
65
  spec.add_dependency "dry-files", "1.0.1"
66
66
  spec.add_dependency "dry-initializer", "3.1.1"
67
- spec.add_dependency "dry-schema", "1.13.1"
67
+ spec.add_dependency "dry-schema", "1.13.2"
68
68
  spec.add_dependency "dry-struct", "1.6.0"
69
69
  spec.add_dependency "dry-validation", "1.10.0"
70
70
  spec.add_dependency "email_address", "0.2.4"
71
71
  spec.add_dependency "grape", "1.7.0"
72
72
  spec.add_dependency "grape-entity", "1.0.0"
73
- spec.add_dependency "grape-swagger", "1.6.0"
73
+ spec.add_dependency "grape-swagger", "1.6.1"
74
74
  spec.add_dependency "grape-swagger-entity", "0.5.1"
75
75
  spec.add_dependency "insensitive_hash", "0.3.3"
76
76
  spec.add_dependency "jr-cli", "0.6.0"
@@ -81,8 +81,8 @@ Gem::Specification.new do |spec|
81
81
  spec.add_dependency "parallel", "1.23.0"
82
82
  spec.add_dependency "plissken", "2.0.1"
83
83
  spec.add_dependency "public_suffix", "5.0.1"
84
- spec.add_dependency "puma", "6.2.2"
85
- spec.add_dependency "rack", "3.0.7"
84
+ spec.add_dependency "puma", "6.3.0"
85
+ spec.add_dependency "rack", "3.0.8"
86
86
  spec.add_dependency "rack-cors", "2.0.1"
87
87
  spec.add_dependency "rackup", "2.1.0"
88
88
  spec.add_dependency "semantic_logger", "4.13.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: 5.2.2
4
+ version: 5.2.4
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-05-20 00:00:00.000000000 Z
11
+ date: 2023-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.4'
47
+ version: '2.5'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.4'
54
+ version: '2.5'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fuubar
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '1.28'
187
+ version: '1.29'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '1.28'
194
+ version: '1.29'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: timecop
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -235,19 +235,19 @@ dependencies:
235
235
  - !ruby/object:Gem::Version
236
236
  version: '3.18'
237
237
  - !ruby/object:Gem::Dependency
238
- name: overcommit
238
+ name: lefthook
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '0.60'
243
+ version: '1.4'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '0.60'
250
+ version: '1.4'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: ruby-lsp
253
253
  requirement: !ruby/object:Gem::Requirement
@@ -296,14 +296,14 @@ dependencies:
296
296
  requirements:
297
297
  - - '='
298
298
  - !ruby/object:Gem::Version
299
- version: 7.0.4.3
299
+ version: 7.0.5
300
300
  type: :runtime
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - '='
305
305
  - !ruby/object:Gem::Version
306
- version: 7.0.4.3
306
+ version: 7.0.5
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: addressable
309
309
  requirement: !ruby/object:Gem::Requirement
@@ -408,14 +408,14 @@ dependencies:
408
408
  requirements:
409
409
  - - '='
410
410
  - !ruby/object:Gem::Version
411
- version: 1.13.1
411
+ version: 1.13.2
412
412
  type: :runtime
413
413
  prerelease: false
414
414
  version_requirements: !ruby/object:Gem::Requirement
415
415
  requirements:
416
416
  - - '='
417
417
  - !ruby/object:Gem::Version
418
- version: 1.13.1
418
+ version: 1.13.2
419
419
  - !ruby/object:Gem::Dependency
420
420
  name: dry-struct
421
421
  requirement: !ruby/object:Gem::Requirement
@@ -492,14 +492,14 @@ dependencies:
492
492
  requirements:
493
493
  - - '='
494
494
  - !ruby/object:Gem::Version
495
- version: 1.6.0
495
+ version: 1.6.1
496
496
  type: :runtime
497
497
  prerelease: false
498
498
  version_requirements: !ruby/object:Gem::Requirement
499
499
  requirements:
500
500
  - - '='
501
501
  - !ruby/object:Gem::Version
502
- version: 1.6.0
502
+ version: 1.6.1
503
503
  - !ruby/object:Gem::Dependency
504
504
  name: grape-swagger-entity
505
505
  requirement: !ruby/object:Gem::Requirement
@@ -646,28 +646,28 @@ dependencies:
646
646
  requirements:
647
647
  - - '='
648
648
  - !ruby/object:Gem::Version
649
- version: 6.2.2
649
+ version: 6.3.0
650
650
  type: :runtime
651
651
  prerelease: false
652
652
  version_requirements: !ruby/object:Gem::Requirement
653
653
  requirements:
654
654
  - - '='
655
655
  - !ruby/object:Gem::Version
656
- version: 6.2.2
656
+ version: 6.3.0
657
657
  - !ruby/object:Gem::Dependency
658
658
  name: rack
659
659
  requirement: !ruby/object:Gem::Requirement
660
660
  requirements:
661
661
  - - '='
662
662
  - !ruby/object:Gem::Version
663
- version: 3.0.7
663
+ version: 3.0.8
664
664
  type: :runtime
665
665
  prerelease: false
666
666
  version_requirements: !ruby/object:Gem::Requirement
667
667
  requirements:
668
668
  - - '='
669
669
  - !ruby/object:Gem::Version
670
- version: 3.0.7
670
+ version: 3.0.8
671
671
  - !ruby/object:Gem::Dependency
672
672
  name: rack-cors
673
673
  requirement: !ruby/object:Gem::Requirement
@@ -817,8 +817,6 @@ extensions: []
817
817
  extra_rdoc_files: []
818
818
  files:
819
819
  - ".gitignore"
820
- - ".gitmodules"
821
- - ".overcommit.yml"
822
820
  - ".rspec"
823
821
  - ".rubocop.yml"
824
822
  - ".standard.yml"
@@ -832,6 +830,89 @@ files:
832
830
  - build_frontend.sh
833
831
  - config.ru
834
832
  - exe/mihari
833
+ - frontend/.browserslistrc
834
+ - frontend/.eslintrc.js
835
+ - frontend/.gitignore
836
+ - frontend/README.md
837
+ - frontend/babel.config.js
838
+ - frontend/index.html
839
+ - frontend/jest.config.js
840
+ - frontend/package-lock.json
841
+ - frontend/package.json
842
+ - frontend/public/favicon.ico
843
+ - frontend/scripts/swagger_doc_to_yaml.rb
844
+ - frontend/src/App.vue
845
+ - frontend/src/api-helper.ts
846
+ - frontend/src/api.ts
847
+ - frontend/src/components/ErrorMessage.vue
848
+ - frontend/src/components/Loading.vue
849
+ - frontend/src/components/Navbar.vue
850
+ - frontend/src/components/Pagination.vue
851
+ - frontend/src/components/alert/Alert.vue
852
+ - frontend/src/components/alert/Alerts.vue
853
+ - frontend/src/components/alert/AlertsWithPagination.vue
854
+ - frontend/src/components/alert/AlertsWrapper.vue
855
+ - frontend/src/components/alert/Form.vue
856
+ - frontend/src/components/artifact/AS.vue
857
+ - frontend/src/components/artifact/Artifact.vue
858
+ - frontend/src/components/artifact/ArtifactTag.vue
859
+ - frontend/src/components/artifact/ArtifactTags.vue
860
+ - frontend/src/components/artifact/ArtifactWrapper.vue
861
+ - frontend/src/components/artifact/CPEs.vue
862
+ - frontend/src/components/artifact/DnsRecords.vue
863
+ - frontend/src/components/artifact/Ports.vue
864
+ - frontend/src/components/artifact/ReverseDnsNames.vue
865
+ - frontend/src/components/artifact/Tags.vue
866
+ - frontend/src/components/artifact/WhoisRecord.vue
867
+ - frontend/src/components/config/Configs.vue
868
+ - frontend/src/components/config/ConfigsWrapper.vue
869
+ - frontend/src/components/link/Link.vue
870
+ - frontend/src/components/link/Links.vue
871
+ - frontend/src/components/rule/EditRule.vue
872
+ - frontend/src/components/rule/EditRuleWrapper.vue
873
+ - frontend/src/components/rule/Form.vue
874
+ - frontend/src/components/rule/InputForm.vue
875
+ - frontend/src/components/rule/NewRule.vue
876
+ - frontend/src/components/rule/Rule.vue
877
+ - frontend/src/components/rule/RuleWrapper.vue
878
+ - frontend/src/components/rule/Rules.vue
879
+ - frontend/src/components/rule/RulesWrapper.vue
880
+ - frontend/src/components/rule/YAML.vue
881
+ - frontend/src/components/tag/Tag.vue
882
+ - frontend/src/components/tag/Tags.vue
883
+ - frontend/src/countries.ts
884
+ - frontend/src/index.ts
885
+ - frontend/src/links/anyrun.ts
886
+ - frontend/src/links/base.ts
887
+ - frontend/src/links/censys.ts
888
+ - frontend/src/links/crtsh.ts
889
+ - frontend/src/links/dnslytics.ts
890
+ - frontend/src/links/greynoise.ts
891
+ - frontend/src/links/index.ts
892
+ - frontend/src/links/intezer.ts
893
+ - frontend/src/links/otx.ts
894
+ - frontend/src/links/securitytrails.ts
895
+ - frontend/src/links/shodan.ts
896
+ - frontend/src/links/urlscan.ts
897
+ - frontend/src/links/virustotal.ts
898
+ - frontend/src/main.ts
899
+ - frontend/src/router/index.ts
900
+ - frontend/src/rule.ts
901
+ - frontend/src/shims-vue.d.ts
902
+ - frontend/src/swagger.yaml
903
+ - frontend/src/types.ts
904
+ - frontend/src/utils.ts
905
+ - frontend/src/views/Alerts.vue
906
+ - frontend/src/views/Artifact.vue
907
+ - frontend/src/views/Configs.vue
908
+ - frontend/src/views/EditRule.vue
909
+ - frontend/src/views/NewRule.vue
910
+ - frontend/src/views/Rule.vue
911
+ - frontend/src/views/Rules.vue
912
+ - frontend/tests/unit/utils.spec.ts
913
+ - frontend/tsconfig.json
914
+ - frontend/vite.config.js
915
+ - lefthook.yml
835
916
  - lib/mihari.rb
836
917
  - lib/mihari/analyzers/base.rb
837
918
  - lib/mihari/analyzers/binaryedge.rb
@@ -966,7 +1047,7 @@ files:
966
1047
  - lib/mihari/web/public/assets/fa-solid-900-7152a693.woff2
967
1048
  - lib/mihari/web/public/assets/fa-v4compatibility-0515a423.ttf
968
1049
  - lib/mihari/web/public/assets/fa-v4compatibility-694a17c3.woff2
969
- - lib/mihari/web/public/assets/index-cbe1734c.js
1050
+ - lib/mihari/web/public/assets/index-ac4e5ffa.js
970
1051
  - lib/mihari/web/public/assets/index-eed1bcd8.css
971
1052
  - lib/mihari/web/public/favicon.ico
972
1053
  - lib/mihari/web/public/index.html
data/.gitmodules DELETED
File without changes
data/.overcommit.yml DELETED
@@ -1,12 +0,0 @@
1
- PreCommit:
2
- BundleCheck:
3
- enabled: true
4
-
5
- RuboCop:
6
- enabled: true
7
- required_executable: bundle
8
- command: ["bundle", "exec", "standardrb"]
9
- on_warn: fail
10
-
11
- YamlSyntax:
12
- enabled: true