Virustotal file password (#465)
* feat: file password * feat: validate password usage for zip file submissions --------- Co-authored-by: Davide Di Modica <webmaster.ddm@gmail.com>
taylor_socfortress committed
Jul 1, 2025 at 09:33 UTC
60ef2d7cfc17997f8020abcad75fc0faa73e07c8
5 files changed
+165
-73
backend/app/threat_intel/routes/socfortress.py
+25
@@ -256,6 +256,31 @@ async def submit_file_for_analysis(
256
if file.size and file.size > 32 * 1024 * 1024: # 32MB
257
raise HTTPException(status_code=413, detail="File too large. Maximum file size is 32MB for free API keys.")
258
259
+ # Validate password is only provided for zip files
260
+ if password:
261
+ # Check file extension
262
+ filename = file.filename or ""
263
+ file_extension = filename.lower().split(".")[-1] if "." in filename else ""
264
+
265
+ # Check MIME type
266
+ content_type = file.content_type or ""
267
+
268
+ # Define valid zip file indicators
269
+ zip_extensions = ["zip", "zipx"]
270
+ zip_mime_types = ["application/zip", "application/x-zip-compressed", "application/x-zip", "multipart/x-zip"]
271
+
272
+ # Validate that it's a zip file
273
+ is_zip_extension = file_extension in zip_extensions
274
+ is_zip_mime = content_type in zip_mime_types
275
+
276
+ if not (is_zip_extension or is_zip_mime):
277
+ raise HTTPException(
278
+ status_code=400,
279
+ detail=f"Password can only be provided for zip files. "
280
+ f"File '{filename}' has extension '{file_extension}' and MIME type '{content_type}', "
281
+ f"which are not recognized as zip file formats.",
282
+ )
283
+
284
# Create request object
285
request = FileSubmissionRequest(password=password)
286
frontend/package.json
+2
-2
@@ -67,7 +67,7 @@
67
"nanoid": "^5.1.5",
68
"password-validator": "^5.3.0",
69
"pinia": "^3.0.3",
70
- "pinia-plugin-persistedstate": "^4.3.0",
70
+ "pinia-plugin-persistedstate": "^4.4.1",
71
"secure-ls": "^2.0.0",
72
"shiki": "^3.7.0",
73
"thememirror": "^2.0.1",
@@ -100,7 +100,7 @@
100
"@types/jsdom": "^21.1.7",
101
"@types/lodash": "^4.17.19",
102
"@types/markdown-it": "^14.1.2",
103
- "@types/node": "^24.0.6",
103
+ "@types/node": "^24.0.8",
104
"@types/validator": "^13.15.2",
105
"@vitejs/plugin-vue": "^5.2.4",
106
"@vitejs/plugin-vue-jsx": "^4.2.0",
frontend/pnpm-lock.yaml
+88
-66
@@ -102,8 +102,8 @@ importers:
102
specifier: ^3.0.3
103
version: 3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3))
104
pinia-plugin-persistedstate:
105
- specifier: ^4.3.0
106
- version: 4.3.0(pinia@3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)))
105
+ specifier: ^4.4.1
106
+ version: 4.4.1(@nuxt/kit@3.17.5)(pinia@3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)))
107
secure-ls:
108
specifier: ^2.0.0
109
version: 2.0.0
@@ -149,7 +149,7 @@ importers:
149
devDependencies:
150
'@antfu/eslint-config':
151
specifier: ^4.16.1
152
- version: 4.16.1(@vue/compiler-sfc@3.5.17)(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
152
+ version: 4.16.1(@vue/compiler-sfc@3.5.17)(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
153
'@clack/prompts':
154
specifier: ^0.11.0
155
version: 0.11.0
@@ -158,7 +158,7 @@ importers:
158
version: 5.0.0(vue@3.5.17(typescript@5.8.3))
159
'@tailwindcss/vite':
160
specifier: ^4.1.11
161
- version: 4.1.11(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
161
+ version: 4.1.11(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
162
'@tsconfig/node20':
163
specifier: ^20.1.6
164
version: 20.1.6
@@ -181,17 +181,17 @@ importers:
181
specifier: ^14.1.2
182
version: 14.1.2
183
'@types/node':
184
- specifier: ^24.0.6
185
- version: 24.0.6
184
+ specifier: ^24.0.8
185
+ version: 24.0.8
186
'@types/validator':
187
specifier: ^13.15.2
188
version: 13.15.2
189
'@vitejs/plugin-vue':
190
specifier: ^5.2.4
191
- version: 5.2.4(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
191
+ version: 5.2.4(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
192
'@vitejs/plugin-vue-jsx':
193
specifier: ^4.2.0
194
- version: 4.2.0(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
194
+ version: 4.2.0(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
195
'@vue/test-utils':
196
specifier: ^2.4.6
197
version: 2.4.6
@@ -245,19 +245,19 @@ importers:
245
version: 5.8.3
246
vite:
247
specifier: ^6.3.5
248
- version: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
248
+ version: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
249
vite-bundle-visualizer:
250
specifier: ^1.2.1
251
version: 1.2.1(rollup@4.44.1)
252
vite-plugin-vue-devtools:
253
specifier: ^7.7.7
254
- version: 7.7.7(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
254
+ version: 7.7.7(@nuxt/kit@3.17.5)(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
255
vite-svg-loader:
256
specifier: ^5.1.0
257
version: 5.1.0(vue@3.5.17(typescript@5.8.3))
258
vitest:
259
specifier: ^3.2.4
260
- version: 3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
260
+ version: 3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
261
vue-tsc:
262
specifier: ^2.2.10
263
version: 2.2.10(typescript@5.8.3)
@@ -1416,8 +1416,8 @@ packages:
1416
'@types/ms@2.1.0':
1417
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
1418
1419
- '@types/node@24.0.6':
1420
- resolution: {integrity: sha512-ZOyn+gOs749xU7ovp+Ibj0g1o3dFRqsfPnT22C2t5JzcRvgsEDpGawPbCISGKLudJk9Y0wiu9sYd6kUh0pc9TA==}
1419
+ '@types/node@24.0.8':
1420
+ resolution: {integrity: sha512-WytNrFSgWO/esSH9NbpWUfTMGQwCGIKfCmNlmFDNiI5gGhgMmEA+V1AEvKLeBNvvtBnailJtkrEa2OIISwrVAA==}
1421
1422
'@types/parse-json@4.0.2':
1423
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
@@ -3740,12 +3740,15 @@ packages:
3740
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
3741
engines: {node: '>=0.10.0'}
3742
3743
- pinia-plugin-persistedstate@4.3.0:
3744
- resolution: {integrity: sha512-x9wxpHj6iFDj5ITQJ3rj6+KesEqyRk/vqcE3WE+VGfetleV9Zufqwa9qJ6AkA5wmRSQEp7BTA1us/MDVTRHFFw==}
3743
+ pinia-plugin-persistedstate@4.4.1:
3744
+ resolution: {integrity: sha512-lmuMPpXla2zJKjxEq34e1E9P9jxkWEhcVwwioCCE0izG45kkTOvQfCzvwhW3i38cvnaWC7T1eRdkd15Re59ldw==}
3745
peerDependencies:
3746
+ '@nuxt/kit': '>=3.0.0'
3747
'@pinia/nuxt': '>=0.10.0'
3748
pinia: '>=3.0.0'
3749
peerDependenciesMeta:
3750
+ '@nuxt/kit':
3751
+ optional: true
3752
'@pinia/nuxt':
3753
optional: true
3754
pinia:
@@ -4904,7 +4907,7 @@ snapshots:
4907
'@jridgewell/gen-mapping': 0.3.8
4908
'@jridgewell/trace-mapping': 0.3.25
4909
4907
- '@antfu/eslint-config@4.16.1(@vue/compiler-sfc@3.5.17)(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
4910
+ '@antfu/eslint-config@4.16.1(@vue/compiler-sfc@3.5.17)(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
4911
dependencies:
4912
'@antfu/install-pkg': 1.1.0
4913
'@clack/prompts': 0.11.0
@@ -4913,7 +4916,7 @@ snapshots:
4916
'@stylistic/eslint-plugin': 5.0.0(eslint@9.30.0(jiti@2.4.2))
4917
'@typescript-eslint/eslint-plugin': 8.35.0(@typescript-eslint/parser@8.35.0(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)
4918
'@typescript-eslint/parser': 8.35.0(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)
4916
- '@vitest/eslint-plugin': 1.3.3(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
4919
+ '@vitest/eslint-plugin': 1.3.3(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
4920
ansis: 4.1.0
4921
cac: 6.7.14
4922
eslint: 9.30.0(jiti@2.4.2)
@@ -5616,6 +5619,7 @@ snapshots:
5619
untyped: 2.0.0
5620
transitivePeerDependencies:
5621
- magicast
5622
+ optional: true
5623
5624
'@one-ini/wasm@0.1.1': {}
5625
@@ -5908,12 +5912,12 @@ snapshots:
5912
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.11
5913
'@tailwindcss/oxide-win32-x64-msvc': 4.1.11
5914
5911
- '@tailwindcss/vite@4.1.11(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
5915
+ '@tailwindcss/vite@4.1.11(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
5916
dependencies:
5917
'@tailwindcss/node': 4.1.11
5918
'@tailwindcss/oxide': 4.1.11
5919
tailwindcss: 4.1.11
5916
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
5920
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
5921
5922
'@trysound/sax@0.2.0': {}
5923
@@ -5942,7 +5946,7 @@ snapshots:
5946
'@types/fs-extra@11.0.4':
5947
dependencies:
5948
'@types/jsonfile': 6.1.4
5945
- '@types/node': 24.0.6
5949
+ '@types/node': 24.0.8
5950
5951
'@types/hast@3.0.4':
5952
dependencies:
@@ -5950,7 +5954,7 @@ snapshots:
5954
5955
'@types/jsdom@21.1.7':
5956
dependencies:
5953
- '@types/node': 24.0.6
5957
+ '@types/node': 24.0.8
5958
'@types/tough-cookie': 4.0.5
5959
parse5: 7.3.0
5960
@@ -5958,7 +5962,7 @@ snapshots:
5962
5963
'@types/jsonfile@6.1.4':
5964
dependencies:
5961
- '@types/node': 24.0.6
5965
+ '@types/node': 24.0.8
5966
5967
'@types/katex@0.16.7': {}
5968
@@ -5985,7 +5989,7 @@ snapshots:
5989
5990
'@types/ms@2.1.0': {}
5991
5988
- '@types/node@24.0.6':
5992
+ '@types/node@24.0.8':
5993
dependencies:
5994
undici-types: 7.8.0
5995
@@ -6009,7 +6013,7 @@ snapshots:
6013
6014
'@types/yauzl@2.10.3':
6015
dependencies:
6012
- '@types/node': 24.0.6
6016
+ '@types/node': 24.0.8
6017
optional: true
6018
6019
'@typescript-eslint/eslint-plugin@8.35.0(@typescript-eslint/parser@8.35.0(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)':
@@ -6106,29 +6110,29 @@ snapshots:
6110
6111
'@ungap/structured-clone@1.3.0': {}
6112
6109
- '@vitejs/plugin-vue-jsx@4.2.0(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))':
6113
+ '@vitejs/plugin-vue-jsx@4.2.0(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))':
6114
dependencies:
6115
'@babel/core': 7.27.7
6116
'@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.27.7)
6117
'@rolldown/pluginutils': 1.0.0-beta.21
6118
'@vue/babel-plugin-jsx': 1.4.0(@babel/core@7.27.7)
6115
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6119
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6120
vue: 3.5.17(typescript@5.8.3)
6121
transitivePeerDependencies:
6122
- supports-color
6123
6120
- '@vitejs/plugin-vue@5.2.4(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))':
6124
+ '@vitejs/plugin-vue@5.2.4(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))':
6125
dependencies:
6122
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6126
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6127
vue: 3.5.17(typescript@5.8.3)
6128
6125
- '@vitest/eslint-plugin@1.3.3(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
6129
+ '@vitest/eslint-plugin@1.3.3(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
6130
dependencies:
6131
'@typescript-eslint/utils': 8.35.0(eslint@9.30.0(jiti@2.4.2))(typescript@5.8.3)
6132
eslint: 9.30.0(jiti@2.4.2)
6133
optionalDependencies:
6134
typescript: 5.8.3
6131
- vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6135
+ vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6136
transitivePeerDependencies:
6137
- supports-color
6138
@@ -6140,13 +6144,13 @@ snapshots:
6144
chai: 5.2.0
6145
tinyrainbow: 2.0.0
6146
6143
- '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
6147
+ '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))':
6148
dependencies:
6149
'@vitest/spy': 3.2.4
6150
estree-walker: 3.0.3
6151
magic-string: 0.30.17
6152
optionalDependencies:
6149
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6153
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
6154
6155
'@vitest/pretty-format@3.2.4':
6156
dependencies:
@@ -6256,14 +6260,14 @@ snapshots:
6260
dependencies:
6261
'@vue/devtools-kit': 7.7.7
6262
6259
- '@vue/devtools-core@7.7.7(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))':
6263
+ '@vue/devtools-core@7.7.7(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))':
6264
dependencies:
6265
'@vue/devtools-kit': 7.7.7
6266
'@vue/devtools-shared': 7.7.7
6267
mitt: 3.0.1
6268
nanoid: 5.1.5
6269
pathe: 2.0.3
6266
- vite-hot-client: 2.0.4(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
6270
+ vite-hot-client: 2.0.4(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
6271
vue: 3.5.17(typescript@5.8.3)
6272
transitivePeerDependencies:
6273
- vite
@@ -6538,6 +6542,7 @@ snapshots:
6542
perfect-debounce: 1.0.0
6543
pkg-types: 2.1.1
6544
rc9: 2.1.2
6545
+ optional: true
6546
6547
cac@6.7.14: {}
6548
@@ -6599,6 +6604,7 @@ snapshots:
6604
citty@0.1.6:
6605
dependencies:
6606
consola: 3.4.2
6607
+ optional: true
6608
6609
classnames@2.5.1: {}
6610
@@ -6685,7 +6691,8 @@ snapshots:
6691
ini: 1.3.8
6692
proto-list: 1.2.4
6693
6688
- consola@3.4.2: {}
6694
+ consola@3.4.2:
6695
+ optional: true
6696
6697
convert-source-map@2.0.0: {}
6698
@@ -6929,7 +6936,8 @@ snapshots:
6936
domelementtype: 2.3.0
6937
domhandler: 5.0.3
6938
6932
- dotenv@16.6.1: {}
6939
+ dotenv@16.6.1:
6940
+ optional: true
6941
6942
dunder-proto@1.0.1:
6943
dependencies:
@@ -6990,7 +6998,8 @@ snapshots:
6998
6999
error-stack-parser-es@0.1.5: {}
7000
6993
- errx@0.1.0: {}
7001
+ errx@0.1.0:
7002
+ optional: true
7003
7004
es-define-property@1.0.1: {}
7005
@@ -7575,6 +7584,7 @@ snapshots:
7584
node-fetch-native: 1.6.6
7585
nypm: 0.6.0
7586
pathe: 2.0.3
7587
+ optional: true
7588
7589
github-slugger@2.0.0: {}
7590
@@ -7931,9 +7941,11 @@ snapshots:
7941
dependencies:
7942
json-buffer: 3.0.1
7943
7934
- klona@2.0.6: {}
7944
+ klona@2.0.6:
7945
+ optional: true
7946
7936
- knitwork@1.2.0: {}
7947
+ knitwork@1.2.0:
7948
+ optional: true
7949
7950
kolorist@1.8.0: {}
7951
@@ -8547,6 +8559,7 @@ snapshots:
8559
pathe: 2.0.3
8560
pkg-types: 2.1.1
8561
tinyexec: 0.3.2
8562
+ optional: true
8563
8564
object-inspect@1.13.4: {}
8565
@@ -8556,7 +8569,8 @@ snapshots:
8569
node-fetch-native: 1.6.6
8570
ufo: 1.6.1
8571
8559
- ohash@2.0.11: {}
8572
+ ohash@2.0.11:
8573
+ optional: true
8574
8575
once@1.4.0:
8576
dependencies:
@@ -8688,16 +8702,14 @@ snapshots:
8702
8703
pify@2.3.0: {}
8704
8691
- pinia-plugin-persistedstate@4.3.0(pinia@3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3))):
8705
+ pinia-plugin-persistedstate@4.4.1(@nuxt/kit@3.17.5)(pinia@3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3))):
8706
dependencies:
8693
- '@nuxt/kit': 3.17.5
8707
deep-pick-omit: 1.2.1
8708
defu: 6.1.4
8709
destr: 2.0.5
8710
optionalDependencies:
8711
+ '@nuxt/kit': 3.17.5
8712
pinia: 3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3))
8699
- transitivePeerDependencies:
8700
- - magicast
8713
8714
pinia@3.0.3(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)):
8715
dependencies:
@@ -8795,6 +8807,7 @@ snapshots:
8807
dependencies:
8808
defu: 6.1.4
8809
destr: 2.0.5
8810
+ optional: true
8811
8812
read-package-json-fast@4.0.0:
8813
dependencies:
@@ -8940,7 +8953,8 @@ snapshots:
8953
refa: 0.12.1
8954
regexp-ast-analysis: 0.7.1
8955
8943
- scule@1.3.0: {}
8956
+ scule@1.3.0:
8957
+ optional: true
8958
8959
secure-ls@2.0.0:
8960
dependencies:
@@ -9299,6 +9313,7 @@ snapshots:
9313
estree-walker: 3.0.3
9314
magic-string: 0.30.17
9315
unplugin: 2.3.5
9316
+ optional: true
9317
9318
undici-types@7.8.0: {}
9319
@@ -9320,6 +9335,7 @@ snapshots:
9335
tinyglobby: 0.2.14
9336
unplugin: 2.3.5
9337
unplugin-utils: 0.2.4
9338
+ optional: true
9339
9340
unist-util-is@6.0.0:
9341
dependencies:
@@ -9350,12 +9366,14 @@ snapshots:
9366
dependencies:
9367
pathe: 2.0.3
9368
picomatch: 4.0.2
9369
+ optional: true
9370
9371
unplugin@2.3.5:
9372
dependencies:
9373
acorn: 8.15.0
9374
picomatch: 4.0.2
9375
webpack-virtual-modules: 0.6.2
9376
+ optional: true
9377
9378
untildify@4.0.0: {}
9379
@@ -9366,6 +9384,7 @@ snapshots:
9384
jiti: 2.4.2
9385
knitwork: 1.2.0
9386
scule: 1.3.0
9387
+ optional: true
9388
9389
update-browserslist-db@1.1.3(browserslist@4.25.1):
9390
dependencies:
@@ -9415,17 +9434,17 @@ snapshots:
9434
- rollup
9435
- supports-color
9436
9418
- vite-hot-client@2.0.4(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)):
9437
+ vite-hot-client@2.0.4(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)):
9438
dependencies:
9420
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9439
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9440
9422
- vite-node@3.2.4(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0):
9441
+ vite-node@3.2.4(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0):
9442
dependencies:
9443
cac: 6.7.14
9444
debug: 4.4.1(supports-color@8.1.1)
9445
es-module-lexer: 1.7.0
9446
pathe: 2.0.3
9428
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9447
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9448
transitivePeerDependencies:
9449
- '@types/node'
9450
- jiti
@@ -9440,7 +9459,7 @@ snapshots:
9459
- tsx
9460
- yaml
9461
9443
- vite-plugin-inspect@0.8.9(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)):
9462
+ vite-plugin-inspect@0.8.9(@nuxt/kit@3.17.5)(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)):
9463
dependencies:
9464
'@antfu/utils': 0.7.10
9465
'@rollup/pluginutils': 5.2.0(rollup@4.44.1)
@@ -9451,28 +9470,30 @@ snapshots:
9470
perfect-debounce: 1.0.0
9471
picocolors: 1.1.1
9472
sirv: 3.0.1
9454
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9473
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9474
+ optionalDependencies:
9475
+ '@nuxt/kit': 3.17.5
9476
transitivePeerDependencies:
9477
- rollup
9478
- supports-color
9479
9459
- vite-plugin-vue-devtools@7.7.7(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)):
9480
+ vite-plugin-vue-devtools@7.7.7(@nuxt/kit@3.17.5)(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)):
9481
dependencies:
9461
- '@vue/devtools-core': 7.7.7(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
9482
+ '@vue/devtools-core': 7.7.7(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3))
9483
'@vue/devtools-kit': 7.7.7
9484
'@vue/devtools-shared': 7.7.7
9485
execa: 9.6.0
9486
sirv: 3.0.1
9466
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9467
- vite-plugin-inspect: 0.8.9(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
9468
- vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
9487
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9488
+ vite-plugin-inspect: 0.8.9(@nuxt/kit@3.17.5)(rollup@4.44.1)(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
9489
+ vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
9490
transitivePeerDependencies:
9491
- '@nuxt/kit'
9492
- rollup
9493
- supports-color
9494
- vue
9495
9475
- vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)):
9496
+ vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)):
9497
dependencies:
9498
'@babel/core': 7.27.7
9499
'@babel/plugin-proposal-decorators': 7.27.1(@babel/core@7.27.7)
@@ -9483,7 +9504,7 @@ snapshots:
9504
'@vue/compiler-dom': 3.5.17
9505
kolorist: 1.8.0
9506
magic-string: 0.30.17
9486
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9507
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9508
transitivePeerDependencies:
9509
- supports-color
9510
@@ -9492,7 +9513,7 @@ snapshots:
9513
svgo: 3.3.2
9514
vue: 3.5.17(typescript@5.8.3)
9515
9495
- vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0):
9516
+ vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0):
9517
dependencies:
9518
esbuild: 0.25.5
9519
fdir: 6.4.6(picomatch@4.0.2)
@@ -9501,18 +9522,18 @@ snapshots:
9522
rollup: 4.44.1
9523
tinyglobby: 0.2.14
9524
optionalDependencies:
9504
- '@types/node': 24.0.6
9525
+ '@types/node': 24.0.8
9526
fsevents: 2.3.3
9527
jiti: 2.4.2
9528
lightningcss: 1.30.1
9529
sass: 1.89.2
9530
yaml: 2.8.0
9531
9511
- vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.6)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0):
9532
+ vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.8)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0):
9533
dependencies:
9534
'@types/chai': 5.2.2
9535
'@vitest/expect': 3.2.4
9515
- '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
9536
+ '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0))
9537
'@vitest/pretty-format': 3.2.4
9538
'@vitest/runner': 3.2.4
9539
'@vitest/snapshot': 3.2.4
@@ -9530,12 +9551,12 @@ snapshots:
9551
tinyglobby: 0.2.14
9552
tinypool: 1.1.1
9553
tinyrainbow: 2.0.0
9533
- vite: 6.3.5(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9534
- vite-node: 3.2.4(@types/node@24.0.6)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9554
+ vite: 6.3.5(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9555
+ vite-node: 3.2.4(@types/node@24.0.8)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(yaml@2.8.0)
9556
why-is-node-running: 2.3.0
9557
optionalDependencies:
9558
'@types/debug': 4.1.12
9538
- '@types/node': 24.0.6
9559
+ '@types/node': 24.0.8
9560
jsdom: 26.1.0
9561
transitivePeerDependencies:
9562
- jiti
@@ -9669,7 +9690,8 @@ snapshots:
9690
9691
webidl-conversions@7.0.0: {}
9692
9672
- webpack-virtual-modules@0.6.2: {}
9693
+ webpack-virtual-modules@0.6.2:
9694
+ optional: true
9695
9696
whatwg-encoding@3.1.1:
9697
dependencies:
frontend/src/api/endpoints/threatIntel.ts
+5
-1
@@ -77,10 +77,14 @@ export default {
77
ioc_value: iocValue
78
})
79
},
80
- virusTotalFileCheck(file: File) {
80
+ virusTotalFileCheck(file: File, password?: string) {
81
const form = new FormData()
82
form.append("file", new Blob([file], { type: file.type }), file.name)
83
84
+ if (password) {
85
+ form.append("password", password)
86
+ }
87
+
88
return HttpClient.post<FlaskBaseResponse & { data: VirusTotalFileCheckResponse }>(
89
`/threat_intel/virustotal/file/submit`,
90
form
frontend/src/components/threatIntel/VirusTotalForm.vue
+45
-4
@@ -10,6 +10,20 @@
10
<div class="font-medium">Click or drag a file to this area to upload</div>
11
</n-upload-dragger>
12
</n-upload>
13
+ <n-collapse-transition :show="!!newFile">
14
+ <div class="mt-1 flex justify-end">
15
+ <n-checkbox v-model:checked="isPasswordProtected">It is password protected</n-checkbox>
16
+ </div>
17
+ </n-collapse-transition>
18
+ <n-collapse-transition :show="!!newFile && isPasswordProtected">
19
+ <n-input
20
+ v-model:value="filePassword"
21
+ type="password"
22
+ show-password-on="click"
23
+ class="mt-3"
24
+ placeholder="File password"
25
+ />
26
+ </n-collapse-transition>
27
</div>
28
<div class="mb-2 flex justify-end">
29
<n-button type="primary" :disabled="!isValid" :loading="uploading" @click="submit()">Submit</n-button>
@@ -200,8 +214,19 @@ import type { UploadFileInfo } from "naive-ui"
214
import type { VirusTotalAnalysis, VirusTotalFileCheckResponse } from "@/types/threatIntel.d"
215
import { useClipboard } from "@vueuse/core"
216
import _isEmpty from "lodash/isEmpty"
203
-import { NAlert, NButton, NSpin, NTooltip, NUpload, NUploadDragger, useMessage } from "naive-ui"
204
-import { computed, onMounted, ref } from "vue"
217
+import {
218
+ NAlert,
219
+ NButton,
220
+ NCheckbox,
221
+ NCollapseTransition,
222
+ NInput,
223
+ NSpin,
224
+ NTooltip,
225
+ NUpload,
226
+ NUploadDragger,
227
+ useMessage
228
+} from "naive-ui"
229
+import { computed, onMounted, ref, watch } from "vue"
230
import Api from "@/api"
231
import Icon from "@/components/common/Icon.vue"
232
@@ -228,12 +253,20 @@ const analysisResponse = ref<VirusTotalAnalysis | null>(null)
253
const error = ref<string>("")
254
const fileList = ref<UploadFileInfo[]>([])
255
const newFile = computed<File | null>(() => fileList.value?.[0]?.file || null)
256
+const isPasswordProtected = ref(false)
257
+const filePassword = ref<string | null>(null)
258
let abortController: AbortController | null = null
259
260
const fileLink = computed(() => fileResponse.value?.links.self || "")
261
const { copy: copyLink, copied: showCopyTooltip, isSupported: isCopySupported } = useClipboard({ source: fileLink })
262
236
-const isValid = computed(() => !!newFile.value)
263
+const isValid = computed(() => {
264
+ if (isPasswordProtected.value && !filePassword.value) {
265
+ return false
266
+ }
267
+
268
+ return !!newFile.value
269
+})
270
271
function restore() {
272
fileList.value = []
@@ -251,7 +284,7 @@ function submit() {
284
uploading.value = true
285
286
Api.threatIntel
254
- .virusTotalFileCheck(newFile.value)
287
+ .virusTotalFileCheck(newFile.value, filePassword.value || undefined)
288
.then(res => {
289
if (res.data.success) {
290
error.value = ""
@@ -303,6 +336,14 @@ function analysis() {
336
})
337
}
338
339
+watch(newFile, () => {
340
+ isPasswordProtected.value = false
341
+})
342
+
343
+watch(isPasswordProtected, () => {
344
+ filePassword.value = null
345
+})
346
+
347
onMounted(() => {
348
emit("mounted", {
349
restore