mihari 5.2.4 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -1
- data/README.md +0 -10
- data/Rakefile +7 -1
- data/build_frontend.sh +1 -1
- data/frontend/.eslintrc.cjs +22 -0
- data/frontend/.gitignore +18 -12
- data/frontend/.prettierrc.json +8 -0
- data/frontend/env.d.ts +5 -0
- data/frontend/package-lock.json +5095 -9661
- data/frontend/package.json +34 -24
- data/frontend/src/App.vue +5 -5
- data/frontend/src/api-helper.ts +38 -40
- data/frontend/src/api.ts +40 -40
- data/frontend/src/components/ErrorMessage.vue +8 -8
- data/frontend/src/components/Loading.vue +3 -3
- data/frontend/src/components/Navbar.vue +10 -27
- data/frontend/src/components/Pagination.vue +35 -42
- data/frontend/src/components/alert/Alert.vue +21 -26
- data/frontend/src/components/alert/Alerts.vue +23 -25
- data/frontend/src/components/alert/AlertsWithPagination.vue +34 -34
- data/frontend/src/components/alert/AlertsWrapper.vue +42 -49
- data/frontend/src/components/alert/Form.vue +39 -40
- data/frontend/src/components/artifact/AS.vue +7 -7
- data/frontend/src/components/artifact/Artifact.vue +66 -83
- data/frontend/src/components/artifact/ArtifactTag.vue +21 -27
- data/frontend/src/components/artifact/ArtifactTags.vue +8 -8
- data/frontend/src/components/artifact/ArtifactWrapper.vue +22 -25
- data/frontend/src/components/artifact/CPEs.vue +6 -6
- data/frontend/src/components/artifact/DnsRecords.vue +9 -9
- data/frontend/src/components/artifact/Ports.vue +6 -6
- data/frontend/src/components/artifact/ReverseDnsNames.vue +7 -7
- data/frontend/src/components/artifact/Tags.vue +6 -6
- data/frontend/src/components/artifact/WhoisRecord.vue +7 -9
- data/frontend/src/components/config/Configs.vue +7 -10
- data/frontend/src/components/config/ConfigsWrapper.vue +14 -20
- data/frontend/src/components/link/Link.vue +7 -7
- data/frontend/src/components/link/Links.vue +16 -21
- data/frontend/src/components/rule/EditRule.vue +22 -22
- data/frontend/src/components/rule/EditRuleWrapper.vue +22 -28
- data/frontend/src/components/rule/Form.vue +28 -28
- data/frontend/src/components/rule/InputForm.vue +31 -25
- data/frontend/src/components/rule/NewRule.vue +18 -18
- data/frontend/src/components/rule/Rule.vue +25 -27
- data/frontend/src/components/rule/RuleWrapper.vue +24 -31
- data/frontend/src/components/rule/Rules.vue +26 -30
- data/frontend/src/components/rule/RulesWrapper.vue +39 -42
- data/frontend/src/components/rule/YAML.vue +19 -22
- data/frontend/src/components/tag/Tag.vue +24 -32
- data/frontend/src/components/tag/Tags.vue +11 -11
- data/frontend/src/countries.ts +23 -23
- data/frontend/src/index.ts +9 -12
- data/frontend/src/links/anyrun.ts +10 -10
- data/frontend/src/links/base.ts +3 -3
- data/frontend/src/links/censys.ts +10 -10
- data/frontend/src/links/crtsh.ts +10 -10
- data/frontend/src/links/dnslytics.ts +18 -18
- data/frontend/src/links/greynoise.ts +10 -10
- data/frontend/src/links/index.ts +15 -15
- data/frontend/src/links/intezer.ts +10 -10
- data/frontend/src/links/otx.ts +14 -14
- data/frontend/src/links/securitytrails.ts +15 -15
- data/frontend/src/links/shodan.ts +10 -10
- data/frontend/src/links/urlscan.ts +19 -19
- data/frontend/src/links/virustotal.ts +27 -27
- data/frontend/src/main.ts +8 -8
- data/frontend/src/router/index.ts +20 -20
- data/frontend/src/rule.ts +6 -6
- data/frontend/src/shims-vue.d.ts +2 -2
- data/frontend/src/types.ts +91 -91
- data/frontend/src/utils.ts +23 -29
- data/frontend/src/views/Alerts.vue +7 -7
- data/frontend/src/views/Artifact.vue +17 -17
- data/frontend/src/views/Configs.vue +7 -7
- data/frontend/src/views/EditRule.vue +17 -17
- data/frontend/src/views/NewRule.vue +10 -10
- data/frontend/src/views/Rule.vue +17 -17
- data/frontend/src/views/Rules.vue +7 -7
- data/frontend/tests/utils.spec.ts +9 -0
- data/frontend/tsconfig.app.json +21 -0
- data/frontend/tsconfig.json +10 -36
- 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 +4 -2
- data/lib/mihari/analyzers/base.rb +48 -14
- 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/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/config.rb +133 -0
- data/lib/mihari/constants.rb +3 -0
- data/lib/mihari/emitters/slack.rb +13 -3
- data/lib/mihari/errors.rb +1 -1
- data/lib/mihari/http.rb +2 -3
- data/lib/mihari/schemas/analyzer.rb +2 -0
- 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-ac4e5ffa.js → index-71285b15.js} +16 -16
- 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 +8 -8
- metadata +24 -62
- data/frontend/.browserslistrc +0 -3
- data/frontend/.eslintrc.js +0 -33
- data/frontend/babel.config.js +0 -3
- data/frontend/jest.config.js +0 -9
- data/frontend/tests/unit/utils.spec.ts +0 -7
- data/frontend/vite.config.js +0 -24
|
@@ -19,12 +19,7 @@
|
|
|
19
19
|
countryCode || artifact.geolocation?.countryCode
|
|
20
20
|
}}</span>
|
|
21
21
|
</h4>
|
|
22
|
-
<iframe
|
|
23
|
-
class="mb-4"
|
|
24
|
-
:src="googleMapSrc"
|
|
25
|
-
width="100%"
|
|
26
|
-
height="240px"
|
|
27
|
-
></iframe>
|
|
22
|
+
<iframe class="mb-4" :src="googleMapSrc" width="100%" height="240px"></iframe>
|
|
28
23
|
</div>
|
|
29
24
|
|
|
30
25
|
<div v-if="urlscanLiveshotSrc">
|
|
@@ -46,10 +41,7 @@
|
|
|
46
41
|
<td>
|
|
47
42
|
{{ artifact.id }}
|
|
48
43
|
<span class="buttons is-pulled-right">
|
|
49
|
-
<button
|
|
50
|
-
class="button is-primary is-light is-small"
|
|
51
|
-
@click="enrichArtifact"
|
|
52
|
-
>
|
|
44
|
+
<button class="button is-primary is-light is-small" @click="enrichArtifact">
|
|
53
45
|
<span>Enrich</span>
|
|
54
46
|
<span class="icon is-small">
|
|
55
47
|
<i class="fas fa-lightbulb"></i>
|
|
@@ -67,10 +59,7 @@
|
|
|
67
59
|
</span>
|
|
68
60
|
</button>
|
|
69
61
|
|
|
70
|
-
<button
|
|
71
|
-
class="button is-light is-small"
|
|
72
|
-
@click="deleteArtifact"
|
|
73
|
-
>
|
|
62
|
+
<button class="button is-light is-small" @click="deleteArtifact">
|
|
74
63
|
<span>Delete</span>
|
|
75
64
|
<span class="icon is-small">
|
|
76
65
|
<i class="fas fa-times"></i>
|
|
@@ -104,14 +93,10 @@
|
|
|
104
93
|
<div class="modal-card">
|
|
105
94
|
<header class="modal-card-head">
|
|
106
95
|
<p class="modal-card-title">Metadata</p>
|
|
107
|
-
<button
|
|
108
|
-
class="delete"
|
|
109
|
-
aria-label="close"
|
|
110
|
-
@click="flipShowMetadata"
|
|
111
|
-
></button>
|
|
96
|
+
<button class="delete" aria-label="close" @click="flipShowMetadata"></button>
|
|
112
97
|
</header>
|
|
113
98
|
<section class="modal-card-body">
|
|
114
|
-
<VueJsonPretty :data="artifact.metadata"></VueJsonPretty>
|
|
99
|
+
<VueJsonPretty :data="artifact.metadata as any"></VueJsonPretty>
|
|
115
100
|
</section>
|
|
116
101
|
</div>
|
|
117
102
|
</div>
|
|
@@ -126,9 +111,7 @@
|
|
|
126
111
|
|
|
127
112
|
<div class="block" v-if="artifact.reverseDnsNames">
|
|
128
113
|
<h4 class="is-size-4 mb-2">Reverse DNS</h4>
|
|
129
|
-
<ReverseDnsNames
|
|
130
|
-
:reverseDnsNames="artifact.reverseDnsNames"
|
|
131
|
-
></ReverseDnsNames>
|
|
114
|
+
<ReverseDnsNames :reverseDnsNames="artifact.reverseDnsNames"></ReverseDnsNames>
|
|
132
115
|
</div>
|
|
133
116
|
|
|
134
117
|
<div class="block" v-if="artifact.dnsRecords">
|
|
@@ -166,38 +149,38 @@
|
|
|
166
149
|
</template>
|
|
167
150
|
|
|
168
151
|
<script lang="ts">
|
|
169
|
-
import "vue-json-pretty/lib/styles.css"
|
|
152
|
+
import "vue-json-pretty/lib/styles.css"
|
|
170
153
|
|
|
171
|
-
import { computed, defineComponent, onMounted, PropType, ref } from "vue"
|
|
172
|
-
import VueJsonPretty from "vue-json-pretty"
|
|
173
|
-
import { useRouter } from "vue-router"
|
|
154
|
+
import { computed, defineComponent, onMounted, type PropType, ref } from "vue"
|
|
155
|
+
import VueJsonPretty from "vue-json-pretty"
|
|
156
|
+
import { useRouter } from "vue-router"
|
|
174
157
|
|
|
175
158
|
import {
|
|
176
159
|
generateDeleteArtifactTask,
|
|
177
160
|
generateEnrichArtifactTask,
|
|
178
161
|
generateGetAlertsTask,
|
|
179
|
-
generateGetIPTask
|
|
180
|
-
} from "@/api-helper"
|
|
181
|
-
import Alerts from "@/components/alert/AlertsWithPagination.vue"
|
|
182
|
-
import AS from "@/components/artifact/AS.vue"
|
|
183
|
-
import CPEs from "@/components/artifact/CPEs.vue"
|
|
184
|
-
import DnsRecords from "@/components/artifact/DnsRecords.vue"
|
|
185
|
-
import Ports from "@/components/artifact/Ports.vue"
|
|
186
|
-
import ReverseDnsNames from "@/components/artifact/ReverseDnsNames.vue"
|
|
187
|
-
import Tags from "@/components/artifact/Tags.vue"
|
|
188
|
-
import WhoisRecord from "@/components/artifact/WhoisRecord.vue"
|
|
189
|
-
import Links from "@/components/link/Links.vue"
|
|
190
|
-
import Loading from "@/components/Loading.vue"
|
|
191
|
-
import { ArtifactWithTags, GCS } from "@/types"
|
|
192
|
-
import { getGCSByCountryCode, getGCSByIPInfo } from "@/utils"
|
|
162
|
+
generateGetIPTask
|
|
163
|
+
} from "@/api-helper"
|
|
164
|
+
import Alerts from "@/components/alert/AlertsWithPagination.vue"
|
|
165
|
+
import AS from "@/components/artifact/AS.vue"
|
|
166
|
+
import CPEs from "@/components/artifact/CPEs.vue"
|
|
167
|
+
import DnsRecords from "@/components/artifact/DnsRecords.vue"
|
|
168
|
+
import Ports from "@/components/artifact/Ports.vue"
|
|
169
|
+
import ReverseDnsNames from "@/components/artifact/ReverseDnsNames.vue"
|
|
170
|
+
import Tags from "@/components/artifact/Tags.vue"
|
|
171
|
+
import WhoisRecord from "@/components/artifact/WhoisRecord.vue"
|
|
172
|
+
import Links from "@/components/link/Links.vue"
|
|
173
|
+
import Loading from "@/components/Loading.vue"
|
|
174
|
+
import type { ArtifactWithTags, GCS } from "@/types"
|
|
175
|
+
import { getGCSByCountryCode, getGCSByIPInfo } from "@/utils"
|
|
193
176
|
|
|
194
177
|
export default defineComponent({
|
|
195
178
|
name: "ArtifactItem",
|
|
196
179
|
props: {
|
|
197
180
|
artifact: {
|
|
198
181
|
type: Object as PropType<ArtifactWithTags>,
|
|
199
|
-
required: true
|
|
200
|
-
}
|
|
182
|
+
required: true
|
|
183
|
+
}
|
|
201
184
|
},
|
|
202
185
|
components: {
|
|
203
186
|
Alerts,
|
|
@@ -210,78 +193,76 @@ export default defineComponent({
|
|
|
210
193
|
VueJsonPretty,
|
|
211
194
|
WhoisRecord,
|
|
212
195
|
CPEs,
|
|
213
|
-
Ports
|
|
196
|
+
Ports
|
|
214
197
|
},
|
|
215
198
|
emits: ["refresh"],
|
|
216
199
|
setup(props, context) {
|
|
217
|
-
const googleMapSrc = ref<string | undefined>(undefined)
|
|
218
|
-
const countryCode = ref<string | undefined>(undefined)
|
|
219
|
-
const showMetadata = ref(false)
|
|
200
|
+
const googleMapSrc = ref<string | undefined>(undefined)
|
|
201
|
+
const countryCode = ref<string | undefined>(undefined)
|
|
202
|
+
const showMetadata = ref(false)
|
|
220
203
|
|
|
221
|
-
const router = useRouter()
|
|
204
|
+
const router = useRouter()
|
|
222
205
|
|
|
223
206
|
const urlscanLiveshotSrc = computed<string | undefined>(() => {
|
|
224
207
|
if (props.artifact.dataType === "domain") {
|
|
225
|
-
const url = `http://${props.artifact.data}
|
|
226
|
-
return `https://urlscan.io/liveshot/?url=${url}
|
|
208
|
+
const url = `http://${props.artifact.data}`
|
|
209
|
+
return `https://urlscan.io/liveshot/?url=${url}`
|
|
227
210
|
}
|
|
228
211
|
|
|
229
212
|
if (props.artifact.dataType === "url") {
|
|
230
|
-
return `https://urlscan.io/liveshot/?url=${props.artifact.data}
|
|
213
|
+
return `https://urlscan.io/liveshot/?url=${props.artifact.data}`
|
|
231
214
|
}
|
|
232
215
|
|
|
233
|
-
return undefined
|
|
234
|
-
})
|
|
216
|
+
return undefined
|
|
217
|
+
})
|
|
235
218
|
|
|
236
219
|
const getGoogleMapSrc = (gcs: GCS | undefined): string | undefined => {
|
|
237
220
|
if (gcs !== undefined) {
|
|
238
|
-
return `https://maps.google.co.jp/maps?output=embed&q=${gcs.lat},${gcs.long}&z=3
|
|
221
|
+
return `https://maps.google.co.jp/maps?output=embed&q=${gcs.lat},${gcs.long}&z=3`
|
|
239
222
|
}
|
|
240
223
|
|
|
241
|
-
return undefined
|
|
242
|
-
}
|
|
224
|
+
return undefined
|
|
225
|
+
}
|
|
243
226
|
|
|
244
|
-
const getIPInfoTask = generateGetIPTask()
|
|
245
|
-
const getAlertsTask = generateGetAlertsTask()
|
|
246
|
-
const deleteArtifactTask = generateDeleteArtifactTask()
|
|
247
|
-
const enrichArtifactTask = generateEnrichArtifactTask()
|
|
227
|
+
const getIPInfoTask = generateGetIPTask()
|
|
228
|
+
const getAlertsTask = generateGetAlertsTask()
|
|
229
|
+
const deleteArtifactTask = generateDeleteArtifactTask()
|
|
230
|
+
const enrichArtifactTask = generateEnrichArtifactTask()
|
|
248
231
|
|
|
249
232
|
const deleteArtifact = async () => {
|
|
250
|
-
const result = window.confirm(
|
|
251
|
-
`Are you sure you want to delete ${props.artifact.data}?`
|
|
252
|
-
);
|
|
233
|
+
const result = window.confirm(`Are you sure you want to delete ${props.artifact.data}?`)
|
|
253
234
|
|
|
254
235
|
if (result) {
|
|
255
|
-
await deleteArtifactTask.perform(props.artifact.id)
|
|
256
|
-
router.push("/")
|
|
236
|
+
await deleteArtifactTask.perform(props.artifact.id)
|
|
237
|
+
router.push("/")
|
|
257
238
|
}
|
|
258
|
-
}
|
|
239
|
+
}
|
|
259
240
|
|
|
260
241
|
const enrichArtifact = async () => {
|
|
261
|
-
await enrichArtifactTask.perform(props.artifact.id)
|
|
262
|
-
context.emit("refresh")
|
|
263
|
-
}
|
|
242
|
+
await enrichArtifactTask.perform(props.artifact.id)
|
|
243
|
+
context.emit("refresh")
|
|
244
|
+
}
|
|
264
245
|
|
|
265
246
|
onMounted(async () => {
|
|
266
247
|
if (props.artifact.dataType === "ip") {
|
|
267
|
-
let gcs: GCS | undefined = undefined
|
|
248
|
+
let gcs: GCS | undefined = undefined
|
|
268
249
|
|
|
269
250
|
if (props.artifact.geolocation === null) {
|
|
270
251
|
// Use IPInfo if an artifact does not have geolocation
|
|
271
|
-
const ipinfo = await getIPInfoTask.perform(props.artifact.data)
|
|
272
|
-
gcs = getGCSByIPInfo(ipinfo)
|
|
273
|
-
countryCode.value = ipinfo.countryCode
|
|
252
|
+
const ipinfo = await getIPInfoTask.perform(props.artifact.data)
|
|
253
|
+
gcs = getGCSByIPInfo(ipinfo)
|
|
254
|
+
countryCode.value = ipinfo.countryCode
|
|
274
255
|
} else {
|
|
275
|
-
gcs = getGCSByCountryCode(props.artifact.geolocation.countryCode)
|
|
256
|
+
gcs = getGCSByCountryCode(props.artifact.geolocation.countryCode)
|
|
276
257
|
}
|
|
277
258
|
|
|
278
|
-
googleMapSrc.value = getGoogleMapSrc(gcs)
|
|
259
|
+
googleMapSrc.value = getGoogleMapSrc(gcs)
|
|
279
260
|
}
|
|
280
|
-
})
|
|
261
|
+
})
|
|
281
262
|
|
|
282
263
|
const flipShowMetadata = () => {
|
|
283
|
-
showMetadata.value = !showMetadata.value
|
|
284
|
-
}
|
|
264
|
+
showMetadata.value = !showMetadata.value
|
|
265
|
+
}
|
|
285
266
|
|
|
286
267
|
return {
|
|
287
268
|
countryCode,
|
|
@@ -292,10 +273,10 @@ export default defineComponent({
|
|
|
292
273
|
urlscanLiveshotSrc,
|
|
293
274
|
deleteArtifact,
|
|
294
275
|
enrichArtifact,
|
|
295
|
-
flipShowMetadata
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
})
|
|
276
|
+
flipShowMetadata
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
})
|
|
299
280
|
</script>
|
|
300
281
|
|
|
301
282
|
<style scoped>
|
|
@@ -308,7 +289,9 @@ img.liveshot {
|
|
|
308
289
|
object-position: top;
|
|
309
290
|
display: block;
|
|
310
291
|
overflow: hidden;
|
|
311
|
-
transition:
|
|
292
|
+
transition:
|
|
293
|
+
max-height 1s,
|
|
294
|
+
height 1s;
|
|
312
295
|
}
|
|
313
296
|
|
|
314
297
|
img.liveshot:hover {
|
|
@@ -10,61 +10,55 @@
|
|
|
10
10
|
:to="{ name: 'Artifact', params: { id: artifact.id } }"
|
|
11
11
|
>{{ artifact.data }}</router-link
|
|
12
12
|
>
|
|
13
|
-
<span
|
|
14
|
-
class="tag is-delete"
|
|
15
|
-
v-if="isDeleteButtonEnabled"
|
|
16
|
-
@click="deleteArtifact"
|
|
17
|
-
></span>
|
|
13
|
+
<span class="tag is-delete" v-if="isDeleteButtonEnabled" @click="deleteArtifact"></span>
|
|
18
14
|
</div>
|
|
19
15
|
</div>
|
|
20
16
|
</template>
|
|
21
17
|
|
|
22
18
|
<script lang="ts">
|
|
23
|
-
import { defineComponent, PropType, ref } from "vue"
|
|
19
|
+
import { defineComponent, type PropType, ref } from "vue"
|
|
24
20
|
|
|
25
|
-
import { generateDeleteArtifactTask } from "@/api-helper"
|
|
26
|
-
import { Artifact } from "@/types"
|
|
21
|
+
import { generateDeleteArtifactTask } from "@/api-helper"
|
|
22
|
+
import type { Artifact } from "@/types"
|
|
27
23
|
|
|
28
24
|
export default defineComponent({
|
|
29
25
|
name: "ArtifactTag",
|
|
30
26
|
props: {
|
|
31
27
|
artifact: {
|
|
32
28
|
type: Object as PropType<Artifact>,
|
|
33
|
-
required: true
|
|
34
|
-
}
|
|
29
|
+
required: true
|
|
30
|
+
}
|
|
35
31
|
},
|
|
36
32
|
setup(props) {
|
|
37
|
-
const isDeleted = ref(false)
|
|
38
|
-
const isDeleteButtonEnabled = ref(false)
|
|
33
|
+
const isDeleted = ref(false)
|
|
34
|
+
const isDeleteButtonEnabled = ref(false)
|
|
39
35
|
|
|
40
|
-
const deleteArtifactTask = generateDeleteArtifactTask()
|
|
36
|
+
const deleteArtifactTask = generateDeleteArtifactTask()
|
|
41
37
|
|
|
42
38
|
const deleteArtifact = async () => {
|
|
43
|
-
const result = window.confirm(
|
|
44
|
-
`Are you sure you want to delete ${props.artifact.data}?`
|
|
45
|
-
);
|
|
39
|
+
const result = window.confirm(`Are you sure you want to delete ${props.artifact.data}?`)
|
|
46
40
|
|
|
47
41
|
if (result) {
|
|
48
|
-
await deleteArtifactTask.perform(props.artifact.id)
|
|
49
|
-
isDeleted.value = true
|
|
42
|
+
await deleteArtifactTask.perform(props.artifact.id)
|
|
43
|
+
isDeleted.value = true
|
|
50
44
|
}
|
|
51
|
-
}
|
|
45
|
+
}
|
|
52
46
|
|
|
53
47
|
const showDeleteButton = () => {
|
|
54
|
-
isDeleteButtonEnabled.value = true
|
|
55
|
-
}
|
|
48
|
+
isDeleteButtonEnabled.value = true
|
|
49
|
+
}
|
|
56
50
|
|
|
57
51
|
const hideDeleteButton = () => {
|
|
58
|
-
isDeleteButtonEnabled.value = false
|
|
59
|
-
}
|
|
52
|
+
isDeleteButtonEnabled.value = false
|
|
53
|
+
}
|
|
60
54
|
|
|
61
55
|
return {
|
|
62
56
|
isDeleted,
|
|
63
57
|
deleteArtifact,
|
|
64
58
|
showDeleteButton,
|
|
65
59
|
hideDeleteButton,
|
|
66
|
-
isDeleteButtonEnabled
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
})
|
|
60
|
+
isDeleteButtonEnabled
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})
|
|
70
64
|
</script>
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script lang="ts">
|
|
12
|
-
import { defineComponent, PropType } from "vue"
|
|
12
|
+
import { defineComponent, type PropType } from "vue"
|
|
13
13
|
|
|
14
|
-
import ArtifactComponent from "@/components/artifact/ArtifactTag.vue"
|
|
15
|
-
import { Artifact } from "@/types"
|
|
14
|
+
import ArtifactComponent from "@/components/artifact/ArtifactTag.vue"
|
|
15
|
+
import type { Artifact } from "@/types"
|
|
16
16
|
|
|
17
17
|
export default defineComponent({
|
|
18
18
|
name: "ArtifactTags",
|
|
19
19
|
components: {
|
|
20
|
-
ArtifactComponent
|
|
20
|
+
ArtifactComponent
|
|
21
21
|
},
|
|
22
22
|
props: {
|
|
23
23
|
artifacts: {
|
|
24
24
|
type: Array as PropType<Artifact[]>,
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
})
|
|
25
|
+
required: true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
29
|
</script>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Loading v-if="getArtifactTask.isRunning"></Loading>
|
|
3
3
|
|
|
4
|
-
<ErrorMessage
|
|
5
|
-
v-if="getArtifactTask.isError"
|
|
6
|
-
:error="getArtifactTask.last?.error"
|
|
7
|
-
></ErrorMessage>
|
|
4
|
+
<ErrorMessage v-if="getArtifactTask.isError" :error="getArtifactTask.last?.error"></ErrorMessage>
|
|
8
5
|
|
|
9
6
|
<ArtifactComponent
|
|
10
7
|
:artifact="getArtifactTask.last.value"
|
|
@@ -14,49 +11,49 @@
|
|
|
14
11
|
</template>
|
|
15
12
|
|
|
16
13
|
<script lang="ts">
|
|
17
|
-
import { defineComponent, onMounted, watch } from "vue"
|
|
14
|
+
import { defineComponent, onMounted, watch } from "vue"
|
|
18
15
|
|
|
19
|
-
import { generateGetArtifactTask } from "@/api-helper"
|
|
20
|
-
import ArtifactComponent from "@/components/artifact/Artifact.vue"
|
|
21
|
-
import ErrorMessage from "@/components/ErrorMessage.vue"
|
|
22
|
-
import Loading from "@/components/Loading.vue"
|
|
16
|
+
import { generateGetArtifactTask } from "@/api-helper"
|
|
17
|
+
import ArtifactComponent from "@/components/artifact/Artifact.vue"
|
|
18
|
+
import ErrorMessage from "@/components/ErrorMessage.vue"
|
|
19
|
+
import Loading from "@/components/Loading.vue"
|
|
23
20
|
|
|
24
21
|
export default defineComponent({
|
|
25
22
|
name: "ArtifactWrapper",
|
|
26
23
|
components: {
|
|
27
24
|
ArtifactComponent,
|
|
28
25
|
Loading,
|
|
29
|
-
ErrorMessage
|
|
26
|
+
ErrorMessage
|
|
30
27
|
},
|
|
31
28
|
props: {
|
|
32
29
|
id: {
|
|
33
30
|
type: String,
|
|
34
|
-
required: true
|
|
35
|
-
}
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
36
33
|
},
|
|
37
34
|
setup(props) {
|
|
38
|
-
const getArtifactTask = generateGetArtifactTask()
|
|
35
|
+
const getArtifactTask = generateGetArtifactTask()
|
|
39
36
|
|
|
40
37
|
const getArtifact = async () => {
|
|
41
|
-
await getArtifactTask.perform(props.id)
|
|
42
|
-
}
|
|
38
|
+
await getArtifactTask.perform(props.id)
|
|
39
|
+
}
|
|
43
40
|
|
|
44
41
|
const refresh = async () => {
|
|
45
|
-
await getArtifact()
|
|
46
|
-
}
|
|
42
|
+
await getArtifact()
|
|
43
|
+
}
|
|
47
44
|
|
|
48
45
|
onMounted(async () => {
|
|
49
|
-
await getArtifact()
|
|
50
|
-
})
|
|
46
|
+
await getArtifact()
|
|
47
|
+
})
|
|
51
48
|
|
|
52
49
|
watch(props, async () => {
|
|
53
|
-
await getArtifact()
|
|
54
|
-
})
|
|
50
|
+
await getArtifact()
|
|
51
|
+
})
|
|
55
52
|
|
|
56
53
|
return {
|
|
57
54
|
getArtifactTask,
|
|
58
|
-
refresh
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
})
|
|
55
|
+
refresh
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
62
59
|
</script>
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts">
|
|
10
|
-
import { defineComponent, PropType } from "vue"
|
|
10
|
+
import { defineComponent, type PropType } from "vue"
|
|
11
11
|
|
|
12
|
-
import { CPE } from "@/types"
|
|
12
|
+
import type { CPE } from "@/types"
|
|
13
13
|
|
|
14
14
|
export default defineComponent({
|
|
15
15
|
name: "CPEsItem",
|
|
16
16
|
props: {
|
|
17
17
|
cpes: {
|
|
18
18
|
type: Array as PropType<CPE[]>,
|
|
19
|
-
required: true
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
})
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
23
|
</script>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
class="tag"
|
|
8
8
|
:to="{
|
|
9
9
|
name: 'Alerts',
|
|
10
|
-
query: { dnsRecord: dnsRecord.value }
|
|
10
|
+
query: { dnsRecord: dnsRecord.value }
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
13
|
{{ truncate(dnsRecord.value, 50) }}
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script lang="ts">
|
|
21
|
-
import truncate from "truncate"
|
|
22
|
-
import { defineComponent, PropType } from "vue"
|
|
21
|
+
import truncate from "truncate"
|
|
22
|
+
import { defineComponent, type PropType } from "vue"
|
|
23
23
|
|
|
24
|
-
import { DnsRecord } from "@/types"
|
|
24
|
+
import type { DnsRecord } from "@/types"
|
|
25
25
|
|
|
26
26
|
export default defineComponent({
|
|
27
27
|
name: "DnsRecords",
|
|
28
28
|
props: {
|
|
29
29
|
dnsRecords: {
|
|
30
30
|
type: Array as PropType<DnsRecord[]>,
|
|
31
|
-
required: true
|
|
32
|
-
}
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
33
33
|
},
|
|
34
34
|
setup() {
|
|
35
|
-
return { truncate }
|
|
36
|
-
}
|
|
37
|
-
})
|
|
35
|
+
return { truncate }
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
38
|
</script>
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts">
|
|
10
|
-
import { defineComponent, PropType } from "vue"
|
|
10
|
+
import { defineComponent, type PropType } from "vue"
|
|
11
11
|
|
|
12
|
-
import { Port } from "@/types"
|
|
12
|
+
import type { Port } from "@/types"
|
|
13
13
|
|
|
14
14
|
export default defineComponent({
|
|
15
15
|
name: "PortsItem",
|
|
16
16
|
props: {
|
|
17
17
|
ports: {
|
|
18
18
|
type: Array as PropType<Port[]>,
|
|
19
|
-
required: true
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
})
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
23
|
</script>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:key="reverseDnsName.name"
|
|
7
7
|
:to="{
|
|
8
8
|
name: 'Alerts',
|
|
9
|
-
query: { reverseDnsName: reverseDnsName.name }
|
|
9
|
+
query: { reverseDnsName: reverseDnsName.name }
|
|
10
10
|
}"
|
|
11
11
|
>
|
|
12
12
|
{{ reverseDnsName.name }}
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { defineComponent, PropType } from "vue"
|
|
18
|
+
import { defineComponent, type PropType } from "vue"
|
|
19
19
|
|
|
20
|
-
import { ReverseDnsName } from "@/types"
|
|
20
|
+
import type { ReverseDnsName } from "@/types"
|
|
21
21
|
|
|
22
22
|
export default defineComponent({
|
|
23
23
|
name: "ReverseDnsNames",
|
|
24
24
|
props: {
|
|
25
25
|
reverseDnsNames: {
|
|
26
26
|
type: Array as PropType<ReverseDnsName[]>,
|
|
27
|
-
required: true
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
})
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
31
|
</script>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:key="tag"
|
|
7
7
|
:to="{
|
|
8
8
|
name: 'Alerts',
|
|
9
|
-
query: { tag: tag }
|
|
9
|
+
query: { tag: tag }
|
|
10
10
|
}"
|
|
11
11
|
>
|
|
12
12
|
{{ tag }}
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { defineComponent, PropType } from "vue"
|
|
18
|
+
import { defineComponent, type PropType } from "vue"
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
name: "TagsItem",
|
|
22
22
|
props: {
|
|
23
23
|
tags: {
|
|
24
24
|
type: Array as PropType<string[]>,
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
})
|
|
25
|
+
required: true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
29
|
</script>
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
<div class="control">
|
|
4
4
|
<div class="tags has-addons are-medium">
|
|
5
5
|
<span class="tag is-dark">Registrar</span>
|
|
6
|
-
<span class="tag is-light">{{
|
|
7
|
-
whoisRecord.registrar?.name || "N/A"
|
|
8
|
-
}}</span>
|
|
6
|
+
<span class="tag is-light">{{ whoisRecord.registrar?.name || "N/A" }}</span>
|
|
9
7
|
</div>
|
|
10
8
|
</div>
|
|
11
9
|
|
|
@@ -33,17 +31,17 @@
|
|
|
33
31
|
</template>
|
|
34
32
|
|
|
35
33
|
<script lang="ts">
|
|
36
|
-
import { defineComponent, PropType } from "vue"
|
|
34
|
+
import { defineComponent, type PropType } from "vue"
|
|
37
35
|
|
|
38
|
-
import { WhoisRecord } from "@/types"
|
|
36
|
+
import type { WhoisRecord } from "@/types"
|
|
39
37
|
|
|
40
38
|
export default defineComponent({
|
|
41
39
|
name: "WhoisRecord",
|
|
42
40
|
props: {
|
|
43
41
|
whoisRecord: {
|
|
44
42
|
type: Object as PropType<WhoisRecord>,
|
|
45
|
-
required: true
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
})
|
|
43
|
+
required: true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
})
|
|
49
47
|
</script>
|