mihari 5.2.3 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -1
- data/README.md +0 -10
- data/Rakefile +7 -1
- data/build_frontend.sh +2 -10
- data/frontend/.eslintrc.cjs +22 -0
- data/frontend/.gitignore +31 -0
- data/frontend/.prettierrc.json +8 -0
- data/frontend/README.md +3 -0
- data/frontend/env.d.ts +5 -0
- data/frontend/index.html +21 -0
- data/frontend/package-lock.json +8650 -0
- data/frontend/package.json +64 -0
- data/frontend/public/favicon.ico +0 -0
- data/frontend/scripts/swagger_doc_to_yaml.rb +23 -0
- data/frontend/src/App.vue +27 -0
- data/frontend/src/api-helper.ts +111 -0
- data/frontend/src/api.ts +105 -0
- data/frontend/src/components/ErrorMessage.vue +32 -0
- data/frontend/src/components/Loading.vue +15 -0
- data/frontend/src/components/Navbar.vue +42 -0
- data/frontend/src/components/Pagination.vue +119 -0
- data/frontend/src/components/alert/Alert.vue +87 -0
- data/frontend/src/components/alert/Alerts.vue +64 -0
- data/frontend/src/components/alert/AlertsWithPagination.vue +91 -0
- data/frontend/src/components/alert/AlertsWrapper.vue +134 -0
- data/frontend/src/components/alert/Form.vue +184 -0
- data/frontend/src/components/artifact/AS.vue +29 -0
- data/frontend/src/components/artifact/Artifact.vue +304 -0
- data/frontend/src/components/artifact/ArtifactTag.vue +64 -0
- data/frontend/src/components/artifact/ArtifactTags.vue +29 -0
- data/frontend/src/components/artifact/ArtifactWrapper.vue +59 -0
- data/frontend/src/components/artifact/CPEs.vue +23 -0
- data/frontend/src/components/artifact/DnsRecords.vue +38 -0
- data/frontend/src/components/artifact/Ports.vue +23 -0
- data/frontend/src/components/artifact/ReverseDnsNames.vue +31 -0
- data/frontend/src/components/artifact/Tags.vue +29 -0
- data/frontend/src/components/artifact/WhoisRecord.vue +47 -0
- data/frontend/src/components/config/Configs.vue +65 -0
- data/frontend/src/components/config/ConfigsWrapper.vue +34 -0
- data/frontend/src/components/link/Link.vue +32 -0
- data/frontend/src/components/link/Links.vue +42 -0
- data/frontend/src/components/rule/EditRule.vue +74 -0
- data/frontend/src/components/rule/EditRuleWrapper.vue +50 -0
- data/frontend/src/components/rule/Form.vue +160 -0
- data/frontend/src/components/rule/InputForm.vue +86 -0
- data/frontend/src/components/rule/NewRule.vue +60 -0
- data/frontend/src/components/rule/Rule.vue +106 -0
- data/frontend/src/components/rule/RuleWrapper.vue +55 -0
- data/frontend/src/components/rule/Rules.vue +84 -0
- data/frontend/src/components/rule/RulesWrapper.vue +127 -0
- data/frontend/src/components/rule/YAML.vue +44 -0
- data/frontend/src/components/tag/Tag.vue +65 -0
- data/frontend/src/components/tag/Tags.vue +37 -0
- data/frontend/src/countries.ts +350 -0
- data/frontend/src/index.ts +20 -0
- data/frontend/src/links/anyrun.ts +19 -0
- data/frontend/src/links/base.ts +14 -0
- data/frontend/src/links/censys.ts +20 -0
- data/frontend/src/links/crtsh.ts +20 -0
- data/frontend/src/links/dnslytics.ts +38 -0
- data/frontend/src/links/greynoise.ts +20 -0
- data/frontend/src/links/index.ts +40 -0
- data/frontend/src/links/intezer.ts +20 -0
- data/frontend/src/links/otx.ts +33 -0
- data/frontend/src/links/securitytrails.ts +38 -0
- data/frontend/src/links/shodan.ts +20 -0
- data/frontend/src/links/urlscan.ts +50 -0
- data/frontend/src/links/virustotal.ts +72 -0
- data/frontend/src/main.ts +11 -0
- data/frontend/src/router/index.ts +57 -0
- data/frontend/src/rule.ts +14 -0
- data/frontend/src/shims-vue.d.ts +6 -0
- data/frontend/src/swagger.yaml +737 -0
- data/frontend/src/types.ts +188 -0
- data/frontend/src/utils.ts +54 -0
- data/frontend/src/views/Alerts.vue +20 -0
- data/frontend/src/views/Artifact.vue +44 -0
- data/frontend/src/views/Configs.vue +20 -0
- data/frontend/src/views/EditRule.vue +44 -0
- data/frontend/src/views/NewRule.vue +26 -0
- data/frontend/src/views/Rule.vue +44 -0
- data/frontend/src/views/Rules.vue +20 -0
- data/frontend/tests/utils.spec.ts +9 -0
- data/frontend/tsconfig.app.json +21 -0
- data/frontend/tsconfig.json +14 -0
- data/frontend/tsconfig.node.json +13 -0
- data/frontend/tsconfig.vitest.json +12 -0
- data/frontend/vite.config.ts +24 -0
- data/frontend/vitest.config.ts +21 -0
- data/lefthook.yml +12 -0
- data/lib/mihari/analyzers/base.rb +63 -12
- data/lib/mihari/analyzers/binaryedge.rb +10 -15
- data/lib/mihari/analyzers/censys.rb +12 -15
- data/lib/mihari/analyzers/circl.rb +10 -10
- data/lib/mihari/analyzers/crtsh.rb +10 -6
- data/lib/mihari/analyzers/dnstwister.rb +6 -8
- data/lib/mihari/analyzers/feed.rb +21 -10
- data/lib/mihari/analyzers/greynoise.rb +10 -20
- data/lib/mihari/analyzers/onyphe.rb +9 -14
- data/lib/mihari/analyzers/otx.rb +8 -9
- data/lib/mihari/analyzers/passivetotal.rb +10 -10
- data/lib/mihari/analyzers/pulsedive.rb +21 -31
- data/lib/mihari/analyzers/rule.rb +8 -29
- data/lib/mihari/analyzers/securitytrails.rb +8 -6
- data/lib/mihari/analyzers/shodan.rb +8 -13
- data/lib/mihari/analyzers/urlscan.rb +15 -20
- data/lib/mihari/analyzers/virustotal.rb +16 -26
- data/lib/mihari/analyzers/virustotal_intelligence.rb +11 -17
- data/lib/mihari/analyzers/zoomeye.rb +12 -17
- data/lib/mihari/commands/search.rb +16 -7
- data/lib/mihari/config.rb +133 -0
- data/lib/mihari/constants.rb +3 -0
- data/lib/mihari/emitters/slack.rb +13 -3
- data/lib/mihari/entities/rule.rb +1 -1
- data/lib/mihari/entities/tag.rb +1 -1
- data/lib/mihari/errors.rb +1 -1
- data/lib/mihari/http.rb +2 -3
- data/lib/mihari/schemas/analyzer.rb +4 -7
- data/lib/mihari/schemas/rule.rb +1 -1
- data/lib/mihari/structs/config.rb +39 -16
- data/lib/mihari/structs/rule.rb +1 -1
- data/lib/mihari/type_checker.rb +6 -6
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/endpoints/configs.rb +5 -1
- data/lib/mihari/web/public/assets/{index-eed1bcd8.css → index-2ba8f0a6.css} +1 -1
- data/lib/mihari/web/public/assets/index-71285b15.js +50 -0
- data/lib/mihari/web/public/index.html +2 -2
- data/lib/mihari/web/public/redoc-static.html +388 -2193
- data/lib/mihari.rb +9 -59
- data/mihari.gemspec +13 -13
- metadata +112 -69
- data/.gitmodules +0 -0
- data/.overcommit.yml +0 -12
- data/lib/mihari/web/public/assets/index-cbe1734c.js +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd57a532476405abe91365f68d2dd91d7ca0a4845dc25ed28bc010e081362848
|
4
|
+
data.tar.gz: 0271f4d51d5f51c24db927c1d732a6a8bee779c69db1c9a0961e4665bd61f0f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9a2a1d0e77a5211a93589fe9ff2b5275ced7dd455760ff66828a826f36683351944d7c4b7db64f14c117b4e3bbc91771a230947427be47defa615a9537ee3a5
|
7
|
+
data.tar.gz: 871255c6d8736417067d26438c0fd8d2cd464a350ccc683c8f052a21b0c036aeadc5c512b0b17a499a0f0544e285257221aa5137f11d628c7c78bc10dae0a9a9
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -9,12 +9,6 @@
|
|
9
9
|
|
10
10
|
<p align="center">
|
11
11
|
<img src="https://github.com/ninoseki/mihari/raw/master/images/logo.png"/>
|
12
|
-
<br/>
|
13
|
-
<a href="https://tines.io?utm_source=github&utm_medium=sponsorship&utm_campaign=ninoseki">
|
14
|
-
<img src="https://github.com/ninoseki/mihari/raw/master/images/Tines-Full_Logo-Tines_Black.png"/>
|
15
|
-
</a>
|
16
|
-
<br/>
|
17
|
-
Mihari is proudly supported by <a href="https://tines.io?utm_source=github&utm_medium=sponsorship&utm_campaign=ninoseki">Tines</a>
|
18
12
|
</p>
|
19
13
|
|
20
14
|
---
|
@@ -68,7 +62,3 @@ Mihari supports the following services by default.
|
|
68
62
|
## License
|
69
63
|
|
70
64
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
71
|
-
|
72
|
-
## Acknowledgement
|
73
|
-
|
74
|
-
Mihari is proudly supported by [Tines.io](https://tines.io?utm_source=github&utm_medium=sponsorship&utm_campaign=ninoseki), The SOAR Platform for Enterprise Security Teams.
|
data/Rakefile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "bundler/gem_tasks"
|
4
3
|
require "rspec/core/rake_task"
|
5
4
|
require "standard/rake"
|
6
5
|
|
@@ -12,3 +11,10 @@ desc "run rackup (via rerun)"
|
|
12
11
|
task :rackup do
|
13
12
|
sh "rerun --pattern '{Gemfile.lock,lib/**/*.rb,lib/*.rb}' -- rackup config.ru"
|
14
13
|
end
|
14
|
+
|
15
|
+
task :build do
|
16
|
+
sh "./build_frontend.sh"
|
17
|
+
end
|
18
|
+
|
19
|
+
# require it later enables doing pre-build step (= build the frontend app)
|
20
|
+
require "bundler/gem_tasks"
|
data/build_frontend.sh
CHANGED
@@ -2,18 +2,10 @@
|
|
2
2
|
|
3
3
|
CURRENT_DIR=${PWD}
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
cd tmp
|
8
|
-
git clone https://github.com/ninoseki/mihari-frontend.git
|
9
|
-
|
10
|
-
cd mihari-frontend
|
11
|
-
npm install
|
5
|
+
cd frontend
|
6
|
+
npm ci
|
12
7
|
npm run build
|
13
8
|
|
14
9
|
trash -r ${CURRENT_DIR}/lib/mihari/web/public/
|
15
10
|
mkdir -p ${CURRENT_DIR}/lib/mihari/web/public/
|
16
11
|
cp -r dist/* ${CURRENT_DIR}/lib/mihari/web/public
|
17
|
-
|
18
|
-
# remove tmp dir
|
19
|
-
rm -rf ${CURRENT_DIR}/tmp/mihari-frontend
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/* eslint-env node */
|
2
|
+
require('@rushstack/eslint-patch/modern-module-resolution')
|
3
|
+
|
4
|
+
module.exports = {
|
5
|
+
root: true,
|
6
|
+
extends: [
|
7
|
+
'plugin:vue/vue3-essential',
|
8
|
+
'eslint:recommended',
|
9
|
+
'@vue/eslint-config-typescript',
|
10
|
+
'@vue/eslint-config-prettier/skip-formatting'
|
11
|
+
],
|
12
|
+
plugins: ['simple-import-sort'],
|
13
|
+
rules: {
|
14
|
+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
15
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
16
|
+
'simple-import-sort/imports': 'error',
|
17
|
+
'simple-import-sort/exports': 'error'
|
18
|
+
},
|
19
|
+
parserOptions: {
|
20
|
+
ecmaVersion: 'latest'
|
21
|
+
}
|
22
|
+
}
|
data/frontend/.gitignore
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Logs
|
2
|
+
logs
|
3
|
+
*.log
|
4
|
+
npm-debug.log*
|
5
|
+
yarn-debug.log*
|
6
|
+
yarn-error.log*
|
7
|
+
pnpm-debug.log*
|
8
|
+
lerna-debug.log*
|
9
|
+
|
10
|
+
node_modules
|
11
|
+
.DS_Store
|
12
|
+
dist
|
13
|
+
dist-ssr
|
14
|
+
coverage
|
15
|
+
*.local
|
16
|
+
|
17
|
+
/cypress/videos/
|
18
|
+
/cypress/screenshots/
|
19
|
+
|
20
|
+
# Editor directories and files
|
21
|
+
.vscode/*
|
22
|
+
!.vscode/extensions.json
|
23
|
+
.idea
|
24
|
+
*.suo
|
25
|
+
*.ntvs*
|
26
|
+
*.njsproj
|
27
|
+
*.sln
|
28
|
+
*.sw?
|
29
|
+
|
30
|
+
# redoc
|
31
|
+
public/redoc-static.html
|
data/frontend/README.md
ADDED
data/frontend/env.d.ts
ADDED
data/frontend/index.html
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
7
|
+
<link rel="icon" href="/favicon.ico" />
|
8
|
+
<title>Mihari</title>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<noscript>
|
12
|
+
<strong
|
13
|
+
>We're sorry but Mihari doesn't work properly without JavaScript
|
14
|
+
enabled. Please enable it to continue.</strong
|
15
|
+
>
|
16
|
+
</noscript>
|
17
|
+
<div id="app"></div>
|
18
|
+
<script type="module" src="/src/main.ts"></script>
|
19
|
+
<!-- built files will be auto injected -->
|
20
|
+
</body>
|
21
|
+
</html>
|