diff --git a/Dockerfile b/Dockerfile index da9f1e1c..c4434251 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ruby:3.2.2-alpine3.19 ARG MIHARI_VERSION=0.0.0 -RUN apk --no-cache add build-base ruby-dev libpq-dev && \ +RUN apk --no-cache add build-base ruby-dev libpq-dev whois && \ echo 'gem: --no-document' >> /usr/local/etc/gemrc && \ gem install pg && \ gem install mihari -v ${MIHARI_VERSION} && \ diff --git a/docs/analyzers/circl.md b/docs/analyzers/circl.md index 25a02edb..608f6964 100644 --- a/docs/analyzers/circl.md +++ b/docs/analyzers/circl.md @@ -12,8 +12,8 @@ tags: This analyzer uses CIRCL passive DNS API or passive SSL API: -- Use passive DNS API if a query is a domain -- Use passive SSL API if a query is a SHA1 certificate fingerprint +- Use passive DNS API if a query is a domain. +- Use passive SSL API if a query is a SHA1 certificate fingerprint. ```yaml analyzer: circl diff --git a/docs/enrichers/index.md b/docs/enrichers/index.md index 73ae892c..b7f27368 100644 --- a/docs/enrichers/index.md +++ b/docs/enrichers/index.md @@ -20,7 +20,7 @@ options: ### Timeout -`timeout` (`integer`) is an HTTP timeout in seconds. Optional. +`timeout` (`integer`) is an HTTP or Whois timeout in seconds. Optional. ### Retry Times diff --git a/docs/installation.md b/docs/installation.md index 7f2b9655..e6ee52b1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -16,8 +16,36 @@ If you want to use MySQL or PostgreSQL instead of SQLite3, please install a gem gem install mysql2 ``` +!!! note + + - Mihari is tested with `mysql2` v0.5+. + - Please check [brianmario/mysql2](https://github.com/brianmario/mysql2) if you have a problem with installing `mysql2`. + **PostgreSQL** ```bash gem install pg ``` + +!!! note + + - Mihari is tested with `pg` v1.5+. + - Please check [ged/ruby-pg](https://github.com/ged/ruby-pg) if you have a problem with installing `pg`. + +## With Bundler + +Alternatively you can use [Bundler](https://bundler.io/) to manage dependencies. + +**Gemfile** + +```ruby +source 'https://rubygems.org' + +gem 'mihari' + +# Remove mysql2 or pg if you don't use MySQL or PostgreSQL +gem "mysql2", "~> 0.5" +gem "pg", "~> 1.5" +``` + +`mihari` and `mysql2` or `pg` will be installed by `bundle install`. diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5ef7053c..0a26a338 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,8 +11,8 @@ "@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/vue-fontawesome": "^3.0.5", - "@vueuse/core": "^10.7.1", - "@vueuse/router": "^10.7.1", + "@vueuse/core": "^10.7.2", + "@vueuse/router": "^10.7.2", "ace-builds": "^1.32.3", "axios": "^1.6.5", "bulma": "^0.9.4", @@ -24,7 +24,7 @@ "ts-dedent": "^2.2.0", "url-parse": "^1.5.10", "uuidv4": "^6.2.13", - "vue": "^3.4.11", + "vue": "^3.4.13", "vue-concurrency": "^5.0.0", "vue-json-pretty": "^2.3.0", "vue-router": "^4.2.5", @@ -48,10 +48,10 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-vue": "^9.20.0", + "eslint-plugin-vue": "^9.20.1", "jsdom": "^23.2.0", "npm-run-all": "^4.1.5", - "prettier": "^3.2.1", + "prettier": "^3.2.2", "typescript": "~5.3.3", "vite": "^5.0.11", "vitest": "^1.2.0", @@ -1707,12 +1707,12 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.11.tgz", - "integrity": "sha512-xFD+p14L4J0DkzHMdgLiQBU5g861fuOTzag30GsfPXBpghLZOvmd22lKiBMTRRpQRpp7qxPnBlFMoeiGMM4MBg==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.13.tgz", + "integrity": "sha512-zGUdmB3j3Irn9z51GXLJ5s0EAHxmsm5/eXl0y6MBaajMeOAaiT4+zaDoxui4Ets98dwIRr8BBaqXXHtHSfm+KA==", "dependencies": { "@babel/parser": "^7.23.6", - "@vue/shared": "3.4.11", + "@vue/shared": "3.4.13", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.0.2" @@ -1724,24 +1724,24 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/@vue/compiler-dom": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.11.tgz", - "integrity": "sha512-cRVLROlY7D72WK2xS91L126Dd6xHNTWDWPUBRh1Syk7+TahCk8Eown1/fSi+VX9c76sMMqEZROQSbwV0HSJnhg==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.13.tgz", + "integrity": "sha512-XSNbpr5Rs3kCfVAmBqMu/HDwOS+RL6y28ZZjDlnDUuf146pRWt2sQkwhsOYc9uu2lxjjJy2NcyOkK7MBLVEc7w==", "dependencies": { - "@vue/compiler-core": "3.4.11", - "@vue/shared": "3.4.11" + "@vue/compiler-core": "3.4.13", + "@vue/shared": "3.4.13" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.11.tgz", - "integrity": "sha512-1y5xHAD4a/AhK5+dgsZwFg145J6/rl1c8ILC7Gokca+ql51tTpduz/njCHeNmU15XiE7O62LjJFNOtSZ9vxKOQ==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.13.tgz", + "integrity": "sha512-SkpmQN8xIFBd5onT413DFSDdjxULJf6jmJg/t3w/DZ9I8ZzyNlLIBLO0qFLewVHyHCiAgpPZlWqSRZXYrawk3Q==", "dependencies": { "@babel/parser": "^7.23.6", - "@vue/compiler-core": "3.4.11", - "@vue/compiler-dom": "3.4.11", - "@vue/compiler-ssr": "3.4.11", - "@vue/shared": "3.4.11", + "@vue/compiler-core": "3.4.13", + "@vue/compiler-dom": "3.4.13", + "@vue/compiler-ssr": "3.4.13", + "@vue/shared": "3.4.13", "estree-walker": "^2.0.2", "magic-string": "^0.30.5", "postcss": "^8.4.32", @@ -1781,12 +1781,12 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.11.tgz", - "integrity": "sha512-cP9Z2ArRgciYmNraqE0gQkuYInfdn66+LE4pR+16uyBiQeswcU4kEzGA+mF1MdhqYXuENpyGQsTkZapq4cy9YA==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.13.tgz", + "integrity": "sha512-rwnw9SVBgD6eGKh8UucnwztieQo/R3RQrEGpE0b0cxb2xxvJeLs/fe7DoYlhEfaSyzM/qD5odkK87hl3G3oW+A==", "dependencies": { - "@vue/compiler-dom": "3.4.11", - "@vue/shared": "3.4.11" + "@vue/compiler-dom": "3.4.13", + "@vue/shared": "3.4.13" } }, "node_modules/@vue/devtools-api": { @@ -1873,29 +1873,29 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.11.tgz", - "integrity": "sha512-KscADwKpSynT3S2iJEX8EfPqc9kPFR261sHIQnDh1xhOBf8qd4ait9tEgLt1/uVxyrAgFj/TNGmjDkcsytyA8w==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.13.tgz", + "integrity": "sha512-/ZdUOrGKkGVONzVJkfDqNcn2fLMvaa5VlYx2KwTbnRbX06YZ4GJE0PVTmWzIxtBYdpSTLLXgw3pDggO+96KXzg==", "dependencies": { - "@vue/shared": "3.4.11" + "@vue/shared": "3.4.13" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.11.tgz", - "integrity": "sha512-wduRf9w1OtSORFs5KVpKEQ1bRwW5D9/E8mB0I4m0f5Wrd53OZridzWWVZaowSKNMXXIF5Y/lYFP9GOM/IL5i2g==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.13.tgz", + "integrity": "sha512-Ov4d4At7z3goxqzSqQxdfVYEcN5HY4dM1uDYL6Hu/Es9Za9BEN602zyjWhhi2+BEki5F9NizRSvn02k/tqNWlg==", "dependencies": { - "@vue/reactivity": "3.4.11", - "@vue/shared": "3.4.11" + "@vue/reactivity": "3.4.13", + "@vue/shared": "3.4.13" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.11.tgz", - "integrity": "sha512-pWlCTzo6Ad3pSBjzgcZ9maPaz+N/SngLOMfkSKIx7rIWJgcHBoFp4GAbhnkR3jxT4BqIvti6EH3aNSC02VtgOg==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.13.tgz", + "integrity": "sha512-ynde9p16eEV3u1VCxUre2e0nKzD0l3NzH0r599+bXeLT1Yhac8Atcot3iL9XNqwolxYCI89KBII+2MSVzfrz6w==", "dependencies": { - "@vue/runtime-core": "3.4.11", - "@vue/shared": "3.4.11", + "@vue/runtime-core": "3.4.13", + "@vue/shared": "3.4.13", "csstype": "^3.1.3" } }, @@ -1905,21 +1905,21 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/@vue/server-renderer": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.11.tgz", - "integrity": "sha512-19rLK9N0yNNzQ83ieyoO9ZT/iBt0S8IkxQ4eVmnqPLCbZgSRMm7GRXnjTFvo0n5vTVVeyaYosBzZ2559L/rP+w==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.13.tgz", + "integrity": "sha512-hkw+UQyDZZtSn1q30nObMfc8beVEQv2pG08nghigxGw+iOWodR+tWSuJak0mzWAHlP/xt/qLc//dG6igfgvGEA==", "dependencies": { - "@vue/compiler-ssr": "3.4.11", - "@vue/shared": "3.4.11" + "@vue/compiler-ssr": "3.4.13", + "@vue/shared": "3.4.13" }, "peerDependencies": { - "vue": "3.4.11" + "vue": "3.4.13" } }, "node_modules/@vue/shared": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.11.tgz", - "integrity": "sha512-BtC+vE8kHf/jZoyJnTFd0PmY8NejyUeUkshXm8LriHs8KmQUmcZXIbrifjA3WDmvzg7C8D6gBSvdl49pOfU2lQ==" + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.13.tgz", + "integrity": "sha512-56crFKLPpzk85WXX1L1c0QzPOuoapWlPVys8eMG8kkRmqdMjWUqK8KpFdE2d7BQA4CEbXwyyHPq6MpFr8H9rcg==" }, "node_modules/@vue/test-utils": { "version": "2.4.3", @@ -1947,13 +1947,13 @@ "dev": true }, "node_modules/@vueuse/core": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.7.1.tgz", - "integrity": "sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.7.2.tgz", + "integrity": "sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==", "dependencies": { "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.7.1", - "@vueuse/shared": "10.7.1", + "@vueuse/metadata": "10.7.2", + "@vueuse/shared": "10.7.2", "vue-demi": ">=0.14.6" }, "funding": { @@ -1986,12 +1986,12 @@ } }, "node_modules/@vueuse/integrations": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.7.1.tgz", - "integrity": "sha512-cKo5LEeKVHdBRBtMTOrDPdR0YNtrmN9IBfdcnY2P3m5LHVrsD0xiHUtAH1WKjHQRIErZG6rJUa6GA4tWZt89Og==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.7.2.tgz", + "integrity": "sha512-+u3RLPFedjASs5EKPc69Ge49WNgqeMfSxFn+qrQTzblPXZg6+EFzhjarS5edj2qAf6xQ93f95TUxRwKStXj/sQ==", "dependencies": { - "@vueuse/core": "10.7.1", - "@vueuse/shared": "10.7.1", + "@vueuse/core": "10.7.2", + "@vueuse/shared": "10.7.2", "vue-demi": ">=0.14.6" }, "funding": { @@ -2076,19 +2076,19 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.7.1.tgz", - "integrity": "sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.7.2.tgz", + "integrity": "sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/router": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/@vueuse/router/-/router-10.7.1.tgz", - "integrity": "sha512-u34c+oA6hMy7q0U01hNzb9xGo7M9AHB6/F/olbdYJU7bDTKbj1SXGMhBTJuVFTvBoInV0vazrM+pN3PS6Vwhng==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/router/-/router-10.7.2.tgz", + "integrity": "sha512-TE9QtcqtZ793bwJWnlxn1gir7TXHJh5Y0KTIAS2DFOFvz4f3yTPmxAtIHC5e96oBVaVdnzxQQ9EsOhBDfBtCDg==", "dependencies": { - "@vueuse/shared": "10.7.1", + "@vueuse/shared": "10.7.2", "vue-demi": ">=0.14.6" }, "funding": { @@ -2124,9 +2124,9 @@ } }, "node_modules/@vueuse/shared": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.7.1.tgz", - "integrity": "sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.7.2.tgz", + "integrity": "sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==", "dependencies": { "vue-demi": ">=0.14.6" }, @@ -3215,9 +3215,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.20.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.20.0.tgz", - "integrity": "sha512-9/DV5CM7ItfgWmXjL6j3zyDtVTrslYdnEm+rnYNajdElx17b3erxi/Wc6FY7t3BQ6dgo0t/UBpgiWCOKtJyN8Q==", + "version": "9.20.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.20.1.tgz", + "integrity": "sha512-GyCs8K3lkEvoyC1VV97GJhP1SvqsKCiWGHnbn0gVUYiUhaH2+nB+Dv1uekv1THFMPbBfYxukrzQdltw950k+LQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", @@ -5752,9 +5752,9 @@ } }, "node_modules/prettier": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.1.tgz", - "integrity": "sha512-qSUWshj1IobVbKc226Gw2pync27t0Kf0EdufZa9j7uBSJay1CC+B3K5lAAZoqgX3ASiKuWsk6OmzKRetXNObWg==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.2.tgz", + "integrity": "sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -7375,15 +7375,15 @@ } }, "node_modules/vue": { - "version": "3.4.11", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.11.tgz", - "integrity": "sha512-iaA98z14ZrrVJlclpHX/HCNeacbMOLdX5foYN7/vt4cHFhDkBRzojjbLQZ2UDRAeNV1v4V5I21+QpdCXWlpG5Q==", - "dependencies": { - "@vue/compiler-dom": "3.4.11", - "@vue/compiler-sfc": "3.4.11", - "@vue/runtime-dom": "3.4.11", - "@vue/server-renderer": "3.4.11", - "@vue/shared": "3.4.11" + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.13.tgz", + "integrity": "sha512-FE3UZ0p+oUZTwz+SzlH/hDFg+XsVRFvwmx0LXjdD1pRK/cO4fu5v6ltAZji4za4IBih3dV78elUK3di8v3pWIg==", + "dependencies": { + "@vue/compiler-dom": "3.4.13", + "@vue/compiler-sfc": "3.4.13", + "@vue/runtime-dom": "3.4.13", + "@vue/server-renderer": "3.4.13", + "@vue/shared": "3.4.13" }, "peerDependencies": { "typescript": "*" diff --git a/frontend/package.json b/frontend/package.json index 4b9951c8..a315590b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,8 +18,8 @@ "@fortawesome/fontawesome-svg-core": "^6.5.1", "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/vue-fontawesome": "^3.0.5", - "@vueuse/core": "^10.7.1", - "@vueuse/router": "^10.7.1", + "@vueuse/core": "^10.7.2", + "@vueuse/router": "^10.7.2", "ace-builds": "^1.32.3", "axios": "^1.6.5", "bulma": "^0.9.4", @@ -31,7 +31,7 @@ "ts-dedent": "^2.2.0", "url-parse": "^1.5.10", "uuidv4": "^6.2.13", - "vue": "^3.4.11", + "vue": "^3.4.13", "vue-concurrency": "^5.0.0", "vue-json-pretty": "^2.3.0", "vue-router": "^4.2.5", @@ -55,10 +55,10 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-vue": "^9.20.0", + "eslint-plugin-vue": "^9.20.1", "jsdom": "^23.2.0", "npm-run-all": "^4.1.5", - "prettier": "^3.2.1", + "prettier": "^3.2.2", "typescript": "~5.3.3", "vite": "^5.0.11", "vitest": "^1.2.0", diff --git a/lefthook.yml b/lefthook.yml index 41ae1bbb..83de6a98 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,5 +1,4 @@ pre-commit: - parallel: true commands: standard: glob: "*.rb" @@ -15,6 +14,10 @@ pre-commit: glob: "*.{js,ts,vue}" run: npx prettier --write {staged_files} stage_fixed: true + type-check: + root: "frontend/" + glob: "*.{js,ts,vue}" + run: npm run type-check actionlint: glob: ".github/workflows/*.yaml" run: actionlint diff --git a/lib/mihari/version.rb b/lib/mihari/version.rb index 2200034c..64fe5d02 100644 --- a/lib/mihari/version.rb +++ b/lib/mihari/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Mihari - VERSION = "7.1.3" + VERSION = "7.2.0" end