diff --git a/package.json b/package.json index dc7ee50e6..b1c612c95 100644 --- a/package.json +++ b/package.json @@ -425,7 +425,8 @@ "@opentelemetry/otlp-proto-exporter-base": "^0.51.1", "@azure/openai": "^2.0.0", "node-forge": ">=1.4.0", - "picomatch": ">=2.3.2", + "picomatch": ">=4.0.4", + "path-to-regexp": ">=8.4.0", "express": ">=4.19.2", "js-yaml": ">=4.1.1", "yaml": ">=2.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5197e60dd..dd1ca72ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,13 +5,13 @@ settings: excludeLinksFromLockfile: false overrides: - path-to-regexp: 8.3.0 + path-to-regexp: '>=8.4.0' '@opentelemetry/api': ^1.9.0 scmp: 2.1.0 '@opentelemetry/otlp-proto-exporter-base': ^0.51.1 '@azure/openai': ^2.0.0 node-forge: '>=1.4.0' - picomatch: '>=2.3.2' + picomatch: '>=4.0.4' express: '>=4.19.2' js-yaml: '>=4.1.1' yaml: '>=2.8.3' @@ -732,8 +732,8 @@ importers: specifier: ^0.15.0 version: 0.15.0 path-to-regexp: - specifier: 8.3.0 - version: 8.3.0 + specifier: '>=8.4.0' + version: 8.4.1 postcss: specifier: ^8.5.8 version: 8.5.8 @@ -8939,7 +8939,7 @@ packages: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} peerDependencies: - picomatch: '>=2.3.2' + picomatch: '>=4.0.4' peerDependenciesMeta: picomatch: optional: true @@ -11618,8 +11618,8 @@ packages: path-to-regexp@6.3.0: resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} - path-to-regexp@8.3.0: - resolution: {integrity: sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==} + path-to-regexp@8.4.1: + resolution: {integrity: sha512-fvU78fIjZ+SBM9YwCknCvKOUKkLVqtWDVctl0s7xIqfmfb38t2TT4ZU2gHm+Z8xGwgW+QWEU3oQSAzIbo89Ggw==} path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} @@ -11687,10 +11687,6 @@ packages: picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} - engines: {node: '>=12'} - picomatch@4.0.4: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} @@ -22400,7 +22396,7 @@ snapshots: '@vercel/routing-utils@5.3.3': dependencies: - path-to-regexp: 8.3.0 + path-to-regexp: 8.4.1 path-to-regexp-updated: path-to-regexp@6.3.0 optionalDependencies: ajv: 6.14.0 @@ -22979,7 +22975,7 @@ snapshots: p-queue: 9.1.0 package-manager-detector: 1.6.0 piccolore: 0.1.3 - picomatch: 4.0.3 + picomatch: 4.0.4 rehype: 13.0.2 semver: 7.7.4 shiki: 4.0.2 @@ -26573,7 +26569,7 @@ snapshots: dependencies: commander: 14.0.3 listr2: 9.0.5 - picomatch: 4.0.3 + picomatch: 4.0.4 string-argv: 0.3.2 tinyexec: 1.0.4 yaml: 2.8.3 @@ -27417,7 +27413,7 @@ snapshots: micromatch@4.0.8: dependencies: braces: 3.0.3 - picomatch: 4.0.3 + picomatch: 4.0.4 mime-db@1.52.0: {} @@ -27619,7 +27615,7 @@ snapshots: headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 - path-to-regexp: 8.3.0 + path-to-regexp: 8.4.1 picocolors: 1.1.1 rettime: 0.10.1 statuses: 2.0.2 @@ -28381,7 +28377,7 @@ snapshots: path-to-regexp@6.3.0: {} - path-to-regexp@8.3.0: {} + path-to-regexp@8.4.1: {} path-type@4.0.0: {} @@ -28439,8 +28435,6 @@ snapshots: picocolors@1.1.1: {} - picomatch@4.0.3: {} - picomatch@4.0.4: {} picoquery@2.5.0: {} @@ -29472,7 +29466,7 @@ snapshots: rollup-plugin-visualizer@7.0.1(rolldown@1.0.0-rc.12(@emnapi/core@1.9.0)(@emnapi/runtime@1.9.0))(rollup@4.59.0): dependencies: open: 11.0.0 - picomatch: 4.0.3 + picomatch: 4.0.4 source-map: 0.7.6 yargs: 18.0.0 optionalDependencies: @@ -29518,7 +29512,7 @@ snapshots: depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 - path-to-regexp: 8.3.0 + path-to-regexp: 8.4.1 transitivePeerDependencies: - supports-color @@ -31158,7 +31152,7 @@ snapshots: magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 - picomatch: 4.0.3 + picomatch: 4.0.4 std-env: 4.0.0 tinybench: 2.9.0 tinyexec: 1.0.4 diff --git a/security/tests/test_compliance_monitor.py b/security/tests/test_compliance_monitor.py new file mode 100644 index 000000000..65a11b0bc --- /dev/null +++ b/security/tests/test_compliance_monitor.py @@ -0,0 +1,15 @@ +import sys +import os +import importlib.util + +current_dir = os.path.dirname(os.path.abspath(__file__)) +parent_dir = os.path.dirname(current_dir) + +spec = importlib.util.spec_from_file_location('compliance_monitor', os.path.join(parent_dir, 'compliance-monitor.py')) +compliance_monitor = importlib.util.module_from_spec(spec) +spec.loader.exec_module(compliance_monitor) + +def test_check_data_encryption(): + monitor = compliance_monitor.ComplianceMonitor() + result = monitor.check_data_encryption() + assert result is True diff --git a/src/components/admin/dlp/DLPRuleEditor.tsx b/src/components/admin/dlp/DLPRuleEditor.tsx index b6809af60..7dcbcb9cb 100644 --- a/src/components/admin/dlp/DLPRuleEditor.tsx +++ b/src/components/admin/dlp/DLPRuleEditor.tsx @@ -49,7 +49,7 @@ export default function DLPRuleEditor() { if (!(event instanceof CustomEvent)) { return } - const detail = event.detail as EditorRule + const detail = event.detail as any as EditorRule setCurrentRule({ ...defaultRule, ...detail, matchPattern: detail.matchPattern ?? '' }) setIsEditing(true) } diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx index 90a30a59e..acf0a8136 100644 --- a/src/components/ui/tabs.tsx +++ b/src/components/ui/tabs.tsx @@ -124,7 +124,7 @@ export function TabsList({ children, className = '' }: TabsListProps) { const tabs = Array.from( list.querySelectorAll('[role="tab"]:not([disabled])'), ) - const index = tabs.indexOf(document.activeElement as HTMLElement) + const index = tabs.indexOf(document.activeElement as any as HTMLElement) if (index < 0) return diff --git a/src/lib/logging/standardized-logger.ts b/src/lib/logging/standardized-logger.ts index dea04f4e7..36d4b97d8 100644 --- a/src/lib/logging/standardized-logger.ts +++ b/src/lib/logging/standardized-logger.ts @@ -19,31 +19,31 @@ export type Logger = { // Factory functions for named loggers - delegate to canonical getLogger so tests can mock export function getBiasDetectionLogger(scope: string): Logger { - return getLogger(`bias-detection:${scope}`) as unknown as Logger + return getLogger(`bias-detection:${scope}`) as any as Logger } export function getClinicalAnalysisLogger(scope: string): Logger { - return getLogger(`clinical-analysis:${scope}`) as unknown as Logger + return getLogger(`clinical-analysis:${scope}`) as any as Logger } export function getAiServiceLogger(scope: string): Logger { - return getLogger(`ai-service:${scope}`) as unknown as Logger + return getLogger(`ai-service:${scope}`) as any as Logger } export function getApiEndpointLogger(scope: string): Logger { - return getLogger(`api-endpoint:${scope}`) as unknown as Logger + return getLogger(`api-endpoint:${scope}`) as any as Logger } export function getComponentLogger(scope: string): Logger { - return getLogger(`component:${scope}`) as unknown as Logger + return getLogger(`component:${scope}`) as any as Logger } export function getServiceLogger(scope: string): Logger { - return getLogger(`service:${scope}`) as unknown as Logger + return getLogger(`service:${scope}`) as any as Logger } export function getSecurityLogger(scope: string): Logger { - return getLogger(`security:${scope}`) as unknown as Logger + return getLogger(`security:${scope}`) as any as Logger } export function getAdvancedPHILogger( @@ -51,11 +51,11 @@ export function getAdvancedPHILogger( ): Logger { return getLogger( `advanced-phi${config.enableLogCollection ? ':collect' : ''}`, - ) as unknown as Logger + ) as any as Logger } export function getHipaaCompliantLogger(scope: string): Logger { - return getLogger(`hipaa:${scope}`) as unknown as Logger + return getLogger(`hipaa:${scope}`) as any as Logger } // Default/general loggers - provide thin runtime proxies to getLogger diff --git a/src/lib/utils/logger.ts b/src/lib/utils/logger.ts index 6e1b58079..6637196c9 100644 --- a/src/lib/utils/logger.ts +++ b/src/lib/utils/logger.ts @@ -36,7 +36,7 @@ class Logger { return obj } - const newObj = { ...(obj as Record) } + const newObj = { ...(obj as any as Record) } for (const key of keys) { if (key in newObj) { newObj[key] = '[REDACTED]'