Press n or j to go to the next uncovered block, b, p or k for the previous block.
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 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 54x 54x 24x 24x 1x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 54x 54x 52x 29x 29x 29x 29x 29x 29x 52x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 52x 52x 52x 29x 52x 29x 29x 29x 29x 29x 29x 29x 29x 29x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 302x 302x 120x 120x 182x 182x 119x 182x 63x 63x 302x 54x 54x 54x 54x 54x 54x 54x 54x 54x 2x 2x 2x 2x 2x 2x 2x 12x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 54x 54x 54x 54x 302x 302x 302x 302x 302x 302x 302x 302x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 54x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 54x 54x 54x 31x 30x 30x 30x 30x 30x 30x 30x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 120x 30x 30x 30x 54x 31x 31x 31x 31x 31x 31x 31x 31x 31x 31x 119x 119x 119x 119x 1x 118x 119x 119x 119x 119x 119x 119x 119x 119x 119x 119x 119x 119x 119x 119x 119x 31x 31x 31x 54x 31x 31x 31x 31x 31x 31x 31x 31x 31x 63x 63x 63x 63x 1x 62x 63x 63x 63x 63x 63x 63x 63x 63x 63x 63x 63x 63x 63x 63x 63x 31x 31x 31x 54x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 6x 6x 6x 2x 4x 2x 2x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 5x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 2x 2x 2x 2x 2x 2x 2x 2x 4x 4x 4x 4x 2x 2x 2x 2x 2x 2x 2x 2x 2x 4x 2x 2x 2x 2x 2x 2x 54x 54x 54x 54x 54x 54x 54x 54x 54x 31x 1x 1x 1x 1x 1x 1x 1x 30x 30x 30x 30x 30x 30x 30x 30x 23x 23x 23x 23x 23x 23x 23x 23x 54x 54x 54x 54x 54x 12x 12x 12x 12x 12x 12x 12x 12x 12x 12x 1x | import React, { useCallback, useMemo, useState } from "react"; import { WIDGET_ICONS, WIDGET_TITLES } from "../../../constants/appConstants"; import { COMPLIANCE_TEST_IDS } from "../../../constants/testIds"; import { SECURITY_ICONS } from "../../../constants/uiConstants"; import { useComplianceService } from "../../../hooks/useComplianceService"; import { CIAComponent, SecurityLevel } from "../../../types/cia"; import { StatusType } from "../../../types/common/StatusTypes"; import { ComplianceStatusDetails } from "../../../types/compliance"; import { isNullish } from "../../../utils/typeGuards"; import StatusBadge from "../../common/StatusBadge"; import WidgetContainer from "../../common/WidgetContainer"; /** * Props for StatusBadge subcomponent */ interface StatusBadgeProps { status: StatusType; children: React.ReactNode; testId?: string; } // Add function to determine badge status with proper typing const getBadgeStatus = (complianceScore: number): StatusType => { if (complianceScore >= 80) return "success"; if (complianceScore >= 50) return "warning"; return "error"; }; /** * Props for ComplianceStatusWidget component */ export interface ComplianceStatusWidgetProps { /** * Selected availability level */ availabilityLevel: SecurityLevel; /** * Selected integrity level */ integrityLevel: SecurityLevel; /** * Selected confidentiality level */ confidentialityLevel: SecurityLevel; /** * Optional industry for compliance context */ industry?: string; /** * Optional region for compliance context */ region?: string; /** * Optional CSS class name */ className?: string; /** * Optional test ID for automated testing */ testId?: string; } // Add this interface to define the structure of a gap in gap analysis interface ComplianceGap { framework: string; frameworkDescription: string; components: { availability: { current: SecurityLevel; required: SecurityLevel; gap: number; }; integrity: { current: SecurityLevel; required: SecurityLevel; gap: number; }; confidentiality: { current: SecurityLevel; required: SecurityLevel; gap: number; }; }; recommendations: string[]; } /** * ComplianceStatusWidget displays status of compliance with various frameworks * * ## Business Perspective * * This widget helps executives and compliance officers understand how their * security controls align with regulatory requirements and industry standards. * It helps organizations identify compliance gaps and prioritize security * investments to meet their regulatory obligations. 📋 */ const ComplianceStatusWidget: React.FC<ComplianceStatusWidgetProps> = ({ availabilityLevel, integrityLevel, confidentialityLevel, industry, region, className = "", testId = COMPLIANCE_TEST_IDS.WIDGET, }) => { // Use the compliance service const { complianceService, error: serviceError, isLoading, } = useComplianceService(); // Active framework for detailed view const [activeFramework, setActiveFramework] = useState<string | null>(null); // Calculate overall security level with proper type safety const overallSecurityLevel = useMemo(() => { // Convert security levels to numeric values const levelValues: Record<SecurityLevel, number> = { None: 0, Low: 1, Moderate: 2, High: 3, "Very High": 4, }; // Calculate the minimum security level as the overall level const minValue = Math.min( levelValues[availabilityLevel], levelValues[integrityLevel], levelValues[confidentialityLevel] ); // Map numeric value back to SecurityLevel using a type-safe approach const levels: SecurityLevel[] = [ "None", "Low", "Moderate", "High", "Very High", ]; return levels.find((_, index) => index === minValue) || "Moderate"; }, [availabilityLevel, integrityLevel, confidentialityLevel]); // Get compliance status with proper error handling const complianceStatus = useMemo((): ComplianceStatusDetails | null => { if (isLoading || serviceError || !complianceService) return null; try { // Use industry and region context when appropriate return complianceService.getComplianceStatus( availabilityLevel, integrityLevel, confidentialityLevel ); } catch (err) { console.error("Error getting compliance status:", err); return null; } }, [ complianceService, availabilityLevel, integrityLevel, confidentialityLevel, industry, // Keep this dependency for potential future implementation region, // Keep this dependency for potential future implementation isLoading, serviceError, ]); // Get status text for display with proper error handling const getComplianceStatusText = useCallback((): string => { if (isLoading) return "Loading compliance status..."; if (serviceError) return "Error loading compliance status"; if (!complianceStatus) return "Unable to determine compliance status"; try { if (complianceService?.getComplianceStatusText) { const statusText = complianceService.getComplianceStatusText( availabilityLevel, integrityLevel, confidentialityLevel ); if (!isNullish(statusText)) { return statusText; } } // Fallback if service doesn't provide status text if (complianceStatus.status) { return complianceStatus.status; } // Final fallback return `Based on ${overallSecurityLevel} security level`; } catch (err) { console.error("Error getting compliance status text:", err); return "Unable to determine compliance status"; } }, [ complianceService, complianceStatus, availabilityLevel, integrityLevel, confidentialityLevel, overallSecurityLevel, isLoading, serviceError, ]); // Define a single helper function for framework status badges const getFrameworkStatusBadge = useCallback( (framework: string): StatusType => { if (!complianceStatus) return "neutral"; if (complianceStatus.compliantFrameworks.includes(framework)) { return "success"; } else if ( complianceStatus.partiallyCompliantFrameworks.includes(framework) ) { return "warning"; } else { return "error"; } }, [complianceStatus] ); // Get status text const statusText = useMemo( () => getComplianceStatusText(), [getComplianceStatusText] ); // Define gapAnalysis variable const gapAnalysis = useMemo(() => { if (isLoading || serviceError || !complianceService || !activeFramework) return null; try { return complianceService.getComplianceGapAnalysis( availabilityLevel, integrityLevel, confidentialityLevel, activeFramework ); } catch (err) { console.error("Error getting gap analysis:", err); return null; } }, [ complianceService, activeFramework, availabilityLevel, integrityLevel, confidentialityLevel, isLoading, serviceError, ]); // Create a type-safe implementation of getFrameworkRequiredLevel const getFrameworkRequiredLevel = useCallback( (framework: string, component: CIAComponent): SecurityLevel => { // If the service is available, use it if (complianceService?.getFrameworkRequiredLevel) { try { return complianceService.getFrameworkRequiredLevel( framework, component ); } catch (err) { console.error(`Error getting required level for ${framework}:`, err); } } // Default fallback levels based on typical requirements const defaultLevels: Record< string, Record<CIAComponent, SecurityLevel> > = { "PCI DSS": { availability: "High", integrity: "High", confidentiality: "High", }, HIPAA: { availability: "High", integrity: "High", confidentiality: "High", }, GDPR: { availability: "Moderate", integrity: "High", confidentiality: "High", }, "ISO 27001": { availability: "Moderate", integrity: "Moderate", confidentiality: "Moderate", }, "SOC 2": { availability: "Moderate", integrity: "Moderate", confidentiality: "Moderate", }, }; // Return the default if available, otherwise return Moderate as a safe fallback return defaultLevels[framework]?.[component] || "Moderate"; }, [complianceService] ); // Get framework description with error handling const getFrameworkDescription = useCallback( (framework: string): string => { if (!complianceService) return `${framework} requirements`; try { if (typeof complianceService.getFrameworkDescription === "function") { const description = complianceService.getFrameworkDescription(framework); return description || `${framework} requirements`; } return `${framework} requirements`; } catch (err) { console.error(`Error getting description for ${framework}:`, err); return `${framework} requirements`; } }, [complianceService] ); return ( <WidgetContainer title={WIDGET_TITLES.COMPLIANCE_STATUS || "Compliance Status"} icon={WIDGET_ICONS.COMPLIANCE_STATUS || "📋"} className={className} testId={testId} isLoading={isLoading} error={serviceError} > <div className="p-4"> {/* Add high-level description */} <div className="mb-4 p-3 bg-blue-50 dark:bg-blue-900 dark:bg-opacity-20 rounded-lg"> <p className="text-sm"> This widget shows your compliance status with various regulatory frameworks and industry standards based on your selected security levels. </p> </div> {/* Overall Compliance Status */} <div className="mb-6"> <h3 className="text-lg font-medium mb-2"> Overall Compliance Status </h3> <div className="p-3 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700" data-testid={COMPLIANCE_TEST_IDS.COMPLIANCE_STATUS_SUMMARY} > <div className="flex justify-between items-center"> <div className="flex items-center"> <span className="text-2xl mr-2 text-blue-500"> {SECURITY_ICONS.compliance || "📋"} </span> <span className="font-medium">Compliance Status</span> </div> <StatusBadge status={getBadgeStatus(complianceStatus?.complianceScore ?? 0)} testId={COMPLIANCE_TEST_IDS.COMPLIANCE_STATUS_BADGE} > {statusText} </StatusBadge> </div> {complianceStatus && ( <div className="mt-3"> <div className="flex justify-between items-center mb-2"> <span className="text-sm text-gray-600 dark:text-gray-400"> Compliance Score </span> <span className="font-bold" data-testid={COMPLIANCE_TEST_IDS.COMPLIANCE_SCORE} > {complianceStatus.complianceScore ?? 0}% </span> </div> <div className="relative pt-1"> <div className="overflow-hidden h-2 mb-2 text-xs flex rounded bg-blue-200 dark:bg-blue-900"> <div style={{ width: `${complianceStatus.complianceScore ?? 0}%`, }} className="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500 dark:bg-blue-600" data-testid={COMPLIANCE_TEST_IDS.COMPLIANCE_SCORE_BAR} ></div> </div> </div> </div> )} </div> </div> {/* Compliant Frameworks */} {complianceStatus && complianceStatus.compliantFrameworks.length > 0 && ( <div className="mb-6"> <h3 className="text-lg font-medium mb-2">Compliant Frameworks</h3> <div className="grid grid-cols-1 md:grid-cols-2 gap-3" data-testid={COMPLIANCE_TEST_IDS.COMPLIANT_FRAMEWORKS_LIST} > {complianceStatus.compliantFrameworks.map( (framework, index) => ( <div key={framework} className={`p-3 bg-green-50 dark:bg-green-900 dark:bg-opacity-20 rounded-lg border border-green-200 dark:border-green-800 cursor-pointer ${ activeFramework === framework ? "ring-2 ring-green-500 dark:ring-green-400" : "" }`} onClick={() => setActiveFramework(framework)} data-testid={`${COMPLIANCE_TEST_IDS.FRAMEWORK_ITEM_PREFIX}-${index}`} > <div className="flex justify-between items-center"> <span className="font-medium">{framework}</span> <StatusBadge status={getFrameworkStatusBadge(framework)} testId={`framework-status-badge-${index}`} > Compliant </StatusBadge> </div> <p className="text-sm text-gray-600 dark:text-gray-400 mt-1"> {getFrameworkDescription(framework)} </p> </div> ) )} </div> </div> )} {/* Partially Compliant Frameworks */} {complianceStatus && complianceStatus.partiallyCompliantFrameworks.length > 0 && ( <div className="mb-6"> <h3 className="text-lg font-medium mb-2"> Partially Compliant Frameworks </h3> <div className="grid grid-cols-1 md:grid-cols-2 gap-3" data-testid={ COMPLIANCE_TEST_IDS.PARTIALLY_COMPLIANT_FRAMEWORKS_LIST } > {complianceStatus.partiallyCompliantFrameworks.map( (framework, index) => ( <div key={framework} className={`p-3 bg-yellow-50 dark:bg-yellow-900 dark:bg-opacity-20 rounded-lg border border-yellow-200 dark:border-yellow-800 cursor-pointer ${ activeFramework === framework ? "ring-2 ring-yellow-500 dark:ring-yellow-400" : "" }`} onClick={() => setActiveFramework(framework)} data-testid={`${COMPLIANCE_TEST_IDS.FRAMEWORK_ITEM_PREFIX}-partial-${index}`} > <div className="flex justify-between items-center mb-1"> <span className="font-medium">{framework}</span> <StatusBadge status={getFrameworkStatusBadge(framework)} testId={`framework-partial-status-badge-${index}`} > Partially Compliant </StatusBadge> </div> <p className="text-xs text-gray-600 dark:text-gray-400"> {getFrameworkDescription(framework)} </p> </div> ) )} </div> </div> )} {/* Non-Compliant Frameworks */} {complianceStatus && complianceStatus.nonCompliantFrameworks.length > 0 && ( <div className="mb-6"> <h3 className="text-lg font-medium mb-2"> Non-Compliant Frameworks </h3> <div className="grid grid-cols-1 md:grid-cols-2 gap-3" data-testid={COMPLIANCE_TEST_IDS.NON_COMPLIANT_FRAMEWORKS_LIST} > {complianceStatus.nonCompliantFrameworks.map( (framework, index) => ( <div key={framework} className={`p-3 bg-red-50 dark:bg-red-900 dark:bg-opacity-20 rounded-lg border border-red-200 dark:border-red-800 cursor-pointer ${ activeFramework === framework ? "ring-2 ring-red-500 dark:ring-red-400" : "" }`} onClick={() => setActiveFramework(framework)} data-testid={`${COMPLIANCE_TEST_IDS.FRAMEWORK_ITEM_PREFIX}-non-${index}`} > <div className="flex justify-between items-center mb-1"> <span className="font-medium">{framework}</span> <StatusBadge status={getFrameworkStatusBadge(framework)} testId={`framework-non-status-badge-${index}`} > Non-Compliant </StatusBadge> </div> <p className="text-xs text-gray-600 dark:text-gray-400"> {getFrameworkDescription(framework)} </p> </div> ) )} </div> </div> )} {/* Framework Gap Analysis */} {activeFramework && ( <div className="mt-6"> <h3 className="text-lg font-medium mb-2"> {activeFramework} Gap Analysis </h3> <div className="p-3 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700" data-testid={COMPLIANCE_TEST_IDS.FRAMEWORK_GAP_ANALYSIS} > {gapAnalysis ? ( <div> <div className="mb-3"> <h4 className="font-medium mb-1">Status</h4> <p className="text-sm text-gray-600 dark:text-gray-400"> {gapAnalysis.isCompliant ? `Your security controls meet the requirements for ${activeFramework}.` : `Your security controls do not fully meet the requirements for ${activeFramework}.`} </p> </div> {/* CIA Component Analysis */} <div className="mb-3"> <h4 className="font-medium mb-1">Component Requirements</h4> <div className="grid grid-cols-1 md:grid-cols-3 gap-2 mt-2"> {["availability", "integrity", "confidentiality"].map( (comp) => { const componentType = comp as CIAComponent; const currentLevel = componentType === "availability" ? availabilityLevel : componentType === "integrity" ? integrityLevel : confidentialityLevel; const requiredLevel = getFrameworkRequiredLevel( activeFramework, componentType ); const isMeeting = getSecurityLevelValue(currentLevel) >= getSecurityLevelValue(requiredLevel); return ( <div key={comp} className={`p-2 rounded-lg ${ isMeeting ? "bg-green-50 dark:bg-green-900 dark:bg-opacity-20" : "bg-red-50 dark:bg-red-900 dark:bg-opacity-20" }`} > <div className="text-xs font-medium mb-1"> {componentType.charAt(0).toUpperCase() + componentType.slice(1)} </div> <div className="flex justify-between text-sm"> <span> Current:{" "} <span className="font-medium"> {currentLevel} </span> </span> <span> Required:{" "} <span className="font-medium"> {requiredLevel} </span> </span> </div> <div className="mt-1 text-xs text-right"> <StatusBadge status={isMeeting ? "success" : "error"} testId={`${comp}-requirement-status`} > {isMeeting ? "Meeting" : "Not Meeting"} </StatusBadge> </div> </div> ); } )} </div> </div> {/* Gap Analysis */} {gapAnalysis.gaps && gapAnalysis.gaps.length > 0 && ( <div className="mb-3"> <h4 className="font-medium mb-1">Compliance Gaps</h4> <ul className="list-disc list-inside text-sm text-gray-600 dark:text-gray-400"> {gapAnalysis.gaps.map((gap, index) => ( <li key={index}> {typeof gap === "string" ? gap : gap.framework || gap.frameworkDescription || "Undefined compliance gap"} </li> ))} </ul> </div> )} {/* Recommendations */} {gapAnalysis.recommendations && gapAnalysis.recommendations.length > 0 && ( <div> <h4 className="font-medium mb-1">Recommendations</h4> <ul className="list-disc list-inside text-sm text-gray-600 dark:text-gray-400"> {gapAnalysis.recommendations.map((rec, index) => ( <li key={index}>{rec}</li> ))} </ul> </div> )} </div> ) : ( <div className="text-center text-gray-500 dark:text-gray-400 py-6" data-testid={COMPLIANCE_TEST_IDS.NO_GAP_ANALYSIS} > No gap analysis available for this framework. </div> )} </div> </div> )} {/* Compliance Tips */} <div className="mt-6 p-3 bg-blue-50 dark:bg-blue-900 dark:bg-opacity-20 rounded-lg border border-blue-200 dark:border-blue-800"> <div className="flex items-center mb-2"> <span className="text-blue-500 dark:text-blue-400 mr-2">💡</span> <h3 className="font-medium">Compliance Tips</h3> </div> <ul className="text-sm space-y-1 list-disc list-inside text-gray-600 dark:text-gray-400" data-testid={COMPLIANCE_TEST_IDS.COMPLIANCE_TIPS_LIST} > {complianceStatus && complianceStatus.complianceScore ? ( complianceStatus.complianceScore < 50 ? ( <> <li>Focus on implementing foundational security controls</li> <li> Prioritize controls that address multiple compliance frameworks </li> <li> Consider engaging a compliance specialist to create a roadmap </li> </> ) : complianceStatus.complianceScore < 80 ? ( <> <li> Address specific gaps in partially compliant frameworks </li> <li> Implement regular compliance monitoring and validation </li> <li>Document your compliance controls and processes</li> </> ) : ( <> <li> Maintain your strong compliance posture with regular reviews </li> <li> Prepare for upcoming regulatory changes and new frameworks </li> <li> Consider compliance certification to showcase your capabilities </li> </> ) ) : ( <> <li> Implement controls across all CIA components for balanced compliance </li> <li> Start with the frameworks most relevant to your industry </li> <li> Document your security controls to demonstrate compliance </li> </> )} </ul> </div> </div> </WidgetContainer> ); }; // Helper function to convert security level to numeric value function getSecurityLevelValue(level: SecurityLevel): number { const levelValues: Record<SecurityLevel, number> = { None: 0, Low: 1, Moderate: 2, High: 3, "Very High": 4, }; return levelValues[level] || 0; } export default ComplianceStatusWidget; |