@cryptotaxi247 / CoPilot / commits / 680d7728

New pushes (#375)

* chore: update dependencies in frontend * fix: login error handler * feat: add provision for sync agent vulnerabilities * refactor: improve incident cases list responsiveness * precommit fixes --------- Co-authored-by: Davide Di Modica <webmaster.ddm@gmail.com>

taylor_socfortress committed Dec 13, 2024 at 14:04 UTC 680d7728b66c992b8779d516613a01542146b1c7
10 files changed +298 -209
backend/app/agents/routes/agents.py
+2 -1
@@ -4,8 +4,9 @@ import io
4
5 # from fastapi import BackgroundTasks
6 from fastapi import APIRouter
7 +from fastapi import BackgroundTasks
8 from fastapi import Depends
8 -from fastapi import HTTPException, BackgroundTasks
9 +from fastapi import HTTPException
10 from fastapi import Path
11 from fastapi import Security
12 from fastapi.responses import StreamingResponse
frontend/package-lock.json
+116 -182
@@ -47,7 +47,7 @@
47 "vuedraggable": "^4.1.0"
48 },
49 "devDependencies": {
50 - "@antfu/eslint-config": "^3.11.2",
50 + "@antfu/eslint-config": "^3.12.0",
51 "@clack/prompts": "^0.8.2",
52 "@iconify/vue": "^4.2.0",
53 "@tsconfig/node20": "^20.1.4",
@@ -73,12 +73,12 @@
73 "postcss": "^8.4.49",
74 "prettier": "^3.4.2",
75 "prettier-plugin-tailwindcss": "^0.6.9",
76 - "sass": "^1.82.0",
76 + "sass": "^1.83.0",
77 "start-server-and-test": "^2.0.9",
78 "tailwind-config-viewer": "^2.0.4",
79 "tailwindcss": "^3.4.16",
80 "taze": "^0.18.0",
81 - "type-fest": "^4.30.0",
81 + "type-fest": "^4.30.1",
82 "typescript": "~5.6.3",
83 "unplugin-vue-components": "^0.27.5",
84 "vite": "^5.4.11",
@@ -130,9 +130,9 @@
130 }
131 },
132 "node_modules/@antfu/eslint-config": {
133 - "version": "3.11.2",
134 - "resolved": "https://registry.npmjs.org/@antfu/eslint-config/-/eslint-config-3.11.2.tgz",
135 - "integrity": "sha512-hoi2MnOdiKL8mIhpMtinwMrqVPq6QVbHPA+BuQD4pqE6yVLyYvjdLFiKApMsezAM+YofCsbhak2oY+JCiIyeNA==",
133 + "version": "3.12.0",
134 + "resolved": "https://registry.npmjs.org/@antfu/eslint-config/-/eslint-config-3.12.0.tgz",
135 + "integrity": "sha512-dMHomZZXufEpjKElh7dcfBKu+qFGz9NOACGaqNNAmr9XHe5JQe/6oNNdP3YGeyXSPR/V37IXFvxM0P76WHv1IA==",
136 "dev": true,
137 "license": "MIT",
138 "dependencies": {
@@ -140,29 +140,29 @@
140 "@clack/prompts": "^0.8.2",
141 "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
142 "@eslint/markdown": "^6.2.1",
143 - "@stylistic/eslint-plugin": "^2.11.0",
144 - "@typescript-eslint/eslint-plugin": "^8.16.0",
145 - "@typescript-eslint/parser": "^8.16.0",
146 - "@vitest/eslint-plugin": "^1.1.12",
143 + "@stylistic/eslint-plugin": "^2.12.1",
144 + "@typescript-eslint/eslint-plugin": "^8.18.0",
145 + "@typescript-eslint/parser": "^8.18.0",
146 + "@vitest/eslint-plugin": "^1.1.16",
147 "eslint-config-flat-gitignore": "^0.3.0",
148 "eslint-flat-config-utils": "^0.4.0",
149 "eslint-merge-processors": "^0.1.0",
150 "eslint-plugin-antfu": "^2.7.0",
151 "eslint-plugin-command": "^0.2.6",
152 - "eslint-plugin-import-x": "^4.4.3",
153 - "eslint-plugin-jsdoc": "^50.6.0",
152 + "eslint-plugin-import-x": "^4.5.0",
153 + "eslint-plugin-jsdoc": "^50.6.1",
154 "eslint-plugin-jsonc": "^2.18.2",
155 - "eslint-plugin-n": "^17.14.0",
155 + "eslint-plugin-n": "^17.15.0",
156 "eslint-plugin-no-only-tests": "^3.3.0",
157 - "eslint-plugin-perfectionist": "^4.1.2",
157 + "eslint-plugin-perfectionist": "^4.3.0",
158 "eslint-plugin-regexp": "^2.7.0",
159 - "eslint-plugin-toml": "^0.11.1",
159 + "eslint-plugin-toml": "^0.12.0",
160 "eslint-plugin-unicorn": "^56.0.1",
161 "eslint-plugin-unused-imports": "^4.1.4",
162 - "eslint-plugin-vue": "^9.31.0",
163 - "eslint-plugin-yml": "^1.15.0",
162 + "eslint-plugin-vue": "^9.32.0",
163 + "eslint-plugin-yml": "^1.16.0",
164 "eslint-processor-vue-blocks": "^0.1.2",
165 - "globals": "^15.12.0",
165 + "globals": "^15.13.0",
166 "jsonc-eslint-parser": "^2.4.0",
167 "local-pkg": "^0.5.1",
168 "parse-gitignore": "^2.0.0",
@@ -179,7 +179,7 @@
179 "url": "https://github.com/sponsors/antfu"
180 },
181 "peerDependencies": {
182 - "@eslint-react/eslint-plugin": "^1.5.8",
182 + "@eslint-react/eslint-plugin": "^1.19.0",
183 "@prettier/plugin-xml": "^3.4.1",
184 "@unocss/eslint-plugin": ">=0.50.0",
185 "astro-eslint-parser": "^1.0.2",
@@ -236,6 +236,19 @@
236 }
237 }
238 },
239 + "node_modules/@antfu/eslint-config/node_modules/globals": {
240 + "version": "15.13.0",
241 + "resolved": "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz",
242 + "integrity": "sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==",
243 + "dev": true,
244 + "license": "MIT",
245 + "engines": {
246 + "node": ">=18"
247 + },
248 + "funding": {
249 + "url": "https://github.com/sponsors/sindresorhus"
250 + }
251 + },
252 "node_modules/@antfu/install-pkg": {
253 "version": "0.5.0",
254 "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-0.5.0.tgz",
@@ -2689,9 +2702,9 @@
2702 }
2703 },
2704 "node_modules/@stylistic/eslint-plugin": {
2692 - "version": "2.11.0",
2693 - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.11.0.tgz",
2694 - "integrity": "sha512-PNRHbydNG5EH8NK4c+izdJlxajIR6GxcUhzsYNRsn6Myep4dsZt0qFCz3rCPnkvgO5FYibDcMqgNHUT+zvjYZw==",
2705 + "version": "2.12.1",
2706 + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.12.1.tgz",
2707 + "integrity": "sha512-fubZKIHSPuo07FgRTn6S4Nl0uXPRPYVNpyZzIDGfp7Fny6JjNus6kReLD7NI380JXi4HtUTSOZ34LBuNPO1XLQ==",
2708 "dev": true,
2709 "license": "MIT",
2710 "dependencies": {
@@ -2994,17 +3007,17 @@
3007 }
3008 },
3009 "node_modules/@typescript-eslint/eslint-plugin": {
2997 - "version": "8.16.0",
2998 - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.16.0.tgz",
2999 - "integrity": "sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==",
3010 + "version": "8.18.0",
3011 + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz",
3012 + "integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==",
3013 "dev": true,
3014 "license": "MIT",
3015 "dependencies": {
3016 "@eslint-community/regexpp": "^4.10.0",
3004 - "@typescript-eslint/scope-manager": "8.16.0",
3005 - "@typescript-eslint/type-utils": "8.16.0",
3006 - "@typescript-eslint/utils": "8.16.0",
3007 - "@typescript-eslint/visitor-keys": "8.16.0",
3017 + "@typescript-eslint/scope-manager": "8.18.0",
3018 + "@typescript-eslint/type-utils": "8.18.0",
3019 + "@typescript-eslint/utils": "8.18.0",
3020 + "@typescript-eslint/visitor-keys": "8.18.0",
3021 "graphemer": "^1.4.0",
3022 "ignore": "^5.3.1",
3023 "natural-compare": "^1.4.0",
@@ -3019,25 +3032,21 @@
3032 },
3033 "peerDependencies": {
3034 "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0",
3022 - "eslint": "^8.57.0 || ^9.0.0"
3023 - },
3024 - "peerDependenciesMeta": {
3025 - "typescript": {
3026 - "optional": true
3027 - }
3035 + "eslint": "^8.57.0 || ^9.0.0",
3036 + "typescript": ">=4.8.4 <5.8.0"
3037 }
3038 },
3039 "node_modules/@typescript-eslint/parser": {
3031 - "version": "8.16.0",
3032 - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.16.0.tgz",
3033 - "integrity": "sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==",
3040 + "version": "8.18.0",
3041 + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz",
3042 + "integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==",
3043 "dev": true,
3035 - "license": "BSD-2-Clause",
3044 + "license": "MITClause",
3045 "dependencies": {
3037 - "@typescript-eslint/scope-manager": "8.16.0",
3038 - "@typescript-eslint/types": "8.16.0",
3039 - "@typescript-eslint/typescript-estree": "8.16.0",
3040 - "@typescript-eslint/visitor-keys": "8.16.0",
3046 + "@typescript-eslint/scope-manager": "8.18.0",
3047 + "@typescript-eslint/types": "8.18.0",
3048 + "@typescript-eslint/typescript-estree": "8.18.0",
3049 + "@typescript-eslint/visitor-keys": "8.18.0",
3050 "debug": "^4.3.4"
3051 },
3052 "engines": {
@@ -3048,23 +3057,19 @@
3057 "url": "https://opencollective.com/typescript-eslint"
3058 },
3059 "peerDependencies": {
3051 - "eslint": "^8.57.0 || ^9.0.0"
3052 - },
3053 - "peerDependenciesMeta": {
3054 - "typescript": {
3055 - "optional": true
3056 - }
3060 + "eslint": "^8.57.0 || ^9.0.0",
3061 + "typescript": ">=4.8.4 <5.8.0"
3062 }
3063 },
3064 "node_modules/@typescript-eslint/scope-manager": {
3060 - "version": "8.16.0",
3061 - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz",
3062 - "integrity": "sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==",
3065 + "version": "8.18.0",
3066 + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz",
3067 + "integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==",
3068 "dev": true,
3069 "license": "MIT",
3070 "dependencies": {
3066 - "@typescript-eslint/types": "8.16.0",
3067 - "@typescript-eslint/visitor-keys": "8.16.0"
3071 + "@typescript-eslint/types": "8.18.0",
3072 + "@typescript-eslint/visitor-keys": "8.18.0"
3073 },
3074 "engines": {
3075 "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3075,14 +3080,14 @@
3080 }
3081 },
3082 "node_modules/@typescript-eslint/type-utils": {
3078 - "version": "8.16.0",
3079 - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz",
3080 - "integrity": "sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==",
3083 + "version": "8.18.0",
3084 + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz",
3085 + "integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==",
3086 "dev": true,
3087 "license": "MIT",
3088 "dependencies": {
3084 - "@typescript-eslint/typescript-estree": "8.16.0",
3085 - "@typescript-eslint/utils": "8.16.0",
3089 + "@typescript-eslint/typescript-estree": "8.18.0",
3090 + "@typescript-eslint/utils": "8.18.0",
3091 "debug": "^4.3.4",
3092 "ts-api-utils": "^1.3.0"
3093 },
@@ -3094,18 +3099,14 @@
3099 "url": "https://opencollective.com/typescript-eslint"
3100 },
3101 "peerDependencies": {
3097 - "eslint": "^8.57.0 || ^9.0.0"
3098 - },
3099 - "peerDependenciesMeta": {
3100 - "typescript": {
3101 - "optional": true
3102 - }
3102 + "eslint": "^8.57.0 || ^9.0.0",
3103 + "typescript": ">=4.8.4 <5.8.0"
3104 }
3105 },
3106 "node_modules/@typescript-eslint/types": {
3106 - "version": "8.16.0",
3107 - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.16.0.tgz",
3108 - "integrity": "sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==",
3107 + "version": "8.18.0",
3108 + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz",
3109 + "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==",
3110 "dev": true,
3111 "license": "MIT",
3112 "engines": {
@@ -3143,49 +3144,17 @@
3144 "typescript": ">=4.8.4 <5.8.0"
3145 }
3146 },
3146 - "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/types": {
3147 - "version": "8.18.0",
3148 - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz",
3149 - "integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==",
3150 - "dev": true,
3151 - "license": "MIT",
3152 - "engines": {
3153 - "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
3154 - },
3155 - "funding": {
3156 - "type": "opencollective",
3157 - "url": "https://opencollective.com/typescript-eslint"
3158 - }
3159 - },
3160 - "node_modules/@typescript-eslint/typescript-estree/node_modules/@typescript-eslint/visitor-keys": {
3161 - "version": "8.18.0",
3162 - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz",
3163 - "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==",
3164 - "dev": true,
3165 - "license": "MIT",
3166 - "dependencies": {
3167 - "@typescript-eslint/types": "8.18.0",
3168 - "eslint-visitor-keys": "^4.2.0"
3169 - },
3170 - "engines": {
3171 - "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
3172 - },
3173 - "funding": {
3174 - "type": "opencollective",
3175 - "url": "https://opencollective.com/typescript-eslint"
3176 - }
3177 - },
3147 "node_modules/@typescript-eslint/utils": {
3179 - "version": "8.16.0",
3180 - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.16.0.tgz",
3181 - "integrity": "sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==",
3148 + "version": "8.18.0",
3149 + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz",
3150 + "integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==",
3151 "dev": true,
3152 "license": "MIT",
3153 "dependencies": {
3154 "@eslint-community/eslint-utils": "^4.4.0",
3186 - "@typescript-eslint/scope-manager": "8.16.0",
3187 - "@typescript-eslint/types": "8.16.0",
3188 - "@typescript-eslint/typescript-estree": "8.16.0"
3155 + "@typescript-eslint/scope-manager": "8.18.0",
3156 + "@typescript-eslint/types": "8.18.0",
3157 + "@typescript-eslint/typescript-estree": "8.18.0"
3158 },
3159 "engines": {
3160 "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3195,22 +3164,18 @@
3164 "url": "https://opencollective.com/typescript-eslint"
3165 },
3166 "peerDependencies": {
3198 - "eslint": "^8.57.0 || ^9.0.0"
3199 - },
3200 - "peerDependenciesMeta": {
3201 - "typescript": {
3202 - "optional": true
3203 - }
3167 + "eslint": "^8.57.0 || ^9.0.0",
3168 + "typescript": ">=4.8.4 <5.8.0"
3169 }
3170 },
3171 "node_modules/@typescript-eslint/visitor-keys": {
3207 - "version": "8.16.0",
3208 - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz",
3209 - "integrity": "sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==",
3172 + "version": "8.18.0",
3173 + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz",
3174 + "integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==",
3175 "dev": true,
3176 "license": "MIT",
3177 "dependencies": {
3213 - "@typescript-eslint/types": "8.16.0",
3178 + "@typescript-eslint/types": "8.18.0",
3179 "eslint-visitor-keys": "^4.2.0"
3180 },
3181 "engines": {
@@ -3261,9 +3226,9 @@
3226 }
3227 },
3228 "node_modules/@vitest/eslint-plugin": {
3264 - "version": "1.1.12",
3265 - "resolved": "https://registry.npmjs.org/@vitest/eslint-plugin/-/eslint-plugin-1.1.12.tgz",
3266 - "integrity": "sha512-iv9K9fz9qRxBo9J/PGSMcLdOFIKqtFZ6THqSVG/jW8CJZFkIWLxPduCTXkbyG6FNKgL49fkv348nSgmfqCU6FA==",
3229 + "version": "1.1.16",
3230 + "resolved": "https://registry.npmjs.org/@vitest/eslint-plugin/-/eslint-plugin-1.1.16.tgz",
3231 + "integrity": "sha512-xecwJYuAp11AFsd2aoSnTWO3Wckgu7rjBz1VOhvsDtZzI4s7z/WerAR4gxnEFy37scdsE8wSlP95/2ry6sLhSg==",
3232 "dev": true,
3233 "license": "MIT",
3234 "peerDependencies": {
@@ -6318,12 +6283,13 @@
6283 }
6284 },
6285 "node_modules/eslint-plugin-import-x": {
6321 - "version": "4.4.3",
6322 - "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.4.3.tgz",
6323 - "integrity": "sha512-QBprHvhLsfDhP++2T1NnjsOUt6bLDX3NMHaYwAB1FD3xmYTkdFH+HS1OamGhz28jLkRyIZa6UNAzTxbHnJwz5w==",
6286 + "version": "4.5.0",
6287 + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.5.0.tgz",
6288 + "integrity": "sha512-l0OTfnPF8RwmSXfjT75N8d6ZYLVrVYWpaGlgvVkVqFERCI5SyBfDP7QEMr3kt0zWi2sOa9EQ47clbdFsHkF83Q==",
6289 "dev": true,
6290 "license": "MIT",
6291 "dependencies": {
6292 + "@typescript-eslint/scope-manager": "^8.1.0",
6293 "@typescript-eslint/utils": "^8.1.0",
6294 "debug": "^4.3.4",
6295 "doctrine": "^3.0.0",
@@ -6350,9 +6316,9 @@
6316 "license": "0BSD"
6317 },
6318 "node_modules/eslint-plugin-jsdoc": {
6353 - "version": "50.6.0",
6354 - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.0.tgz",
6355 - "integrity": "sha512-tCNp4fR79Le3dYTPB0dKEv7yFyvGkUCa+Z3yuTrrNGGOxBlXo9Pn0PEgroOZikUQOGjxoGMVKNjrOHcYEdfszg==",
6319 + "version": "50.6.1",
6320 + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.1.tgz",
6321 + "integrity": "sha512-UWyaYi6iURdSfdVVqvfOs2vdCVz0J40O/z/HTsv2sFjdjmdlUI/qlKLOTmwbPQ2tAfQnE5F9vqx+B+poF71DBQ==",
6322 "dev": true,
6323 "license": "BSD-3-Clause",
6324 "dependencies": {
@@ -6468,9 +6434,9 @@
6434 "license": "0BSD"
6435 },
6436 "node_modules/eslint-plugin-n": {
6471 - "version": "17.14.0",
6472 - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.14.0.tgz",
6473 - "integrity": "sha512-maxPLMEA0rPmRpoOlxEclKng4UpDe+N5BJS4t24I3UKnN109Qcivnfs37KMy84G0af3bxjog5lKctP5ObsvcTA==",
6437 + "version": "17.15.0",
6438 + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.15.0.tgz",
6439 + "integrity": "sha512-xF3zJkOfLlFOm5TvmqmsnA9/fO+/z2pYs0dkuKXKN/ymS6UB1yEcaoIkqxLKQ9Dw/WmLX/Tdh6/5ZS5azVixFQ==",
6440 "dev": true,
6441 "license": "MIT",
6442 "dependencies": {
@@ -6504,14 +6470,14 @@
6470 }
6471 },
6472 "node_modules/eslint-plugin-perfectionist": {
6507 - "version": "4.1.2",
6508 - "resolved": "https://registry.npmjs.org/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-4.1.2.tgz",
6509 - "integrity": "sha512-YjXPWB/rKe/gPUsyuxw75wTUrzN5MuJnRV0PH9NoonFvgcdVIXk551mkBKPr59nRZCbu7S3dFHwfo4gA42DB2w==",
6473 + "version": "4.3.0",
6474 + "resolved": "https://registry.npmjs.org/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-4.3.0.tgz",
6475 + "integrity": "sha512-8tQ/wn1dFelul2WoXL/NQOEwvWO8H4Vjmsqpt3fDQrfgybr8kQ5Vgb9BQyVRB33ywQqjUApsiwi5Ci7grMPPRA==",
6476 "dev": true,
6477 "license": "MIT",
6478 "dependencies": {
6513 - "@typescript-eslint/types": "^8.16.0",
6514 - "@typescript-eslint/utils": "^8.16.0",
6479 + "@typescript-eslint/types": "^8.18.0",
6480 + "@typescript-eslint/utils": "^8.18.0",
6481 "natural-orderby": "^5.0.0"
6482 },
6483 "engines": {
@@ -6544,14 +6510,14 @@
6510 }
6511 },
6512 "node_modules/eslint-plugin-toml": {
6547 - "version": "0.11.1",
6548 - "resolved": "https://registry.npmjs.org/eslint-plugin-toml/-/eslint-plugin-toml-0.11.1.tgz",
6549 - "integrity": "sha512-Y1WuMSzfZpeMIrmlP1nUh3kT8p96mThIq4NnHrYUhg10IKQgGfBZjAWnrg9fBqguiX4iFps/x/3Hb5TxBisfdw==",
6513 + "version": "0.12.0",
6514 + "resolved": "https://registry.npmjs.org/eslint-plugin-toml/-/eslint-plugin-toml-0.12.0.tgz",
6515 + "integrity": "sha512-+/wVObA9DVhwZB1nG83D2OAQRrcQZXy+drqUnFJKymqnmbnbfg/UPmEMCKrJNcEboUGxUjYrJlgy+/Y930mURQ==",
6516 "dev": true,
6517 "license": "MIT",
6518 "dependencies": {
6519 "debug": "^4.1.1",
6554 - "eslint-compat-utils": "^0.5.0",
6520 + "eslint-compat-utils": "^0.6.0",
6521 "lodash": "^4.17.19",
6522 "toml-eslint-parser": "^0.10.0"
6523 },
@@ -6565,22 +6531,6 @@
6531 "eslint": ">=6.0.0"
6532 }
6533 },
6568 - "node_modules/eslint-plugin-toml/node_modules/eslint-compat-utils": {
6569 - "version": "0.5.1",
6570 - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz",
6571 - "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==",
6572 - "dev": true,
6573 - "license": "MIT",
6574 - "dependencies": {
6575 - "semver": "^7.5.4"
6576 - },
6577 - "engines": {
6578 - "node": ">=12"
6579 - },
6580 - "peerDependencies": {
6581 - "eslint": ">=6.0.0"
6582 - }
6583 - },
6534 "node_modules/eslint-plugin-unicorn": {
6535 "version": "56.0.1",
6536 "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-56.0.1.tgz",
@@ -6632,9 +6582,9 @@
6582 }
6583 },
6584 "node_modules/eslint-plugin-vue": {
6635 - "version": "9.31.0",
6636 - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.31.0.tgz",
6637 - "integrity": "sha512-aYMUCgivhz1o4tLkRHj5oq9YgYPM4/EJc0M7TAKRLCUA5OYxRLAhYEVD2nLtTwLyixEFI+/QXSvKU9ESZFgqjQ==",
6585 + "version": "9.32.0",
6586 + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.32.0.tgz",
6587 + "integrity": "sha512-b/Y05HYmnB/32wqVcjxjHZzNpwxj1onBOvqW89W+V+XNG1dRuaFbNd3vT9CLbr2LXjEoq+3vn8DanWf7XU22Ug==",
6588 "dev": true,
6589 "license": "MIT",
6590 "dependencies": {
@@ -6684,14 +6634,14 @@
6634 }
6635 },
6636 "node_modules/eslint-plugin-yml": {
6687 - "version": "1.15.0",
6688 - "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.15.0.tgz",
6689 - "integrity": "sha512-leC8APYVOsKyWUlvRwVhewytK5wS70BfMqIaUplFstRfzCoVp0YoEroV4cUEvQrBj93tQ3M9LcjO/ewr6D4kjA==",
6637 + "version": "1.16.0",
6638 + "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.16.0.tgz",
6639 + "integrity": "sha512-t4MNCetPjTn18/fUDlQ/wKkcYjnuLYKChBrZ0qUaNqRigVqChHWzTP8SrfFi5s4keX3vdlkWRSu8zHJMdKwxWQ==",
6640 "dev": true,
6641 "license": "MIT",
6642 "dependencies": {
6643 "debug": "^4.3.2",
6694 - "eslint-compat-utils": "^0.5.0",
6644 + "eslint-compat-utils": "^0.6.0",
6645 "lodash": "^4.17.21",
6646 "natural-compare": "^1.4.0",
6647 "yaml-eslint-parser": "^1.2.1"
@@ -6706,22 +6656,6 @@
6656 "eslint": ">=6.0.0"
6657 }
6658 },
6709 - "node_modules/eslint-plugin-yml/node_modules/eslint-compat-utils": {
6710 - "version": "0.5.1",
6711 - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz",
6712 - "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==",
6713 - "dev": true,
6714 - "license": "MIT",
6715 - "dependencies": {
6716 - "semver": "^7.5.4"
6717 - },
6718 - "engines": {
6719 - "node": ">=12"
6720 - },
6721 - "peerDependencies": {
6722 - "eslint": ">=6.0.0"
6723 - }
6724 - },
6659 "node_modules/eslint-processor-vue-blocks": {
6660 "version": "0.1.2",
6661 "resolved": "https://registry.npmjs.org/eslint-processor-vue-blocks/-/eslint-processor-vue-blocks-0.1.2.tgz",
@@ -12617,9 +12551,9 @@
12551 "license": "MIT"
12552 },
12553 "node_modules/sass": {
12620 - "version": "1.82.0",
12621 - "resolved": "https://registry.npmjs.org/sass/-/sass-1.82.0.tgz",
12622 - "integrity": "sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q==",
12554 + "version": "1.83.0",
12555 + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz",
12556 + "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==",
12557 "dev": true,
12558 "license": "MIT",
12559 "dependencies": {
@@ -13920,9 +13854,9 @@
13854 }
13855 },
13856 "node_modules/type-fest": {
13923 - "version": "4.30.0",
13924 - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz",
13925 - "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==",
13857 + "version": "4.30.1",
13858 + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.1.tgz",
13859 + "integrity": "sha512-ojFL7eDMX2NF0xMbDwPZJ8sb7ckqtlAi1GsmgsFXvErT9kFTk1r0DuQKvrCh73M6D4nngeHJmvogF9OluXs7Hw==",
13860 "dev": true,
13861 "license": "(MIT OR CC0-1.0)",
13862 "engines": {
frontend/package.json
+3 -3
@@ -78,7 +78,7 @@
78 "@rollup/rollup-linux-x64-gnu": "^4.28.1"
79 },
80 "devDependencies": {
81 - "@antfu/eslint-config": "^3.11.2",
81 + "@antfu/eslint-config": "^3.12.0",
82 "@clack/prompts": "^0.8.2",
83 "@iconify/vue": "^4.2.0",
84 "@tsconfig/node20": "^20.1.4",
@@ -104,12 +104,12 @@
104 "postcss": "^8.4.49",
105 "prettier": "^3.4.2",
106 "prettier-plugin-tailwindcss": "^0.6.9",
107 - "sass": "^1.82.0",
107 + "sass": "^1.83.0",
108 "start-server-and-test": "^2.0.9",
109 "tailwind-config-viewer": "^2.0.4",
110 "tailwindcss": "^3.4.16",
111 "taze": "^0.18.0",
112 - "type-fest": "^4.30.0",
112 + "type-fest": "^4.30.1",
113 "typescript": "~5.6.3",
114 "unplugin-vue-components": "^0.27.5",
115 "vite": "^5.4.11",
frontend/src/api/endpoints/agents.ts
+3
@@ -31,6 +31,9 @@ export default {
31 syncAgents() {
32 return HttpClient.post<FlaskBaseResponse>(`/agents/sync`)
33 },
34 + syncVulnerabilities(customerCode: string) {
35 + return HttpClient.post<FlaskBaseResponse>(`/agents/sync/vulnerabilities/${customerCode}`)
36 + },
37 agentVulnerabilities(agentId: string, severity: VulnerabilitySeverityType, signal?: AbortSignal) {
38 return HttpClient.get<FlaskBaseResponse & { vulnerabilities: AgentVulnerabilities[] }>(
39 `/agents/${agentId}/vulnerabilities/${severity}`,
frontend/src/components/agents/AgentToolbar.vue
+99 -7
@@ -8,7 +8,17 @@
8 <Icon :name="SearchIcon" />
9 </template>
10 </n-input>
11 - <n-button :loading="syncing" @click="emit('sync')">Sync</n-button>
11 +
12 + <n-dropdown
13 + v-if="enableSyncVulnerabilitiesDropdown"
14 + placement="bottom-start"
15 + trigger="click"
16 + :options="customersOptions"
17 + @select="emit('run', $event)"
18 + >
19 + <n-button :loading="syncing" secondary @click="load()">Sync</n-button>
20 + </n-dropdown>
21 + <n-button v-else :loading="syncing" secondary @click="emit('run', 'sync-agents')">Sync</n-button>
22 </div>
23 <div class="search-info">
24 <strong v-if="agentsFilteredLength !== agentsLength">{{ agentsFilteredLength }}</strong>
@@ -60,13 +70,18 @@
70
71 <script setup lang="ts">
72 import type { Agent } from "@/types/agents.d"
73 +import type { Customer } from "@/types/customers.d"
74 +import type { DropdownMixedOption } from "naive-ui/es/dropdown/src/interface"
75 +import Api from "@/api"
76 import Icon from "@/components/common/Icon.vue"
64 -import { NButton, NCard, NInput, NScrollbar } from "naive-ui"
65 -import { computed, toRefs } from "vue"
77 +import { useWindowSize } from "@vueuse/core"
78 +import { NButton, NCard, NDropdown, NInput, NScrollbar, useMessage } from "naive-ui"
79 +import { computed, h, ref, toRefs } from "vue"
80
81 const props = defineProps<{
82 modelValue: string
83 syncing?: boolean
84 + enableSyncVulnerabilitiesDropdown?: boolean
85 agentsLength?: number
86 agentsFilteredLength?: number
87 agentsCritical?: Agent[]
@@ -74,15 +89,23 @@ const props = defineProps<{
89 }>()
90
91 const emit = defineEmits<{
77 - (e: "sync"): void
92 + (e: "run", value: "sync-agents" | `sync-vulnerabilities:${string}`): void
93 (e: "update:modelValue", value: string): void
94 (e: "click", value: Agent): void
95 }>()
96
82 -const SearchIcon = "carbon:search"
83 -
84 -const { modelValue, syncing, agentsLength, agentsFilteredLength, agentsCritical, agentsOnline } = toRefs(props)
97 +const {
98 + modelValue,
99 + syncing,
100 + agentsLength,
101 + agentsFilteredLength,
102 + agentsCritical,
103 + agentsOnline,
104 + enableSyncVulnerabilitiesDropdown
105 +} = toRefs(props)
106
107 +const SearchIcon = "carbon:search"
108 +const message = useMessage()
109 const textFilter = computed<string>({
110 get() {
111 return modelValue.value
@@ -91,6 +114,75 @@ const textFilter = computed<string>({
114 emit("update:modelValue", value)
115 }
116 })
117 +const loadingCustomersList = ref(false)
118 +const customersList = ref<Customer[]>([])
119 +const { width: winWidth } = useWindowSize()
120 +
121 +const customersOptions = computed(() => {
122 + const options: DropdownMixedOption[] = [
123 + {
124 + label: "Sync Agents",
125 + key: "sync-agents"
126 + }
127 + ]
128 +
129 + if (winWidth.value > 550) {
130 + options.push({
131 + label: `Sync Agent Vulnerabilities${loadingCustomersList.value ? "..." : ""}`,
132 + key: "sync-vulnerabilities",
133 + disabled: loadingCustomersList.value,
134 + children: loadingCustomersList.value
135 + ? undefined
136 + : [
137 + {
138 + label: () => h("div", { class: "pl-2" }, "Select a Customer"),
139 + type: "group",
140 + children: customersList.value.map(o => ({
141 + label: `#${o.customer_code} - ${o.customer_name}`,
142 + key: `sync-vulnerabilities:${o.customer_code}`
143 + }))
144 + }
145 + ]
146 + })
147 + } else {
148 + options.push({
149 + label: () => h("div", { class: "pl-2" }, "Select a Customer"),
150 + type: "group",
151 + children: customersList.value.map(o => ({
152 + label: `#${o.customer_code} - ${o.customer_name}`,
153 + key: `sync-vulnerabilities:${o.customer_code}`
154 + }))
155 + })
156 + }
157 +
158 + return options
159 +})
160 +
161 +function getCustomers() {
162 + loadingCustomersList.value = true
163 +
164 + Api.customers
165 + .getCustomers()
166 + .then(res => {
167 + if (res.data.success) {
168 + customersList.value = res.data?.customers || []
169 + } else {
170 + message.warning(res.data?.message || "An error occurred. Please try again later.")
171 + }
172 + })
173 + .catch(err => {
174 + message.error(err.response?.data?.message || "An error occurred. Please try again later.")
175 + })
176 + .finally(() => {
177 + loadingCustomersList.value = false
178 + })
179 +}
180 +
181 +function load() {
182 + if (!customersList.value.length) {
183 + getCustomers()
184 + }
185 +}
186 </script>
187
188 <style lang="scss" scoped>
frontend/src/components/incidentManagement/cases/CaseItem.vue
+5 -3
@@ -154,11 +154,13 @@
154 <n-collapse :trigger-areas="['main', 'arrow']">
155 <n-collapse-item name="alerts-list">
156 <template #header>
157 - Alerts
158 - <code class="ml-2">{{ caseEntity.alerts.length }}</code>
157 + <span class="whitespace-nowrap">
158 + Alerts
159 + <code class="ml-2">{{ caseEntity.alerts.length }}</code>
160 + </span>
161 </template>
162 <template #header-extra>
161 - <div class="actions-box ml-2 flex items-center gap-2">
163 + <div class="actions-box ml-2 flex flex-wrap items-center justify-end gap-2">
164 <n-button quaternary size="tiny" class="xs:!flex !hidden" @click="handleDelete()">
165 Delete Case
166 </n-button>
frontend/src/components/incidentManagement/cases/CasesExport.vue
+33 -10
@@ -12,13 +12,15 @@
12 <script setup lang="ts">
13 import type { Customer } from "@/types/customers.d"
14 import type { Size } from "naive-ui/es/button/src/interface"
15 +import type { DropdownMixedOption } from "naive-ui/es/dropdown/src/interface"
16 import Api from "@/api"
17 import Icon from "@/components/common/Icon.vue"
18 import { useSettingsStore } from "@/stores/settings"
19 import { formatDate } from "@/utils"
20 +import { useWindowSize } from "@vueuse/core"
21 import { saveAs } from "file-saver"
22 import { NButton, NDropdown, useMessage } from "naive-ui"
21 -import { computed, inject, ref, type Ref } from "vue"
23 +import { computed, h, inject, ref, type Ref } from "vue"
24
25 const { size, showIcon } = defineProps<{ size?: Size; showIcon?: boolean }>()
26
@@ -27,26 +29,47 @@ const loadingCustomersList = ref(false)
29 const dFormats = useSettingsStore().dateFormat
30 const exporting = ref(false)
31 const message = useMessage()
32 +const { width: winWidth } = useWindowSize()
33 const customersList = inject<Ref<Customer[]>>("customers-list", ref([]))
34
35 const customersOptions = computed(() => {
33 - return [
36 + const options: DropdownMixedOption[] = [
37 {
38 label: "Export All Cases",
39 key: "--all--"
37 - },
38 - {
40 + }
41 + ]
42 +
43 + if (winWidth.value > 550) {
44 + options.push({
45 label: `Export by Customer${loadingCustomersList.value ? "..." : ""}`,
46 key: "customer",
47 disabled: loadingCustomersList.value,
48 children: loadingCustomersList.value
49 ? undefined
44 - : customersList.value.map(o => ({
45 - label: `#${o.customer_code} - ${o.customer_name}`,
46 - key: o.customer_code
47 - }))
48 - }
49 - ]
50 + : [
51 + {
52 + label: () => h("div", { class: "pl-2" }, "Select a Customer"),
53 + type: "group",
54 + children: customersList.value.map(o => ({
55 + label: `#${o.customer_code} - ${o.customer_name}`,
56 + key: o.customer_code
57 + }))
58 + }
59 + ]
60 + })
61 + } else {
62 + options.push({
63 + label: () => h("div", { class: "pl-2" }, "Select a Customer"),
64 + type: "group",
65 + children: customersList.value.map(o => ({
66 + label: `#${o.customer_code} - ${o.customer_name}`,
67 + key: o.customer_code
68 + }))
69 + })
70 + }
71 +
72 + return options
73 })
74
75 function exportCases(key: string) {
frontend/src/components/users/UsersList.vue
+1 -1
@@ -28,7 +28,7 @@
28 <div v-if="isAdmin" class="flex justify-end">
29 <n-dropdown
30 trigger="hover"
31 - :options="options"
31 + :options
32 display-directive="show"
33 :keyboard="false"
34 @click="selectedUser = user.username"
frontend/src/stores/auth.ts
+1 -1
@@ -64,7 +64,7 @@ export const useAuthStore = defineStore("auth", {
64 return response.data
65 } catch (err) {
66 const error = err as ApiError
67 - return error.response?.data
67 + throw error.response?.data
68 }
69 },
70 getEmail() {
frontend/src/views/agents/Agents.vue
+35 -1
@@ -9,7 +9,7 @@
9 :agents-filtered-length="agentsFiltered.length"
10 :agents-critical="agentsCritical"
11 :agents-online="agentsOnline"
12 - @sync="syncAgents()"
12 + @run="runCommand($event)"
13 @click.stop="gotoAgent($event.agent_id)"
14 />
15 </div>
@@ -61,6 +61,7 @@ import AgentToolbar from "@/components/agents/AgentToolbar.vue"
61 import { useGoto } from "@/composables/useGoto"
62 import { type Agent, AgentStatus } from "@/types/agents.d"
63 import _debounce from "lodash/debounce"
64 +import _split from "lodash/split"
65 import { NEmpty, NPagination, NScrollbar, NSpin, useMessage } from "naive-ui"
66 import { computed, onBeforeMount, ref, watch } from "vue"
67
@@ -107,6 +108,14 @@ const agentsOnline = computed(() => {
108 return agents.value.filter(({ wazuh_agent_status }) => wazuh_agent_status === AgentStatus.Active)
109 })
110
111 +function runCommand(command: string) {
112 + if (command === "sync-agents") {
113 + syncAgents()
114 + } else if (_split(command, ":").length) {
115 + syncVulnerabilities(_split(command, ":")[1])
116 + }
117 +}
118 +
119 function getAgents() {
120 loadingAgents.value = true
121
@@ -152,6 +161,31 @@ function syncAgents() {
161 })
162 }
163
164 +function syncVulnerabilities(customerCode: string) {
165 + loadingSync.value = true
166 +
167 + Api.agents
168 + .syncVulnerabilities(customerCode)
169 + .then(res => {
170 + if (res.data.success) {
171 + message.success("Agent vulnerabilities synced successfully")
172 + getAgents()
173 + } else {
174 + message.error("An error occurred. Please try again later.")
175 + }
176 + })
177 + .catch(err => {
178 + if (err.response?.status === 401) {
179 + message.error(err.response?.data?.message || "Sync returned Unauthorized.")
180 + } else {
181 + message.error(err.response?.data?.message || "Failed to Sync Agents")
182 + }
183 + })
184 + .finally(() => {
185 + loadingSync.value = false
186 + })
187 +}
188 +
189 onBeforeMount(() => {
190 getAgents()
191 })