| 1 | import type { MenuMixedOption } from "naive-ui/es/menu/src/interface" |
| 2 | import { h } from "vue" |
| 3 | import { RouterLink } from "vue-router" |
| 4 | import IncidentManagementIcon from "@/assets/icons/alert-settings-icon.svg" |
| 5 | |
| 6 | import { renderIcon } from "@/utils" |
| 7 | |
| 8 | const OverviewIcon = "carbon:dashboard" |
| 9 | // const IndiciesIcon = "ph:list-magnifying-glass" |
| 10 | const AgentsIcon = "carbon:network-3" |
| 11 | // const ConnectorsIcon = "carbon:hybrid-networking" |
| 12 | const GraylogIcon = "majesticons:pulse-line" |
| 13 | const AlertsIcon = "carbon:warning-hex" |
| 14 | // const ArtifactsIcon = "carbon:document-multiple-01" |
| 15 | // const SocIcon = "carbon:security" |
| 16 | const HealthcheckIcon = "ph:heartbeat" |
| 17 | const CustomersIcon = "carbon:user-multiple" |
| 18 | // const ExternalServicesIcon = "carbon:ibm-cloud-direct-link-2-dedicated" |
| 19 | const ReportCreationIcon = "carbon:report-data" |
| 20 | // const SchedulerIcon = "material-symbols:autoplay" |
| 21 | // const CustomerPortalIcon = "streamline-ultimate:coding-apps-website-apps-browser" |
| 22 | const AiAnalystIcon = "carbon:machine-learning-model" |
| 23 | const DetectionCatalogIcon = "carbon:catalog" |
| 24 | const ToolsIcon = "carbon:tool-box" |
| 25 | // const EventSearchIcon = "carbon:search-locate" |
| 26 | |
| 27 | // TODO-FE: refactor |
| 28 | export default function getItems(): MenuMixedOption[] { |
| 29 | return [ |
| 30 | { |
| 31 | label: () => |
| 32 | h( |
| 33 | RouterLink, |
| 34 | { |
| 35 | to: { |
| 36 | name: "Overview" |
| 37 | } |
| 38 | }, |
| 39 | { default: () => "Overview" } |
| 40 | ), |
| 41 | key: "Overview", |
| 42 | icon: renderIcon(OverviewIcon) |
| 43 | }, |
| 44 | { |
| 45 | label: () => |
| 46 | h( |
| 47 | RouterLink, |
| 48 | { |
| 49 | to: { |
| 50 | name: "AiAnalyst" |
| 51 | } |
| 52 | }, |
| 53 | { default: () => "AI Analyst" } |
| 54 | ), |
| 55 | key: "AiAnalyst", |
| 56 | icon: renderIcon(AiAnalystIcon) |
| 57 | }, |
| 58 | { |
| 59 | label: () => |
| 60 | h( |
| 61 | RouterLink, |
| 62 | { |
| 63 | to: { |
| 64 | name: "DetectionCatalog" |
| 65 | } |
| 66 | }, |
| 67 | { default: () => "Detections Catalog" } |
| 68 | ), |
| 69 | key: "DetectionCatalog", |
| 70 | icon: renderIcon(DetectionCatalogIcon) |
| 71 | }, |
| 72 | { |
| 73 | label: () => |
| 74 | h( |
| 75 | RouterLink, |
| 76 | { |
| 77 | to: { |
| 78 | name: "Customers" |
| 79 | } |
| 80 | }, |
| 81 | { default: () => "Customers" } |
| 82 | ), |
| 83 | key: "Customers", |
| 84 | icon: renderIcon(CustomersIcon) |
| 85 | }, |
| 86 | { |
| 87 | label: "SIEM", |
| 88 | key: "SIEM", |
| 89 | icon: renderIcon(AlertsIcon), |
| 90 | children: [ |
| 91 | { |
| 92 | label: () => |
| 93 | h( |
| 94 | RouterLink, |
| 95 | { |
| 96 | to: { |
| 97 | name: "Alerts-SIEM" |
| 98 | } |
| 99 | }, |
| 100 | { default: () => "Alerts" } |
| 101 | ), |
| 102 | key: "Alerts-SIEM" |
| 103 | }, |
| 104 | { |
| 105 | label: () => |
| 106 | h( |
| 107 | RouterLink, |
| 108 | { |
| 109 | to: { |
| 110 | name: "EventSearch" |
| 111 | } |
| 112 | }, |
| 113 | { default: () => "Event Search" } |
| 114 | ), |
| 115 | key: "EventSearch" |
| 116 | }, |
| 117 | { |
| 118 | label: () => |
| 119 | h( |
| 120 | RouterLink, |
| 121 | { |
| 122 | to: { |
| 123 | name: "Dashboards" |
| 124 | } |
| 125 | }, |
| 126 | { default: () => "Dashboards" } |
| 127 | ), |
| 128 | key: "Dashboards" |
| 129 | }, |
| 130 | { |
| 131 | label: () => |
| 132 | h( |
| 133 | RouterLink, |
| 134 | { |
| 135 | to: { |
| 136 | name: "Alerts-Mitre" |
| 137 | } |
| 138 | }, |
| 139 | { default: () => "MITRE ATT&CK" } |
| 140 | ), |
| 141 | key: "Alerts-Mitre" |
| 142 | }, |
| 143 | { |
| 144 | label: () => |
| 145 | h( |
| 146 | RouterLink, |
| 147 | { |
| 148 | to: { |
| 149 | name: "Alerts-AtomicRedTeam" |
| 150 | } |
| 151 | }, |
| 152 | { default: () => "Atomic Red Team" } |
| 153 | ), |
| 154 | key: "Alerts-AtomicRedTeam" |
| 155 | } |
| 156 | ] |
| 157 | }, |
| 158 | { |
| 159 | label: "Incident Management", |
| 160 | key: "IncidentManagement", |
| 161 | icon: renderIcon(IncidentManagementIcon), |
| 162 | children: [ |
| 163 | { |
| 164 | label: () => |
| 165 | h( |
| 166 | RouterLink, |
| 167 | { |
| 168 | to: { |
| 169 | name: "IncidentManagement-Sources" |
| 170 | } |
| 171 | }, |
| 172 | { default: () => "Sources" } |
| 173 | ), |
| 174 | key: "IncidentManagement-Sources" |
| 175 | }, |
| 176 | { |
| 177 | label: () => |
| 178 | h( |
| 179 | RouterLink, |
| 180 | { |
| 181 | to: { |
| 182 | name: "IncidentManagement-Alerts" |
| 183 | } |
| 184 | }, |
| 185 | { default: () => "Alerts" } |
| 186 | ), |
| 187 | key: "IncidentManagement-Alerts" |
| 188 | }, |
| 189 | { |
| 190 | label: () => |
| 191 | h( |
| 192 | RouterLink, |
| 193 | { |
| 194 | to: { |
| 195 | name: "IncidentManagement-Cases" |
| 196 | } |
| 197 | }, |
| 198 | { default: () => "Cases" } |
| 199 | ), |
| 200 | key: "IncidentManagement-Cases" |
| 201 | }, |
| 202 | { |
| 203 | label: () => |
| 204 | h( |
| 205 | RouterLink, |
| 206 | { |
| 207 | to: { |
| 208 | name: "IncidentManagement-CaseTemplates" |
| 209 | } |
| 210 | }, |
| 211 | { default: () => "Case Templates" } |
| 212 | ), |
| 213 | key: "IncidentManagement-CaseTemplates" |
| 214 | } |
| 215 | /* |
| 216 | { |
| 217 | label: () => |
| 218 | h( |
| 219 | RouterLink, |
| 220 | { |
| 221 | to: { |
| 222 | name: "IncidentManagement-Sigma" |
| 223 | } |
| 224 | }, |
| 225 | { default: () => "SIGMA" } |
| 226 | ), |
| 227 | key: "IncidentManagement-Sigma" |
| 228 | } |
| 229 | */ |
| 230 | ] |
| 231 | }, |
| 232 | { |
| 233 | label: "Agents", |
| 234 | key: "Agents", |
| 235 | icon: renderIcon(AgentsIcon), |
| 236 | children: [ |
| 237 | { |
| 238 | label: () => |
| 239 | h( |
| 240 | RouterLink, |
| 241 | { |
| 242 | to: { |
| 243 | name: "Agents" |
| 244 | } |
| 245 | }, |
| 246 | { default: () => "Agents list" } |
| 247 | ), |
| 248 | key: "Agents" |
| 249 | }, |
| 250 | { |
| 251 | label: () => |
| 252 | h( |
| 253 | RouterLink, |
| 254 | { |
| 255 | to: { |
| 256 | name: "Artifacts" |
| 257 | } |
| 258 | }, |
| 259 | { default: () => "Artifacts" } |
| 260 | ), |
| 261 | key: "Artifacts" |
| 262 | }, |
| 263 | { |
| 264 | label: () => |
| 265 | h( |
| 266 | RouterLink, |
| 267 | { |
| 268 | to: { |
| 269 | name: "Groups" |
| 270 | } |
| 271 | }, |
| 272 | { default: () => "Groups" } |
| 273 | ), |
| 274 | key: "Groups" |
| 275 | }, |
| 276 | { |
| 277 | label: () => |
| 278 | h( |
| 279 | RouterLink, |
| 280 | { |
| 281 | to: { |
| 282 | name: "SysmonConfig" |
| 283 | } |
| 284 | }, |
| 285 | { default: () => "Sysmon Config" } |
| 286 | ), |
| 287 | key: "SysmonConfig" |
| 288 | }, |
| 289 | { |
| 290 | label: () => |
| 291 | h( |
| 292 | RouterLink, |
| 293 | { |
| 294 | to: { |
| 295 | name: "DetectionRules" |
| 296 | } |
| 297 | }, |
| 298 | { default: () => "Detection Rules" } |
| 299 | ), |
| 300 | key: "DetectionRules" |
| 301 | }, |
| 302 | { |
| 303 | label: () => |
| 304 | h( |
| 305 | RouterLink, |
| 306 | { |
| 307 | to: { |
| 308 | name: "CopilotActions" |
| 309 | } |
| 310 | }, |
| 311 | { default: () => "CoPilot Actions" } |
| 312 | ), |
| 313 | key: "CopilotActions" |
| 314 | }, |
| 315 | { |
| 316 | label: () => |
| 317 | h( |
| 318 | RouterLink, |
| 319 | { |
| 320 | to: { |
| 321 | name: "CopilotSearches" |
| 322 | } |
| 323 | }, |
| 324 | { default: () => "CoPilot Searches" } |
| 325 | ), |
| 326 | key: "CopilotSearches" |
| 327 | }, |
| 328 | { |
| 329 | label: () => |
| 330 | h( |
| 331 | RouterLink, |
| 332 | { |
| 333 | to: { |
| 334 | name: "VulnerabilityOverview" |
| 335 | } |
| 336 | }, |
| 337 | { default: () => "Vulnerability Overview" } |
| 338 | ), |
| 339 | key: "VulnerabilityOverview" |
| 340 | }, |
| 341 | { |
| 342 | label: () => |
| 343 | h( |
| 344 | RouterLink, |
| 345 | { |
| 346 | to: { |
| 347 | name: "PatchTuesday" |
| 348 | } |
| 349 | }, |
| 350 | { default: () => "Patch Tuesday" } |
| 351 | ), |
| 352 | key: "PatchTuesday" |
| 353 | }, |
| 354 | { |
| 355 | label: "Security Configuration Assessment", |
| 356 | key: "SCA", |
| 357 | children: [ |
| 358 | { |
| 359 | label: () => |
| 360 | h( |
| 361 | RouterLink, |
| 362 | { |
| 363 | to: { |
| 364 | name: "ScaOverview" |
| 365 | } |
| 366 | }, |
| 367 | { default: () => "SCA Overview" } |
| 368 | ), |
| 369 | key: "ScaOverview" |
| 370 | }, |
| 371 | { |
| 372 | label: () => |
| 373 | h( |
| 374 | RouterLink, |
| 375 | { |
| 376 | to: { |
| 377 | name: "ScaPolicies" |
| 378 | } |
| 379 | }, |
| 380 | { default: () => "SCA Policies" } |
| 381 | ), |
| 382 | key: "ScaPolicies" |
| 383 | } |
| 384 | ] |
| 385 | } |
| 386 | ] |
| 387 | }, |
| 388 | { |
| 389 | label: "Log Management", |
| 390 | key: "LogManagement", |
| 391 | icon: renderIcon(GraylogIcon), |
| 392 | children: [ |
| 393 | { |
| 394 | label: () => |
| 395 | h( |
| 396 | RouterLink, |
| 397 | { |
| 398 | to: { |
| 399 | name: "Indices" |
| 400 | } |
| 401 | }, |
| 402 | { default: () => "Index Management" } |
| 403 | ), |
| 404 | key: "Indices" |
| 405 | }, |
| 406 | { |
| 407 | label: () => |
| 408 | h( |
| 409 | RouterLink, |
| 410 | { |
| 411 | to: { |
| 412 | name: "Snapshots" |
| 413 | } |
| 414 | }, |
| 415 | { default: () => "Snapshot & Restore" } |
| 416 | ), |
| 417 | key: "Snapshots" |
| 418 | }, |
| 419 | { |
| 420 | label: () => |
| 421 | h( |
| 422 | RouterLink, |
| 423 | { |
| 424 | to: { |
| 425 | name: "Graylog-Management" |
| 426 | } |
| 427 | }, |
| 428 | { default: () => "Graylog Management" } |
| 429 | ), |
| 430 | key: "Graylog-Management" |
| 431 | }, |
| 432 | { |
| 433 | label: () => |
| 434 | h( |
| 435 | RouterLink, |
| 436 | { |
| 437 | to: { |
| 438 | name: "Graylog-Metrics" |
| 439 | } |
| 440 | }, |
| 441 | { default: () => "Graylog Metrics" } |
| 442 | ), |
| 443 | key: "Graylog-Metrics" |
| 444 | }, |
| 445 | { |
| 446 | label: () => |
| 447 | h( |
| 448 | RouterLink, |
| 449 | { |
| 450 | to: { |
| 451 | name: "Graylog-Pipelines" |
| 452 | } |
| 453 | }, |
| 454 | { default: () => "Graylog Pipelines" } |
| 455 | ), |
| 456 | key: "Graylog-Pipelines" |
| 457 | } |
| 458 | ] |
| 459 | }, |
| 460 | { |
| 461 | label: "Report Creation", |
| 462 | key: "ReportCreation", |
| 463 | icon: renderIcon(ReportCreationIcon), |
| 464 | children: [ |
| 465 | { |
| 466 | label: () => |
| 467 | h( |
| 468 | RouterLink, |
| 469 | { |
| 470 | to: { |
| 471 | name: "ReportCreation" |
| 472 | } |
| 473 | }, |
| 474 | { default: () => "General Reports" } |
| 475 | ), |
| 476 | key: "ReportCreation" |
| 477 | }, |
| 478 | { |
| 479 | label: () => |
| 480 | h( |
| 481 | RouterLink, |
| 482 | { |
| 483 | to: { |
| 484 | name: "VulnerabilityReports" |
| 485 | } |
| 486 | }, |
| 487 | { default: () => "Vulnerability Reports" } |
| 488 | ), |
| 489 | key: "VulnerabilityReports" |
| 490 | }, |
| 491 | { |
| 492 | label: () => |
| 493 | h( |
| 494 | RouterLink, |
| 495 | { |
| 496 | to: { |
| 497 | name: "SCAReports" |
| 498 | } |
| 499 | }, |
| 500 | { default: () => "SCA Reports" } |
| 501 | ), |
| 502 | key: "SCAReports" |
| 503 | } |
| 504 | ] |
| 505 | }, |
| 506 | { |
| 507 | label: "Healthcheck", |
| 508 | key: "HealthcheckMenu", |
| 509 | icon: renderIcon(HealthcheckIcon), |
| 510 | children: [ |
| 511 | { |
| 512 | label: () => |
| 513 | h( |
| 514 | RouterLink, |
| 515 | { |
| 516 | to: { |
| 517 | name: "Healthcheck" |
| 518 | } |
| 519 | }, |
| 520 | { default: () => "Healthcheck Alerts" } |
| 521 | ), |
| 522 | key: "Healthcheck" |
| 523 | }, |
| 524 | { |
| 525 | label: () => |
| 526 | h( |
| 527 | RouterLink, |
| 528 | { |
| 529 | to: { |
| 530 | name: "Metrics" |
| 531 | } |
| 532 | }, |
| 533 | { default: () => "Metrics Overview" } |
| 534 | ), |
| 535 | key: "Metrics" |
| 536 | } |
| 537 | ] |
| 538 | }, |
| 539 | { |
| 540 | label: "Tools", |
| 541 | key: "Tools", |
| 542 | icon: renderIcon(ToolsIcon), |
| 543 | children: [ |
| 544 | { |
| 545 | label: () => |
| 546 | h( |
| 547 | RouterLink, |
| 548 | { |
| 549 | to: { |
| 550 | name: "Connectors" |
| 551 | } |
| 552 | }, |
| 553 | { default: () => "Connectors" } |
| 554 | ), |
| 555 | key: "Connectors" |
| 556 | }, |
| 557 | { |
| 558 | label: "Stack Provisioning", |
| 559 | key: "Tools-StackProvisioning" |
| 560 | }, |
| 561 | { |
| 562 | label: () => |
| 563 | h( |
| 564 | RouterLink, |
| 565 | { |
| 566 | to: { |
| 567 | name: "CloudSecurityAssessment" |
| 568 | } |
| 569 | }, |
| 570 | { default: () => "Cloud Security Assessment" } |
| 571 | ), |
| 572 | key: "CloudSecurityAssessment" |
| 573 | }, |
| 574 | { |
| 575 | label: () => |
| 576 | h( |
| 577 | RouterLink, |
| 578 | { |
| 579 | to: { |
| 580 | name: "WebVulnerabilityAssessment" |
| 581 | } |
| 582 | }, |
| 583 | { default: () => "Web Vulnerability Assessment" } |
| 584 | ), |
| 585 | key: "WebVulnerabilityAssessment" |
| 586 | }, |
| 587 | { |
| 588 | label: () => |
| 589 | h( |
| 590 | RouterLink, |
| 591 | { |
| 592 | to: { |
| 593 | name: "GitHubAudit" |
| 594 | } |
| 595 | }, |
| 596 | { default: () => "GitHub Audit" } |
| 597 | ), |
| 598 | key: "GitHubAudit" |
| 599 | }, |
| 600 | { |
| 601 | label: "Active Response", |
| 602 | key: "Tools-ActiveResponse" |
| 603 | }, |
| 604 | { |
| 605 | label: "Threat Intel", |
| 606 | key: "Tools-ThreatIntel" |
| 607 | } |
| 608 | ] |
| 609 | } |
| 610 | ] |
| 611 | } |