File size: 44,162 Bytes
d35dfb6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI-Powered Vulnerability Management System</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.chat-container {
height: calc(100vh - 200px);
}
.vulnerability-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.severity-critical {
border-left: 4px solid #ef4444;
}
.severity-high {
border-left: 4px solid #f97316;
}
.severity-medium {
border-left: 4px solid #eab308;
}
.severity-low {
border-left: 4px solid #10b981;
}
.severity-info {
border-left: 4px solid #3b82f6;
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.dropdown-enter {
opacity: 0;
transform: translateY(-10px);
}
.dropdown-enter-active {
opacity: 1;
transform: translateY(0);
transition: opacity 150ms, transform 150ms;
}
.dropdown-exit {
opacity: 1;
}
.dropdown-exit-active {
opacity: 0;
transform: translateY(-10px);
transition: opacity 150ms, transform 150ms;
}
.input-menu {
display: none;
}
.input-menu.active {
display: flex;
}
</style>
</head>
<body class="bg-gray-50">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="hidden md:flex md:flex-shrink-0">
<div class="flex flex-col w-64 bg-indigo-700 text-white">
<div class="flex items-center justify-center h-16 px-4 bg-indigo-800">
<div class="flex items-center">
<i class="fas fa-shield-alt mr-2 text-xl"></i>
<span class="text-xl font-semibold">VulnAI</span>
</div>
</div>
<div class="flex flex-col flex-grow px-4 py-4 overflow-y-auto">
<div class="space-y-1">
<button class="flex items-center w-full px-4 py-2 text-sm font-medium text-white bg-indigo-800 rounded-md">
<i class="fas fa-home mr-3"></i>
Dashboard
</button>
<button class="flex items-center w-full px-4 py-2 text-sm font-medium text-indigo-200 hover:text-white hover:bg-indigo-600 rounded-md">
<i class="fas fa-bug mr-3"></i>
Vulnerabilities
</button>
<button class="flex items-center w-full px-4 py-2 text-sm font-medium text-indigo-200 hover:text-white hover:bg-indigo-600 rounded-md">
<i class="fas fa-server mr-3"></i>
Assets
</button>
<button class="flex items-center w-full px-4 py-2 text-sm font-medium text-indigo-200 hover:text-white hover:bg-indigo-600 rounded-md">
<i class="fas fa-chart-line mr-3"></i>
Reports
</button>
<button class="flex items-center w-full px-4 py-2 text-sm font-medium text-indigo-200 hover:text-white hover:bg-indigo-600 rounded-md">
<i class="fas fa-cog mr-3"></i>
Settings
</button>
</div>
<div class="mt-auto mb-4">
<div class="p-4 bg-indigo-800 rounded-lg">
<h3 class="text-sm font-medium">AI Assistant Tips</h3>
<p class="mt-1 text-xs text-indigo-200">Try asking: "Show me critical vulnerabilities from last week" or "What's the most common vulnerability type?"</p>
</div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex flex-col flex-1 overflow-hidden">
<!-- Top Navigation -->
<div class="flex items-center justify-between h-16 px-4 bg-white border-b">
<div class="flex items-center">
<button class="md:hidden p-2 text-gray-500 rounded-md hover:bg-gray-100">
<i class="fas fa-bars"></i>
</button>
<h1 class="ml-2 text-lg font-semibold text-gray-800">AI Vulnerability Assistant</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="p-2 text-gray-500 rounded-full hover:bg-gray-100">
<i class="fas fa-bell"></i>
<span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span>
</button>
</div>
<div class="flex items-center">
<img class="w-8 h-8 rounded-full" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User profile">
<span class="ml-2 text-sm font-medium text-gray-700">Admin</span>
</div>
</div>
</div>
<!-- Main Content Area -->
<div class="flex flex-1 overflow-hidden">
<!-- Vulnerability List -->
<div class="hidden lg:block w-1/3 bg-white border-r overflow-y-auto">
<div class="p-4 border-b">
<div class="flex justify-between items-center">
<h2 class="text-lg font-semibold">Recent Vulnerabilities</h2>
<button class="text-sm text-indigo-600 hover:text-indigo-800">View All</button>
</div>
<div class="mt-3 relative">
<input type="text" placeholder="Search vulnerabilities..." class="w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500">
<i class="fas fa-search absolute right-3 top-2.5 text-gray-400"></i>
</div>
<div class="mt-3 flex space-x-2">
<span class="px-2 py-1 text-xs font-medium bg-red-100 text-red-800 rounded-full">Critical: 12</span>
<span class="px-2 py-1 text-xs font-medium bg-orange-100 text-orange-800 rounded-full">High: 24</span>
<span class="px-2 py-1 text-xs font-medium bg-yellow-100 text-yellow-800 rounded-full">Medium: 45</span>
</div>
</div>
<!-- Vulnerability Cards -->
<div class="divide-y">
<div class="p-4 vulnerability-card severity-critical cursor-pointer hover:bg-gray-50 transition-all duration-200 relative">
<div class="flex justify-between">
<h3 class="font-medium">CVE-2023-32456</h3>
<span class="text-xs font-semibold px-2 py-1 bg-red-100 text-red-800 rounded-full">Critical</span>
</div>
<p class="mt-1 text-sm text-gray-600">Remote Code Execution in Apache Log4j</p>
<div class="mt-2 flex items-center text-xs text-gray-500">
<i class="fas fa-calendar-alt mr-1"></i>
<span>Discovered: 2 days ago</span>
<i class="fas fa-server ml-3 mr-1"></i>
<span>12 assets affected</span>
</div>
<div class="absolute right-2 top-2">
<button class="vuln-action-btn p-1 text-gray-400 hover:text-gray-600 rounded-full hover:bg-gray-200">
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="vuln-dropdown hidden absolute right-0 mt-1 w-48 bg-white rounded-md shadow-lg z-10 border">
<div class="py-1">
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="analyze" data-cve="CVE-2023-32456">
<i class="fas fa-search mr-2"></i> Analyze impact
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="remediate" data-cve="CVE-2023-32456">
<i class="fas fa-wrench mr-2"></i> Remediation plan
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="assets" data-cve="CVE-2023-32456">
<i class="fas fa-server mr-2"></i> Affected assets
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="report" data-cve="CVE-2023-32456">
<i class="fas fa-file-alt mr-2"></i> Generate report
</button>
</div>
</div>
</div>
</div>
<div class="p-4 vulnerability-card severity-high cursor-pointer hover:bg-gray-50 transition-all duration-200 relative">
<div class="flex justify-between">
<h3 class="font-medium">CVE-2023-28771</h3>
<span class="text-xs font-semibold px-2 py-1 bg-orange-100 text-orange-800 rounded-full">High</span>
</div>
<p class="mt-1 text-sm text-gray-600">Privilege Escalation in Windows Kernel</p>
<div class="mt-2 flex items-center text-xs text-gray-500">
<i class="fas fa-calendar-alt mr-1"></i>
<span>Discovered: 1 week ago</span>
<i class="fas fa-server ml-3 mr-1"></i>
<span>8 assets affected</span>
</div>
<div class="absolute right-2 top-2">
<button class="vuln-action-btn p-1 text-gray-400 hover:text-gray-600 rounded-full hover:bg-gray-200">
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="vuln-dropdown hidden absolute right-0 mt-1 w-48 bg-white rounded-md shadow-lg z-10 border">
<div class="py-1">
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="analyze" data-cve="CVE-2023-28771">
<i class="fas fa-search mr-2"></i> Analyze impact
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="remediate" data-cve="CVE-2023-28771">
<i class="fas fa-wrench mr-2"></i> Remediation plan
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="assets" data-cve="CVE-2023-28771">
<i class="fas fa-server mr-2"></i> Affected assets
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="report" data-cve="CVE-2023-28771">
<i class="fas fa-file-alt mr-2"></i> Generate report
</button>
</div>
</div>
</div>
</div>
<div class="p-4 vulnerability-card severity-medium cursor-pointer hover:bg-gray-50 transition-all duration-200 relative">
<div class="flex justify-between">
<h3 class="font-medium">CVE-2023-21554</h3>
<span class="text-xs font-semibold px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full">Medium</span>
</div>
<p class="mt-1 text-sm text-gray-600">Cross-Site Scripting in WordPress Core</p>
<div class="mt-2 flex items-center text-xs text-gray-500">
<i class="fas fa-calendar-alt mr-1"></i>
<span>Discovered: 3 days ago</span>
<i class="fas fa-server ml-3 mr-1"></i>
<span>5 assets affected</span>
</div>
<div class="absolute right-2 top-2">
<button class="vuln-action-btn p-1 text-gray-400 hover:text-gray-600 rounded-full hover:bg-gray-200">
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="vuln-dropdown hidden absolute right-0 mt-1 w-48 bg-white rounded-md shadow-lg z-10 border">
<div class="py-1">
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="analyze" data-cve="CVE-2023-21554">
<i class="fas fa-search mr-2"></i> Analyze impact
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="remediate" data-cve="CVE-2023-21554">
<i class="fas fa-wrench mr-2"></i> Remediation plan
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="assets" data-cve="CVE-2023-21554">
<i class="fas fa-server mr-2"></i> Affected assets
</button>
<button class="dropdown-item px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left flex items-center" data-action="report" data-cve="CVE-2023-21554">
<i class="fas fa-file-alt mr-2"></i> Generate report
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- AI Chat Interface -->
<div class="flex-1 flex flex-col bg-gray-50">
<div class="p-4 border-b bg-white">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="ml-3">
<h3 class="font-medium">Vulnerability AI Assistant</h3>
<p class="text-xs text-gray-500">Powered by VulnDB analytics</p>
</div>
</div>
</div>
<div class="chat-container overflow-y-auto p-4 space-y-4">
<!-- AI Welcome Message -->
<div class="flex">
<div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center flex-shrink-0">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="ml-3">
<div class="bg-white p-3 rounded-lg shadow-sm max-w-3xl">
<p>Hello! I'm your AI assistant for vulnerability management. I can help you:</p>
<ul class="mt-2 list-disc list-inside text-sm">
<li>Analyze vulnerability trends in your systems</li>
<li>Prioritize remediation efforts</li>
<li>Generate reports and insights</li>
<li>Answer questions about specific CVEs</li>
</ul>
<p class="mt-2">How can I assist you today?</p>
</div>
<div class="mt-2 flex space-x-2">
<button class="text-xs px-2 py-1 bg-indigo-50 text-indigo-600 rounded-full hover:bg-indigo-100">Show critical vulns</button>
<button class="text-xs px-2 py-1 bg-indigo-50 text-indigo-600 rounded-full hover:bg-indigo-100">Recent exploits</button>
<button class="text-xs px-2 py-1 bg-indigo-50 text-indigo-600 rounded-full hover:bg-indigo-100">Remediation tips</button>
</div>
</div>
</div>
<!-- User Message -->
<div class="flex justify-end">
<div class="bg-indigo-600 text-white p-3 rounded-lg shadow-sm max-w-3xl">
<p>Show me the most critical vulnerabilities from the last week</p>
</div>
</div>
<!-- AI Response -->
<div class="flex">
<div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center flex-shrink-0">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="ml-3">
<div class="bg-white p-3 rounded-lg shadow-sm max-w-3xl">
<p>Here are the most critical vulnerabilities discovered in your systems in the past 7 days:</p>
<div class="mt-3 space-y-2">
<div class="p-2 border rounded-md">
<div class="flex items-center">
<span class="w-3 h-3 bg-red-500 rounded-full mr-2"></span>
<strong>CVE-2023-32456</strong>
<span class="ml-auto text-xs bg-red-100 text-red-800 px-2 py-0.5 rounded-full">CVSS: 9.8</span>
</div>
<p class="text-sm mt-1">Apache Log4j Remote Code Execution - affects 12 servers</p>
<div class="mt-1 flex text-xs text-gray-500">
<span class="mr-3"><i class="fas fa-calendar-alt mr-1"></i> 2 days ago</span>
<span><i class="fas fa-exclamation-triangle mr-1"></i> Public exploit available</span>
</div>
</div>
<div class="p-2 border rounded-md">
<div class="flex items-center">
<span class="w-3 h-3 bg-red-500 rounded-full mr-2"></span>
<strong>CVE-2023-28771</strong>
<span class="ml-auto text-xs bg-red-100 text-red-800 px-2 py-0.5 rounded-full">CVSS: 8.8</span>
</div>
<p class="text-sm mt-1">Windows Kernel Privilege Escalation - affects 8 workstations</p>
<div class="mt-1 flex text-xs text-gray-500">
<span class="mr-3"><i class="fas fa-calendar-alt mr-1"></i> 5 days ago</span>
<span><i class="fas fa-exclamation-triangle mr-1"></i> No known exploit</span>
</div>
</div>
</div>
<div class="mt-3 p-2 bg-blue-50 rounded-md">
<p class="text-sm font-medium text-blue-800"><i class="fas fa-lightbulb mr-1"></i> Recommendation:</p>
<p class="text-sm mt-1">Prioritize patching CVE-2023-32456 first due to active exploitation in the wild. I can help generate a remediation plan if you'd like.</p>
</div>
</div>
<div class="mt-2 flex space-x-2">
<button class="text-xs px-2 py-1 bg-indigo-50 text-indigo-600 rounded-full hover:bg-indigo-100">
<i class="fas fa-file-alt mr-1"></i> Generate report
</button>
<button class="text-xs px-2 py-1 bg-indigo-50 text-indigo-600 rounded-full hover:bg-indigo-100">
<i class="fas fa-tasks mr-1"></i> Remediation plan
</button>
<button class="text-xs px-2 py-1 bg-indigo-50 text-indigo-600 rounded-full hover:bg-indigo-100">
<i class="fas fa-chart-pie mr-1"></i> Show trends
</button>
</div>
</div>
</div>
</div>
<!-- Input Area -->
<div class="p-4 border-t bg-white">
<!-- Telegram-like input menu -->
<div class="input-menu mb-2 flex space-x-2 overflow-x-auto">
<button class="menu-btn px-3 py-1 bg-indigo-50 text-indigo-600 rounded-full text-sm flex items-center" data-command="/analyze">
<i class="fas fa-search mr-1"></i> Analyze
</button>
<button class="menu-btn px-3 py-1 bg-indigo-50 text-indigo-600 rounded-full text-sm flex items-center" data-command="/remediate">
<i class="fas fa-wrench mr-1"></i> Remediate
</button>
<button class="menu-btn px-3 py-1 bg-indigo-50 text-indigo-600 rounded-full text-sm flex items-center" data-command="/assets">
<i class="fas fa-server mr-1"></i> Affected Assets
</button>
<button class="menu-btn px-3 py-1 bg-indigo-50 text-indigo-600 rounded-full text-sm flex items-center" data-command="/report">
<i class="fas fa-file-alt mr-1"></i> Generate Report
</button>
<button class="menu-btn px-3 py-1 bg-indigo-50 text-indigo-600 rounded-full text-sm flex items-center" data-command="/trends">
<i class="fas fa-chart-line mr-1"></i> View Trends
</button>
</div>
<div class="relative">
<button id="menuToggle" class="absolute left-2 top-3 text-gray-500 hover:text-gray-700">
<i class="fas fa-plus-circle"></i>
</button>
<textarea id="messageInput" rows="1" placeholder="Ask about vulnerabilities, remediation, or trends..." class="w-full px-10 py-3 pr-12 border rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500 resize-none"></textarea>
<div class="absolute right-3 bottom-3 flex space-x-2">
<button class="p-1 text-gray-500 hover:text-gray-700">
<i class="fas fa-paperclip"></i>
</button>
<button id="sendButton" class="p-1 text-indigo-600 hover:text-indigo-800">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
<div class="mt-2 text-xs text-gray-500">
<p>Try: "What vulnerabilities affect our web servers?" or "Show me unpatched critical vulnerabilities"</p>
</div>
</div>
</div>
<!-- Right Panel - Vulnerability Details -->
<div class="hidden xl:block w-1/3 bg-white border-l overflow-y-auto">
<div class="p-4 border-b">
<h2 class="text-lg font-semibold">Vulnerability Details</h2>
<p class="text-sm text-gray-500">Select a vulnerability to view detailed information</p>
</div>
<div class="p-4">
<div class="bg-gray-50 rounded-lg p-4 border">
<div class="flex justify-between items-start">
<div>
<h3 class="font-bold text-lg">CVE-2023-32456</h3>
<span class="text-sm font-medium px-2 py-0.5 bg-red-100 text-red-800 rounded-full">Critical</span>
</div>
<span class="text-2xl font-bold text-red-600">9.8</span>
</div>
<p class="mt-2 text-sm">Apache Log4j Remote Code Execution Vulnerability</p>
<div class="mt-4 space-y-3">
<div>
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Description</h4>
<p class="mt-1 text-sm">A remote code execution vulnerability exists in Apache Log4j when attackers can manipulate log messages or log message parameters. Successful exploitation can lead to complete system compromise.</p>
</div>
<div>
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Affected Systems</h4>
<div class="mt-1 flex flex-wrap gap-1">
<span class="text-xs px-2 py-0.5 bg-gray-100 rounded-full">Apache Log4j 2.0-beta9 to 2.14.1</span>
</div>
</div>
<div>
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Impact</h4>
<div class="mt-1 flex space-x-2">
<span class="flex items-center text-xs text-red-600">
<i class="fas fa-exclamation-circle mr-1"></i> Remote Code Execution
</span>
<span class="flex items-center text-xs text-red-600">
<i class="fas fa-user-shield mr-1"></i> Privilege Escalation
</span>
</div>
</div>
<div>
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">Remediation</h4>
<p class="mt-1 text-sm">Upgrade to Log4j 2.15.0 or later. If immediate patching isn't possible, implement the following mitigations:</p>
<ul class="mt-1 ml-4 list-disc text-sm">
<li>Set system property "log4j2.formatMsgNoLookups" to "true"</li>
<li>Remove JndiLookup class from the classpath</li>
<li>Apply network segmentation controls</li>
</ul>
</div>
<div>
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider">References</h4>
<div class="mt-1 space-y-1">
<a href="#" class="flex items-center text-sm text-blue-600 hover:underline">
<i class="fas fa-external-link-alt mr-2 text-xs"></i> NVD Details
</a>
<a href="#" class="flex items-center text-sm text-blue-600 hover:underline">
<i class="fas fa-external-link-alt mr-2 text-xs"></i> Apache Security Bulletin
</a>
<a href="#" class="flex items-center text-sm text-blue-600 hover:underline">
<i class="fas fa-external-link-alt mr-2 text-xs"></i> CISA Advisory
</a>
</div>
</div>
</div>
<div class="mt-6 pt-4 border-t">
<button class="w-full py-2 px-4 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 text-sm font-medium">
<i class="fas fa-tasks mr-2"></i> Create Remediation Ticket
</button>
<button class="w-full mt-2 py-2 px-4 border border-indigo-600 text-indigo-600 rounded-md hover:bg-indigo-50 text-sm font-medium">
<i class="fas fa-file-export mr-2"></i> Export Details
</button>
</div>
</div>
<div class="mt-6">
<h4 class="text-sm font-semibold">Affected Assets (12)</h4>
<div class="mt-2 space-y-2">
<div class="flex items-center p-2 border rounded-md hover:bg-gray-50">
<div class="w-8 h-8 rounded-full bg-red-100 flex items-center justify-center">
<i class="fas fa-server text-red-600"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">web-prod-01</p>
<p class="text-xs text-gray-500">Production Web Server</p>
</div>
<div class="ml-auto text-xs text-red-600">
<i class="fas fa-exclamation-circle"></i> Unpatched
</div>
</div>
<div class="flex items-center p-2 border rounded-md hover:bg-gray-50">
<div class="w-8 h-8 rounded-full bg-orange-100 flex items-center justify-center">
<i class="fas fa-server text-orange-600"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">app-staging-02</p>
<p class="text-xs text-gray-500">Staging Environment</p>
</div>
<div class="ml-auto text-xs text-orange-600">
<i class="fas fa-clock"></i> Patch scheduled
</div>
</div>
<div class="flex items-center p-2 border rounded-md hover:bg-gray-50">
<div class="w-8 h-8 rounded-full bg-green-100 flex items-center justify-center">
<i class="fas fa-server text-green-600"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">db-backup-01</p>
<p class="text-xs text-gray-500">Backup Database</p>
</div>
<div class="ml-auto text-xs text-green-600">
<i class="fas fa-check-circle"></i> Mitigated
</div>
</div>
</div>
<button class="mt-2 text-xs text-indigo-600 hover:text-indigo-800">View all affected assets</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const messageInput = document.getElementById('messageInput');
const sendButton = document.getElementById('sendButton');
const menuToggle = document.getElementById('menuToggle');
const inputMenu = document.querySelector('.input-menu');
const menuButtons = document.querySelectorAll('.menu-btn');
// Toggle input menu visibility
menuToggle.addEventListener('click', function() {
inputMenu.classList.toggle('active');
});
// Handle menu button clicks
menuButtons.forEach(button => {
button.addEventListener('click', function() {
const command = this.getAttribute('data-command');
messageInput.value = command + ' ';
messageInput.focus();
inputMenu.classList.remove('active');
});
});
// Auto-resize textarea
messageInput.addEventListener('input', function() {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});
// Send message on Enter (but allow Shift+Enter for new lines)
messageInput.addEventListener('keydown', function(e) {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
sendMessage();
}
});
// Send message on button click
sendButton.addEventListener('click', sendMessage);
// Handle vulnerability dropdown actions
const vulnActionButtons = document.querySelectorAll('.vuln-action-btn');
vulnActionButtons.forEach(button => {
button.addEventListener('click', function(e) {
e.stopPropagation();
const dropdown = this.nextElementSibling;
// Close all other dropdowns
document.querySelectorAll('.vuln-dropdown').forEach(d => {
if (d !== dropdown) d.classList.add('hidden');
});
// Toggle current dropdown
dropdown.classList.toggle('hidden');
});
});
// Handle dropdown item clicks
const dropdownItems = document.querySelectorAll('.dropdown-item');
dropdownItems.forEach(item => {
item.addEventListener('click', function() {
const action = this.getAttribute('data-action');
const cve = this.getAttribute('data-cve');
let message = '';
switch(action) {
case 'analyze':
message = `Analyze the impact of ${cve}`;
break;
case 'remediate':
message = `Show remediation plan for ${cve}`;
break;
case 'assets':
message = `List assets affected by ${cve}`;
break;
case 'report':
message = `Generate report for ${cve}`;
break;
}
// Add to chat
addUserMessage(message);
// Simulate AI response
setTimeout(() => {
addAiResponse(`I'm analyzing ${cve} for you. Here's what I found...`);
}, 1000);
// Close dropdown
this.closest('.vuln-dropdown').classList.add('hidden');
});
});
// Close dropdowns when clicking elsewhere
document.addEventListener('click', function() {
document.querySelectorAll('.vuln-dropdown').forEach(d => {
d.classList.add('hidden');
});
});
function sendMessage() {
const message = messageInput.value.trim();
if (message) {
// In a real app, this would send to your backend/AI service
console.log('Message sent:', message);
// Clear input
messageInput.value = '';
messageInput.style.height = 'auto';
// Add user message to chat
addUserMessage(message);
// Simulate AI response
setTimeout(() => {
addAiResponse("I've analyzed your request. Here's what I found in our vulnerability database...");
}, 1000);
}
}
function addUserMessage(text) {
const chatContainer = document.querySelector('.chat-container');
const messageDiv = document.createElement('div');
messageDiv.className = 'flex justify-end';
messageDiv.innerHTML = `
<div class="bg-indigo-600 text-white p-3 rounded-lg shadow-sm max-w-3xl">
<p>${text}</p>
</div>
`;
chatContainer.appendChild(messageDiv);
chatContainer.scrollTop = chatContainer.scrollHeight;
}
function addAiResponse(text) {
const chatContainer = document.querySelector('.chat-container');
const messageDiv = document.createElement('div');
messageDiv.className = 'flex';
messageDiv.innerHTML = `
<div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center flex-shrink-0">
<i class="fas fa-robot text-indigo-600"></i>
</div>
<div class="ml-3">
<div class="bg-white p-3 rounded-lg shadow-sm max-w-3xl">
<p>${text}</p>
</div>
</div>
`;
chatContainer.appendChild(messageDiv);
chatContainer.scrollTop = chatContainer.scrollHeight;
}
// Simulate clicking on vulnerability cards
const vulnCards = document.querySelectorAll('.vulnerability-card');
vulnCards.forEach(card => {
card.addEventListener('click', function() {
// In a real app, this would fetch detailed info from your backend
console.log('Vulnerability selected:', this.querySelector('h3').textContent);
});
});
});
</script>
</body>
</html> |