mihari 1.3.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +68 -0
  3. data/README.md +20 -270
  4. data/Rakefile +1 -0
  5. data/build_frontend.sh +14 -0
  6. data/docker/Dockerfile +3 -2
  7. data/{screenshots → images}/alert.png +0 -0
  8. data/{screenshots → images}/eyecatch.png +0 -0
  9. data/images/logo.png +0 -0
  10. data/{screenshots → images}/misp.png +0 -0
  11. data/{screenshots → images}/slack.png +0 -0
  12. data/images/web_alerts.png +0 -0
  13. data/images/web_config.png +0 -0
  14. data/lib/mihari.rb +2 -2
  15. data/lib/mihari/analyzers/base.rb +1 -1
  16. data/lib/mihari/analyzers/basic.rb +3 -4
  17. data/lib/mihari/analyzers/binaryedge.rb +4 -7
  18. data/lib/mihari/analyzers/censys.rb +3 -7
  19. data/lib/mihari/analyzers/circl.rb +3 -5
  20. data/lib/mihari/analyzers/crtsh.rb +2 -6
  21. data/lib/mihari/analyzers/dnpedia.rb +3 -6
  22. data/lib/mihari/analyzers/dnstwister.rb +4 -9
  23. data/lib/mihari/analyzers/free_text.rb +2 -6
  24. data/lib/mihari/analyzers/http_hash.rb +3 -11
  25. data/lib/mihari/analyzers/onyphe.rb +3 -6
  26. data/lib/mihari/analyzers/otx.rb +4 -9
  27. data/lib/mihari/analyzers/passive_dns.rb +4 -9
  28. data/lib/mihari/analyzers/passive_ssl.rb +4 -9
  29. data/lib/mihari/analyzers/passivetotal.rb +9 -14
  30. data/lib/mihari/analyzers/pulsedive.rb +7 -12
  31. data/lib/mihari/analyzers/reverse_whois.rb +4 -9
  32. data/lib/mihari/analyzers/securitytrails.rb +12 -17
  33. data/lib/mihari/analyzers/securitytrails_domain_feed.rb +3 -7
  34. data/lib/mihari/analyzers/shodan.rb +9 -8
  35. data/lib/mihari/analyzers/spyse.rb +6 -11
  36. data/lib/mihari/analyzers/ssh_fingerprint.rb +2 -6
  37. data/lib/mihari/analyzers/urlscan.rb +21 -9
  38. data/lib/mihari/analyzers/virustotal.rb +6 -11
  39. data/lib/mihari/analyzers/zoomeye.rb +7 -11
  40. data/lib/mihari/cli.rb +20 -28
  41. data/lib/mihari/config.rb +1 -25
  42. data/lib/mihari/configurable.rb +4 -5
  43. data/lib/mihari/database.rb +7 -1
  44. data/lib/mihari/emitters/misp.rb +4 -2
  45. data/lib/mihari/emitters/slack.rb +18 -7
  46. data/lib/mihari/emitters/the_hive.rb +2 -2
  47. data/lib/mihari/errors.rb +2 -0
  48. data/lib/mihari/models/alert.rb +51 -0
  49. data/lib/mihari/models/artifact.rb +1 -1
  50. data/lib/mihari/notifiers/exception_notifier.rb +5 -5
  51. data/lib/mihari/serializers/alert.rb +1 -1
  52. data/lib/mihari/serializers/artifact.rb +1 -1
  53. data/lib/mihari/serializers/tag.rb +1 -1
  54. data/lib/mihari/status.rb +10 -10
  55. data/lib/mihari/type_checker.rb +4 -4
  56. data/lib/mihari/version.rb +1 -1
  57. data/lib/mihari/web/app.rb +126 -0
  58. data/lib/mihari/web/public/index.html +21 -0
  59. data/lib/mihari/web/public/static/favicon.ico +0 -0
  60. data/lib/mihari/web/public/static/fonts/fa-brands-400.099a9556.woff +0 -0
  61. data/lib/mihari/web/public/static/fonts/fa-brands-400.30cc681d.eot +0 -0
  62. data/lib/mihari/web/public/static/fonts/fa-brands-400.3b89dd10.ttf +0 -0
  63. data/lib/mihari/web/public/static/fonts/fa-brands-400.f7307680.woff2 +0 -0
  64. data/lib/mihari/web/public/static/fonts/fa-regular-400.1f77739c.ttf +0 -0
  65. data/lib/mihari/web/public/static/fonts/fa-regular-400.7124eb50.woff +0 -0
  66. data/lib/mihari/web/public/static/fonts/fa-regular-400.7630483d.eot +0 -0
  67. data/lib/mihari/web/public/static/fonts/fa-regular-400.f0f82301.woff2 +0 -0
  68. data/lib/mihari/web/public/static/fonts/fa-solid-900.1042e8ca.eot +0 -0
  69. data/lib/mihari/web/public/static/fonts/fa-solid-900.605ed792.ttf +0 -0
  70. data/lib/mihari/web/public/static/fonts/fa-solid-900.9fe5a17c.woff +0 -0
  71. data/lib/mihari/web/public/static/fonts/fa-solid-900.e8a427e1.woff2 +0 -0
  72. data/lib/mihari/web/public/static/img/fa-brands-400.ba7ed552.svg +3717 -0
  73. data/lib/mihari/web/public/static/img/fa-regular-400.0bb42845.svg +801 -0
  74. data/lib/mihari/web/public/static/img/fa-solid-900.376c1f97.svg +5034 -0
  75. data/lib/mihari/web/public/static/js/app.58b32d15.js +12 -0
  76. data/lib/mihari/web/public/static/js/app.58b32d15.js.map +1 -0
  77. data/mihari.gemspec +30 -25
  78. metadata +163 -56
  79. data/.travis.yml +0 -13
  80. data/lib/mihari/alert_viewer.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 512d3ee8179279b931bd9510c652693ead1108ead99c823e26880e2a75234b24
4
- data.tar.gz: 81946c213ef30712644637e8ea5e01bea36956aad077ed37bdac60d0adf71f19
3
+ metadata.gz: 3cf190c27b1be3c0eeb690354361c3bb3295beb8609661a861fcc31e227cb7f0
4
+ data.tar.gz: e989209e3668e9342803ed1b91c9e668bcf0519e659f9fb88687cc38460818cb
5
5
  SHA512:
6
- metadata.gz: d6e8b1e9a8791aebfe042de31b1f895fce4bc20d26a417672eaf4dafa83319f2cfb407ee635fe004f70a9d78441c43398c0af79cde01b3bb39bdcfb1dfd9e0c3
7
- data.tar.gz: '09ad98242f96474358908d68ef24f2f8711206b698499d18419346004a853ed5cace40df63e1055e82444e43ac9160fa02fc40d0a662d7a17d290a0dee13fb50'
6
+ metadata.gz: 0a40de96264eaf211240b0020aa3494e6a64bddf8e2aa74461e91122fff29d72a5ab66032e226fa80c19c984fcb7a3e37d1e78aa0da317f6fd1445945b93d200
7
+ data.tar.gz: b0b55e75e84037cf7761fd28128504d45fc049de01d0f4db65184b2e8ff0e9bc3948e06b8165e90c19244fb1c8b8af33efa77d260bb323d4084d85e21f72245f
@@ -0,0 +1,68 @@
1
+ name: Ruby CI
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+
9
+ services:
10
+ postgres:
11
+ image: postgres:12
12
+ env:
13
+ POSTGRES_USER: postgres
14
+ POSTGRES_PASSWORD: postgres
15
+ POSTGRES_DB: test
16
+ options: >-
17
+ --health-cmd pg_isready
18
+ --health-interval 10s
19
+ --health-timeout 5s
20
+ --health-retries 5
21
+ ports:
22
+ - 5432:5432
23
+
24
+ mysql:
25
+ image: mysql:8.0
26
+ env:
27
+ MYSQL_USER: mysql
28
+ MYSQL_PASSWORD: mysql
29
+ MYSQL_DATABASE: test
30
+ MYSQL_ROOT_PASSWORD: rootpassword
31
+ ports:
32
+ - 3306:3306
33
+ options: >-
34
+ --health-cmd="mysqladmin ping"
35
+ --health-interval=10s
36
+ --health-timeout=5s
37
+ --health-retries=3
38
+
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ ruby: [2.7, "3.0"]
43
+
44
+ steps:
45
+ - uses: actions/checkout@v2
46
+ - name: Set up Ruby 2.7
47
+ uses: ruby/setup-ruby@v1
48
+ with:
49
+ ruby-version: ${{ matrix.ruby }}
50
+ bundler-cache: true
51
+
52
+ - name: Install dependencies
53
+ run: |
54
+ sudo apt-get -yqq install libpq-dev libmysqlclient-dev
55
+ gem install bundler
56
+ bundle install
57
+
58
+ - name: Test with PostgreSQL
59
+ env:
60
+ DATABASE: postgresql://postgres:postgres@localhost:5432/test
61
+ run: |
62
+ bundle exec rake
63
+
64
+ - name: Test with MySQL
65
+ env:
66
+ DATABASE: mysql2://mysql:mysql@127.0.0.1:3306/test
67
+ run: |
68
+ bundle exec rake
data/README.md CHANGED
@@ -1,62 +1,29 @@
1
1
  # mihari
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/mihari.svg)](https://badge.fury.io/rb/mihari)
4
- [![Build Status](https://travis-ci.com/ninoseki/mihari.svg?branch=master)](https://travis-ci.com/ninoseki/mihari)
4
+ [![Ruby CI](https://github.com/ninoseki/mihari/actions/workflows/test.yml/badge.svg)](https://github.com/ninoseki/mihari/actions/workflows/test.yml)
5
5
  [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/ninoseki/mihari)](https://hub.docker.com/r/ninoseki/mihari)
6
6
  [![Coverage Status](https://coveralls.io/repos/github/ninoseki/mihari/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/mihari?branch=master)
7
7
  [![CodeFactor](https://www.codefactor.io/repository/github/ninoseki/mihari/badge)](https://www.codefactor.io/repository/github/ninoseki/mihari)
8
8
 
9
- Mihari is a helper to run queries & manage results continuously. Mihari can be used for C2, landing page and phishing hunting.
9
+ ![img](https://github.com/ninoseki/mihari/raw/master/images/logo.png)
10
+
11
+ Mihari is a framework for continuous OSINT based threat hunting.
10
12
 
11
13
  ## How it works
12
14
 
13
- - Mihari makes a query against Shodan, Censys, VirusTotal, SecurityTrails, etc. and extracts artifacts (IP addresses, domains, URLs and hashes) from the results.
14
- - Mihari checks whether a DB (SQLite3 or PostgreSQL) contains the artifacts or not.
15
+ - Mihari makes a query against Shodan, Censys, VirusTotal, SecurityTrails, etc. and extracts artifacts (IP addresses, domains, URLs or hashes).
16
+ - Mihari checks whether a DB (SQLite3, PostgreSQL or MySQL) contains the artifacts or not.
15
17
  - If it doesn't contain the artifacts:
16
- - Mihari creates an alert on TheHive. (Optional)
17
- - Mihari sends a notification to Slack. (Optional)
18
- - Mihari creates an event on MISP. (Optional)
19
-
20
- ![img](https://github.com/ninoseki/mihari/raw/master/screenshots/eyecatch.png)
21
-
22
- ### Screenshots
23
-
24
- - TheHive alert example
25
-
26
- ![img](https://github.com/ninoseki/mihari/raw/master/screenshots/alert.png)
27
-
28
- - Slack notification example
29
-
30
- ![img](https://github.com/ninoseki/mihari/raw/master/screenshots/slack.png)
31
-
32
- - MISP event example
18
+ - Mihari creates an alert on TheHive.
19
+ - Mihari sends a notification to Slack.
20
+ - Mihari creates an event on MISP.
33
21
 
34
- ![img](https://github.com/ninoseki/mihari/raw/master/screenshots/misp.png)
22
+ Also, you can check the alerts on a built-in web app.
35
23
 
36
- ## Requirements
24
+ ![img](https://github.com/ninoseki/mihari/raw/master/images/web_alerts.png)
37
25
 
38
- - Ruby 2.6+
39
- - SQLite3
40
- - libpq
41
-
42
- ```bash
43
- # For Debian / Ubuntu
44
- apt-get install sqlite3 libsqlite3-dev libpq-dev
45
- ```
46
-
47
- ## Installation
48
-
49
- ```bash
50
- gem install mihari
51
- ```
52
-
53
- Or you can use this tool with Docker.
54
-
55
- ```bash
56
- docker pull ninoseki/mihari
57
- ```
58
-
59
- ## Basic usage
26
+ ## Supported services
60
27
 
61
28
  Mihari supports the following services by default.
62
29
 
@@ -69,6 +36,7 @@ Mihari supports the following services by default.
69
36
  - [Onyphe](https://onyphe.io)
70
37
  - [OTX](https://otx.alienvault.com/)
71
38
  - [PassiveTotal](https://community.riskiq.com/)
39
+ - [Pulsedive](https://pulsedive.com/)
72
40
  - [SecurityTrails](https://securitytrails.com/)
73
41
  - [Shodan](https://shodan.io)
74
42
  - [Spyse](https://spyse.com)
@@ -76,233 +44,15 @@ Mihari supports the following services by default.
76
44
  - [VirusTotal](http://virustotal.com)
77
45
  - [ZoomEye](https://zoomeye.org)
78
46
 
79
- ```bash
80
- $ mihari
81
- Commands:
82
- mihari alerts # Show the alerts on TheHive
83
- mihari binaryedge [QUERY] # BinaryEdge host search by a query
84
- mihari censys [QUERY] # Censys IPv4 search by a query
85
- mihari circl [DOMAIN|SHA1] # CIRCL passive DNS/SSL lookup by a domain or SHA1 certificate fingerprint
86
- mihari crtsh [QUERY] # crt.sh search by a query
87
- mihari dnpedia [QUERY] # DNPedia domain search by a query
88
- mihari dnstwister [DOMAIN] # dnstwister lookup by a domain
89
- mihari free_text [TEXT] # Cross search with search engines by a free text
90
- mihari help [COMMAND] # Describe available commands or one specific command
91
- mihari http_hash # Cross search with search engines by a hash of an HTTP response (SHA256, MD5 and MurmurHash3)
92
- mihari import_from_json # Give a JSON input via STDIN
93
- mihari onyphe [QUERY] # Onyphe datascan search by a query
94
- mihari otx [IP|DOMAIN] # OTX lookup by an IP or domain
95
- mihari passive_dns [IP|DOMAIN] # Cross search with passive DNS services by an ip or domain
96
- mihari passive_ssl [SHA1] # Cross search with passive SSL services by an SHA1 certificate fingerprint
97
- mihari passivetotal [IP|DOMAIN|EMAIL|SHA1] # PassiveTotal lookup by an ip, domain, email or SHA1 certificate fingerprint
98
- mihari pulsedive [IP|DOMAIN] # Pulsedive lookup by an ip or domain
99
- mihari reverse_whois [EMAIL] # Cross search with reverse whois services by an email
100
- mihari securitytrails [IP|DOMAIN|EMAIL] # SecurityTrails lookup by an ip, domain or email
101
- mihari securitytrails_domain_feed [REGEXP] # SecurityTrails new domain feed search by a regexp
102
- mihari shodan [QUERY] # Shodan host search by a query
103
- mihari spyse [QUERY] # Spyse search by a query
104
- mihari ssh_fingerprint [FINGERPRINT] # Cross search with search engines by an SSH fingerprint (e.g. dc:14:de:8e:d7:c1:15:43:23:82:25:81:d2:59:e8:c0)
105
- mihari status # Show the current configuration status
106
- mihari urlscan [QUERY] # urlscan search by a given query
107
- mihari virustotal [IP|DOMAIN] # VirusTotal resolutions lookup by an ip or domain
108
- mihari zoomeye [QUERY] # ZoomEye search by a query
109
-
110
- Options:
111
- [--config=CONFIG] # path to config file
112
-
113
- ```
114
-
115
- ### Cross searches
116
-
117
- Mihari has cross search features. A cross search is a search across a number of services.
118
-
119
- You can get aggregated results by using the following commands.
120
-
121
- | Command | Desc. |
122
- |-----------------|---------------------------------------------------------------------------------------------------------|
123
- | passive_dns | Passive DNS lookup with CIRCL passive DNS, OTX, PassiveTotal, Pulsedive, SecurityTrails and VirusTotal |
124
- | passive_ssl | Passive SSL lookup with CIRCL passive SSL and PassiveTotal |
125
- | reverse_whois | Revese Whois lookup with PassiveTotal and SecurityTrails |
126
- | http_hash | HTTP response hash lookup with BinaryEdge(SHA256), Censys(SHA256), Onyphpe(MD5) and Shodan(MurmurHash3) |
127
- | free_text | Free text lookup with BinaryEdge and Censys |
128
- | ssh_fingerprint | SSH fingerprint lookup with BinaryEdge and Shodan |
129
-
130
- #### http_hash command
131
-
132
- The usage of `http_hash` command is a little bit tricky.
133
-
134
- ```bash
135
- $ mihari help http_hash
136
- Usage:
137
- mihari http_hash
138
-
139
- Options:
140
- [--title=TITLE] # title
141
- [--description=DESCRIPTION] # description
142
- [--tags=one two three] # tags
143
- [--md5=MD5] # MD5 hash
144
- [--sha256=SHA256] # SHA256 hash
145
- [--mmh3=N] # MurmurHash3 hash
146
-
147
- Cross search with search engines by a hash of an HTTP response (SHA256, MD5 and MurmurHash3)
148
-
149
- ```
150
-
151
- There are 2 ways to use this command.
152
-
153
- First one is passing `--md5`, `--sha256` and `--mmh3` parameters.
154
-
155
- ```bash
156
- mihari http_hash --md5=881191f7736b5b8cfad5959ca99d2a51 --sha256=b064187ebdc51721708ad98cd89dacc346017cb0fb0457d530032d387f1ff20e --mmh3=-1467534799
157
- ```
158
-
159
- Another one is passing `--html` parameter. In this case, hashes of an HTML file are automatically calculated.
160
-
161
- ```bash
162
- wget http://example.com -O /tmp/index.html
163
- mihari http_hash --html /tmp/index.html
164
- ```
165
-
166
- ### Example usages
167
-
168
- ```bash
169
- # Censys lookup for PANDA C2
170
- mihari censys '("PANDA" AND "SMAdmin" AND "layui")' --title "PANDA C2"
171
-
172
- # VirusTotal passive DNS lookup of a FAKESPY host
173
- mihari virustotal "jppost-hi.top" --title "FAKESPY passive DNS"
174
-
175
- # You can pass a "defanged" indicator as an input
176
- mihari virustotal "jppost-hi[.]top" --title "FAKESPY passive DNS"
177
- ```
178
-
179
- ### Import from JSON
180
-
181
- ```bash
182
- echo '{ "title": "test", "description": "test", "artifacts": ["1.1.1.1", "github.com", "2.2.2.2"] }' | mihari import_from_json
183
- ```
184
-
185
- The input is a JSON data should have `title`, `description` and `artifacts` key. `tags` key is an optional parameter.
186
-
187
- ```json
188
- {
189
- "title": "test",
190
- "description": "test",
191
- "artifacts": ["1.1.1.1", "github.com"],
192
- "tags": ["test"]
193
- }
194
- ```
195
-
196
- | Key | Desc. | Required or optional |
197
- |-------------|----------------------------------------------------------------------------|----------------------|
198
- | title | A title of an alert | Required |
199
- | description | A description of an alert | Required |
200
- | artifacts | An array of artifacts (supported data types: ip, domain, url, email, hash) | Required |
201
- | tags | An array of tags | Optional |
202
-
203
- ## Configuration
204
-
205
- Configuration can be done via environment variables or a YAML file.
206
-
207
- | Key | Description | Default |
208
- |------------------------|-------------------------------------------------------------------------------------------------|-------------|
209
- | DATABASE | A path to the SQLite database or a DB URL (e.g. `postgres://postgres:pass@db.host:5432/somedb`) | `mihari.db` |
210
- | BINARYEDGE_API_KEY | BinaryEdge API key | |
211
- | CENSYS_ID | Censys API ID | |
212
- | CENSYS_SECRET | Censys secret | |
213
- | CIRCL_PASSIVE_PASSWORD | CIRCL passive DNS/SSL password | |
214
- | CIRCL_PASSIVE_USERNAME | CIRCL passive DNS/SSL username | |
215
- | MISP_API_ENDPOINT | MISP URL | |
216
- | MISP_API_KEY | MISP API key | |
217
- | ONYPHE_API_KEY | Onyphe API key | |
218
- | OTX_API_KEY | OTX API key | |
219
- | PASSIVETOTAL_API_KEY | PassiveTotal API key | |
220
- | PASSIVETOTAL_USERNAME | PassiveTotal username | |
221
- | PULSEDIVE_API_KEY | Pulsedive API key | |
222
- | SECURITYTRAILS_API_KEY | SecurityTrails API key | |
223
- | SHODAN_API_KEY | Shodan API key | |
224
- | SLACK_CHANNEL | Slack channel name | `#general` |
225
- | SLACK_WEBHOOK_URL | Slack Webhook URL | |
226
- | SPYSE_API_KEY | Spyse API key | |
227
- | THEHIVE_API_ENDPOINT | TheHive URL | |
228
- | THEHIVE_API_KEY | TheHive API key | |
229
- | URLSCAN_API_KEY | urlscan.io API key | |
230
- | VIRUSTOTAL_API_KEY | VirusTotal API key | |
231
- | ZOOMEYE_PASSWORD | ZoomEye password | |
232
- | ZOOMEYE_USERNAMME | ZoomEye username | |
233
-
234
- Instead of using environment variables, you can use a YAML file for configuration.
235
-
236
- ```bash
237
- mihari virustotal 1.1.1.1 --config /path/to/yaml.yml
238
- ```
239
-
240
- The YAML file should be a YAML hash like below:
241
-
242
- ```yaml
243
- database: /tmp/mihari.db
244
- thehive_api_endpoint: https://localhost
245
- thehive_api_key: foo
246
- virustotal_api_key: foo
247
- ```
248
-
249
- You can check the configuration status via `status` command.
250
-
251
- ```bash
252
- mihari status
253
- ```
254
-
255
- ## How to create a custom script
256
-
257
- Create a class which extends `Mihari::Analyzers::Base` and implements the following methods.
258
-
259
- | Name | Desc. | @return | Required or optional |
260
- |----------------|----------------------------------------------------------------------------|---------------|----------------------|
261
- | `#title` | A title of an alert | String | Required |
262
- | `#description` | A description of an alert | String | Required |
263
- | `#artifacts` | An array of artifacts (supported data types: ip, domain, url, email, hash) | Array<String> | Required |
264
- | `#tags` | An array of tags | Array<String> | Optional |
265
-
266
- ```ruby
267
- require "mihari"
268
-
269
- module Mihari
270
- module Analyzers
271
- class Example < Base
272
- def title
273
- "example"
274
- end
275
-
276
- def description
277
- "example"
278
- end
279
-
280
- def artifacts
281
- ["9.9.9.9", "example.com"]
282
- end
283
-
284
- def tags
285
- ["example"]
286
- end
287
- end
288
- end
289
- end
290
-
291
- example = Mihari::Analyzers::Example.new
292
- example.run
293
- ```
294
-
295
- See `/examples` for more.
47
+ See [Usage](https://github.com/ninoseki/mihari/wiki/Usage) for more information.
296
48
 
297
- ## Using it with Docker
49
+ ## Docs
298
50
 
299
- ```bash
300
- $ docker run --rm ninoseki/mihari
301
- # Note that you should pass configurations via environment variables
302
- $ docker run --rm ninoseki/mihari -e THEHIVE_API_ENDPOINT="http://THEHIVE_URL" -e THEHIVE_API_KEY="API KEY" mihari
303
- # or
304
- $ docker run --rm ninoseki/mihari --env-file ~/.mihari.env mihari
305
- ```
51
+ - [Requirements & Installation](https://github.com/ninoseki/mihari/wiki/Requirements-&-Installation)
52
+ - [Usage](https://github.com/ninoseki/mihari/wiki/Usage)
53
+ - [Configuration](https://github.com/ninoseki/mihari/wiki/Configuration)
54
+ - [Custom script](https://github.com/ninoseki/mihari/wiki/Custom-script)
55
+ - [Docker](https://github.com/ninoseki/mihari/wiki/Docker)
306
56
 
307
57
  ## License
308
58
 
data/Rakefile CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
+ require "standard/rake"
5
6
 
6
7
  RSpec::Core::RakeTask.new(:spec)
7
8
 
data/build_frontend.sh ADDED
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
2
+
3
+ CURRENT_DIR=${PWD}
4
+
5
+ mkdir -p tmp
6
+ cd tmp
7
+ git clone https://github.com/ninoseki/mihari-frontend.git
8
+ cd mihari-frontend
9
+ npm install
10
+ npm run build
11
+
12
+ cp -r dist/* ${CURRENT_DIR}/lib/mihari/web/public
13
+
14
+ rm -rf ${CURRENT_DIR}/tmp/mihari-frontend
data/docker/Dockerfile CHANGED
@@ -1,4 +1,5 @@
1
- FROM ruby:2.7-alpine3.10
1
+ FROM ruby:3.0.0-alpine3.13
2
+
2
3
  RUN apk --no-cache add git build-base ruby-dev sqlite-dev postgresql-dev \
3
4
  && cd /tmp/ \
4
5
  && git clone https://github.com/ninoseki/mihari.git \
@@ -10,4 +11,4 @@ RUN apk --no-cache add git build-base ruby-dev sqlite-dev postgresql-dev \
10
11
 
11
12
  ENTRYPOINT ["mihari"]
12
13
 
13
- CMD ["--help"]
14
+ CMD ["--help"]
File without changes
File without changes
data/images/logo.png ADDED
Binary file