@oneuptime/common 12.0.25 → 12.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/Index.ts +2 -0
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +413 -0
- package/Models/DatabaseModels/AlertSeverity.ts +4 -1
- package/Models/DatabaseModels/CephClusterFeed.ts +625 -0
- package/Models/DatabaseModels/CloudResourceFeed.ts +625 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +13 -0
- package/Models/DatabaseModels/DetectionRule.ts +9 -3
- package/Models/DatabaseModels/DockerHostFeed.ts +625 -0
- package/Models/DatabaseModels/DockerSwarmClusterFeed.ts +628 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +9 -3
- package/Models/DatabaseModels/HostFeed.ts +625 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +4 -1
- package/Models/DatabaseModels/Index.ts +22 -0
- package/Models/DatabaseModels/KubernetesClusterFeed.ts +628 -0
- package/Models/DatabaseModels/Monitor.ts +87 -0
- package/Models/DatabaseModels/NetworkDevice.ts +96 -5
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +92 -6
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +301 -31
- package/Models/DatabaseModels/NetworkSite.ts +120 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +1 -0
- package/Models/DatabaseModels/PodmanHostFeed.ts +625 -0
- package/Models/DatabaseModels/ProxmoxClusterFeed.ts +626 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +67 -0
- package/Models/DatabaseModels/ServiceFeed.ts +625 -0
- package/Models/DatabaseModels/TelemetrySourceMap.ts +474 -0
- package/Models/DatabaseModels/ThreatIntelFeed.ts +758 -0
- package/Models/DatabaseModels/UserOnCallLog.ts +1 -0
- package/Models/DatabaseModels/UserTotpAuth.ts +1 -0
- package/Models/DatabaseModels/UserWebAuthn.ts +1 -0
- package/Server/API/AlertAPI.ts +23 -1
- package/Server/API/BaseAPI.ts +14 -3
- package/Server/API/IncidentAPI.ts +41 -1
- package/Server/API/IncidentEpisodeAPI.ts +23 -1
- package/Server/API/MicrosoftTeamsAPI.ts +31 -2
- package/Server/API/ScheduledMaintenanceAPI.ts +23 -1
- package/Server/API/SlackAPI.ts +48 -0
- package/Server/API/TelemetryAPI.ts +167 -42
- package/Server/API/UserOnCallLogTimelineAPI.ts +75 -61
- package/Server/API/UserTotpAuthAPI.ts +67 -1
- package/Server/API/UserWebAuthnAPI.ts +44 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.ts +57 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.ts +129 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.ts +54 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.ts +489 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +18 -0
- package/Server/Middleware/IdentityRateLimit.ts +53 -3
- package/Server/Services/AIService.ts +181 -41
- package/Server/Services/CephClusterFeedService.ts +99 -0
- package/Server/Services/CephClusterLabelRuleEngineService.ts +29 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +23 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +129 -0
- package/Server/Services/CephClusterOwnerUserService.ts +123 -0
- package/Server/Services/CephClusterService.ts +223 -2
- package/Server/Services/CloudResourceFeedService.ts +99 -0
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +30 -0
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +33 -0
- package/Server/Services/CloudResourceOwnerTeamService.ts +129 -0
- package/Server/Services/CloudResourceOwnerUserService.ts +123 -0
- package/Server/Services/CloudResourceService.ts +227 -2
- package/Server/Services/DatabaseService.ts +265 -0
- package/Server/Services/DockerHostFeedService.ts +99 -0
- package/Server/Services/DockerHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/DockerHostOwnerTeamService.ts +129 -0
- package/Server/Services/DockerHostOwnerUserService.ts +123 -0
- package/Server/Services/DockerHostService.ts +227 -2
- package/Server/Services/DockerSwarmClusterFeedService.ts +102 -0
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +133 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +127 -0
- package/Server/Services/DockerSwarmClusterService.ts +229 -2
- package/Server/Services/EnterpriseLicenseService.ts +15 -7
- package/Server/Services/ExceptionAggregationService.ts +12 -2
- package/Server/Services/HostFeedService.ts +99 -0
- package/Server/Services/HostLabelRuleEngineService.ts +29 -0
- package/Server/Services/HostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/HostOwnerTeamService.ts +129 -0
- package/Server/Services/HostOwnerUserService.ts +123 -0
- package/Server/Services/HostService.ts +215 -2
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterFeedService.ts +99 -0
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/KubernetesClusterOwnerTeamService.ts +133 -0
- package/Server/Services/KubernetesClusterOwnerUserService.ts +127 -0
- package/Server/Services/KubernetesClusterService.ts +231 -2
- package/Server/Services/LogAggregationService.ts +23 -280
- package/Server/Services/MetricAggregationService.ts +98 -1
- package/Server/Services/MonitorService.ts +177 -13
- package/Server/Services/MonitorTemplateService.ts +111 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +777 -86
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +199 -16
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +1055 -14
- package/Server/Services/NetworkDeviceService.ts +750 -4
- package/Server/Services/NetworkInterfaceService.ts +415 -0
- package/Server/Services/NetworkSiteService.ts +485 -52
- package/Server/Services/PodmanHostFeedService.ts +99 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +129 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +123 -0
- package/Server/Services/PodmanHostService.ts +227 -2
- package/Server/Services/ProjectService.ts +16 -10
- package/Server/Services/ProxmoxClusterFeedService.ts +99 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +131 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +124 -0
- package/Server/Services/ProxmoxClusterService.ts +225 -2
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +61 -0
- package/Server/Services/ServiceFeedService.ts +99 -0
- package/Server/Services/ServiceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ServiceOwnerRuleEngineService.ts +26 -0
- package/Server/Services/ServiceOwnerTeamService.ts +129 -0
- package/Server/Services/ServiceOwnerUserService.ts +123 -0
- package/Server/Services/ServiceService.ts +227 -3
- package/Server/Services/StatusPageSubscriberService.ts +7 -0
- package/Server/Services/TelemetryAttributeService.ts +13 -3
- package/Server/Services/TelemetrySourceMapService.ts +307 -0
- package/Server/Services/ThreatIntelFeedService.ts +222 -0
- package/Server/Services/ThreatIntelIndicatorService.ts +428 -0
- package/Server/Services/TraceAggregationService.ts +101 -11
- package/Server/Services/UserService.ts +13 -6
- package/Server/Services/UserTwoFactorBackupCodeService.ts +127 -0
- package/Server/Services/UserWebhookService.ts +11 -2
- package/Server/Static/Brand/README.md +38 -0
- package/Server/Static/Brand/favicons/apple-touch-icon.png +0 -0
- package/Server/Static/Brand/favicons/favicon-16x16.png +0 -0
- package/Server/Static/Brand/favicons/favicon-32x32.png +0 -0
- package/Server/Static/Brand/favicons/favicon.ico +0 -0
- package/Server/Static/Brand/favicons/safari-pinned-tab.svg +31 -0
- package/Server/Static/Brand/hou-wb.svg +1 -0
- package/Server/Static/Brand/oneuptime-logo.svg +1 -0
- package/Server/Static/Brand/ou-wb.svg +1 -0
- package/Server/Static/Vendor/README.md +4 -0
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +13 -3
- package/Server/Types/Database/AggregateBy.ts +83 -0
- package/Server/Types/Database/AggregateResultUtil.ts +126 -0
- package/Server/Types/Database/JSONColumnQuery.ts +18 -0
- package/Server/Types/Database/QueryHelper.ts +40 -0
- package/Server/Types/Database/QueryUtil.ts +26 -0
- package/Server/Types/Workflow/Components/API/Utils.ts +10 -1
- package/Server/Types/Workflow/Components/JavaScript.ts +8 -0
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +9 -0
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +18 -0
- package/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.ts +422 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +176 -0
- package/Server/Utils/DataSource/HttpFetch.ts +18 -0
- package/Server/Utils/Database/RelationIdUtil.ts +42 -0
- package/Server/Utils/Marketing/MarketingEventUtil.ts +38 -9
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +34 -3
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +9 -1
- package/Server/Utils/Monitor/Criteria/SyntheticMonitor.ts +28 -10
- package/Server/Utils/Monitor/MonitorAlert.ts +541 -332
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +330 -64
- package/Server/Utils/Monitor/MonitorIncident.ts +640 -434
- package/Server/Utils/Monitor/MonitorResource.ts +226 -49
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +46 -3
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +23 -102
- package/Server/Utils/Monitor/PerEntityCriteriaFanOut.ts +329 -0
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +427 -0
- package/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.ts +310 -0
- package/Server/Utils/OnCallNotificationContext.ts +686 -0
- package/Server/Utils/PrivateNetworkWebhookConfig.ts +549 -0
- package/Server/Utils/ResourceFeed/ResourceFeedUtil.ts +139 -0
- package/Server/Utils/Response.ts +11 -1
- package/Server/Utils/SSRFProtection.ts +230 -60
- package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +106 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +84 -284
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +47 -20
- package/Server/Utils/SecurityEvent/SecurityEventAlerting.ts +318 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.ts +199 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.ts +252 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +739 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.ts +533 -0
- package/Server/Utils/StartServer.ts +83 -56
- package/Server/Utils/StatusPageSubscriberWebhook.ts +3 -0
- package/Server/Utils/Telemetry/SourceMapResolver.ts +480 -0
- package/Server/Utils/TwoFactorBackupCodeNotification.ts +106 -0
- package/Server/Utils/VM/VMAPI.ts +3 -0
- package/Server/Utils/VM/VMRunner.ts +27 -1
- package/Server/Utils/VendorAssets.ts +42 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +136 -6
- package/Server/Views/AcknowledgeUserOnCallNotification.ejs +11 -9
- package/Server/Views/Partials/Head.ejs +9 -9
- package/Server/Views/Partials/OnCallNotificationDetails.ejs +48 -0
- package/Server/Views/ViewMessage.ejs +11 -9
- package/Tests/App/Accounts/LoginTwoFactorRecovery.test.tsx +972 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +401 -0
- package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +707 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +1908 -18
- package/Tests/App/Dashboard/ResourceFeed.test.tsx +230 -0
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +216 -0
- package/Tests/App/Dashboard/TopologyAddToMonitoring.test.tsx +192 -0
- package/Tests/App/Dashboard/WorkspaceNotificationRuleConditions.test.tsx +439 -0
- package/Tests/Models/DatabaseModels/DateColumnDeserialization.test.ts +182 -0
- package/Tests/Models/DatabaseModels/RelationColumnModelTypeCoverage.test.ts +82 -0
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +398 -0
- package/Tests/Models/DiscoveryScanNameColumn.test.ts +151 -16
- package/Tests/Models/DiscoveryScanSnmpEnabledColumn.test.ts +593 -0
- package/Tests/Models/NetworkDeviceCreateContract.test.ts +102 -0
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +607 -0
- package/Tests/Server/API/AIGenerationRequestBudget.test.ts +355 -0
- package/Tests/Server/API/AIKillSwitchBackstop.test.ts +602 -0
- package/Tests/Server/API/BaseAPIUpdateDateColumns.test.ts +154 -0
- package/Tests/Server/API/MicrosoftTeamsBotTestEndpoint.test.ts +335 -0
- package/Tests/Server/API/UserOnCallLogTimelineAcknowledgePage.test.ts +611 -0
- package/Tests/Server/API/UserTotpAuthAPI.test.ts +498 -4
- package/Tests/Server/API/UserWebAuthnBackupCodeMinting.test.ts +682 -0
- package/Tests/Server/Infrastructure/ExampleDockerfiles.test.ts +595 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +9 -0
- package/Tests/Server/Services/AIServiceProjectAccess.test.ts +6 -0
- package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +18 -0
- package/Tests/Server/Services/DatabaseServiceAggregateBy.test.ts +590 -0
- package/Tests/Server/Services/DatabaseServiceUpdateWriteRouting.test.ts +12 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +162 -26
- package/Tests/Server/Services/EnterpriseLicenseServiceCreate.test.ts +292 -0
- package/Tests/Server/Services/FeedRetentionConsistency.test.ts +119 -12
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +109 -0
- package/Tests/Server/Services/MetricAggregationAttributeOperators.test.ts +170 -0
- package/Tests/Server/Services/MonitorTemplateServiceNetworkDeviceSync.test.ts +383 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +997 -3
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +830 -0
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +528 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +3141 -1
- package/Tests/Server/Services/NetworkDeviceRegisteredHostnames.test.ts +1023 -0
- package/Tests/Server/Services/NetworkDeviceSiteAssignmentRuleSkip.test.ts +728 -0
- package/Tests/Server/Services/NetworkInterfaceServiceUpsert.test.ts +795 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +903 -0
- package/Tests/Server/Services/NetworkSiteService.test.ts +165 -24
- package/Tests/Server/Services/ProjectServiceChangePlan.test.ts +5 -3
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +5 -2
- package/Tests/Server/Services/ResourceCreationFeedWrites.test.ts +304 -0
- package/Tests/Server/Services/ResourceFeedServices.test.ts +269 -0
- package/Tests/Server/Services/ResourceOwnerFeedWrites.test.ts +245 -0
- package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +792 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +483 -0
- package/Tests/Server/Services/ThreatIntelFeedService.test.ts +351 -0
- package/Tests/Server/Services/ThreatIntelIndicatorService.test.ts +366 -0
- package/Tests/Server/Services/TraceAggregationAttributeOperators.test.ts +507 -0
- package/Tests/Server/Services/UserTwoFactorBackupCodeGenerateIfNone.test.ts +705 -0
- package/Tests/Server/Services/WorkspaceNotificationRuleOnCallDutyPolicy.test.ts +306 -0
- package/Tests/Server/Types/Database/AggregateResultUtil.test.ts +386 -0
- package/Tests/Server/Types/Database/Permissions/SelectRejectionMessageContract.test.ts +424 -0
- package/Tests/Server/Types/Database/QueryHelperWildcard.test.ts +142 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentPrivateNetwork.test.ts +163 -0
- package/Tests/Server/Types/Workflow/Components/JavaScriptPrivateNetwork.test.ts +124 -0
- package/Tests/Server/Utils/AI/CodeFixAgentCompletion.test.ts +5 -0
- package/Tests/Server/Utils/AI/InvestigationGrader.test.ts +39 -1
- package/Tests/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.test.ts +338 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorWildcard.test.ts +383 -0
- package/Tests/Server/Utils/Marketing/EmittedMarketingEvent.ts +23 -0
- package/Tests/Server/Utils/Marketing/MarketingEventUtil.test.ts +51 -0
- package/Tests/Server/Utils/Monitor/Criteria/SyntheticMonitorCriteria.test.ts +259 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +557 -0
- package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +12 -2
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +404 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +8 -2
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +125 -98
- package/Tests/Server/Utils/Monitor/PerEntityCriteriaFanOut.test.ts +444 -0
- package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1112 -0
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +717 -0
- package/Tests/Server/Utils/NetworkDevice/RulePatternValidator.test.ts +78 -0
- package/Tests/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.test.ts +363 -0
- package/Tests/Server/Utils/OfflineAssetHygiene.test.ts +35 -0
- package/Tests/Server/Utils/OnCallNotificationContext.test.ts +908 -0
- package/Tests/Server/Utils/PrivateNetworkWebhookConfig.test.ts +423 -0
- package/Tests/Server/Utils/ResourceFeed/ResourceFeedUtil.test.ts +191 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +597 -0
- package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +381 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +417 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventAlerting.test.ts +246 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.test.ts +282 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.test.ts +312 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.test.ts +854 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.test.ts +437 -0
- package/Tests/Server/Utils/StartServerErrorStatus.test.ts +225 -0
- package/Tests/Server/Utils/StatusPage/MonitorRulePatternValidator.test.ts +62 -0
- package/Tests/Server/Utils/StatusPageSubscriberWebhookPrivateNetwork.test.ts +119 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +542 -0
- package/Tests/Server/Utils/TwoFactorBackupCodeNotification.test.ts +272 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +111 -0
- package/Tests/Server/Utils/VendorAssets.test.ts +117 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +101 -4
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsInstallStateDiagnostics.test.ts +922 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsRosterDiagnosticMessages.test.ts +642 -0
- package/Tests/Server/Views/OnCallAcknowledgePage.test.ts +430 -0
- package/Tests/Types/API/URLQueryString.test.ts +472 -0
- package/Tests/Types/BaseDatabase/Wildcard.test.ts +163 -0
- package/Tests/Types/BaseDatabase/WildcardPattern.test.ts +149 -0
- package/Tests/Types/Database/DateColumnValue.test.ts +265 -0
- package/Tests/Types/DateToIsoStringOrNull.test.ts +67 -0
- package/Tests/Types/Log/LogQueryToFilter.test.ts +218 -43
- package/Tests/Types/Monitor/KubernetesTemplateGroupByKeys.test.ts +225 -0
- package/Tests/Types/Monitor/TemplateGroupByKeys.test.ts +296 -0
- package/Tests/Types/NetworkAutomation/RuleRunResult.test.ts +102 -0
- package/Tests/Types/NetworkAutomation/RuleRunResultDescribe.test.ts +145 -0
- package/Tests/Types/NetworkSite/SiteHealthRollupPolicy.test.ts +58 -0
- package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +15 -0
- package/Tests/Types/Telemetry/TelemetrySearchQuery.test.ts +620 -0
- package/Tests/Types/WhatsApp/WhatsAppTemplates.test.ts +110 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +76 -6
- package/Tests/Types/Workspace/NotificationRules/NotificationRuleCondition.test.ts +16 -4
- package/Tests/Types/Workspace/NotificationRules/OnCallDutyPolicyConditions.test.ts +669 -0
- package/Tests/UI/Components/DictionaryFilterOperatorWildcard.test.ts +175 -0
- package/Tests/UI/Components/IconOpticalSize.test.tsx +377 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardInstallGuidance.test.tsx +332 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsInstallGuidanceContent.test.tsx +643 -0
- package/Tests/Utils/Monitor/InterfaceInventoryUtil.test.ts +824 -0
- package/Tests/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.test.ts +626 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +718 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +59 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +287 -2
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +73 -0
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilder.test.ts +317 -0
- package/Tests/Utils/NetworkDiscovery/RescanIntervalUtil.test.ts +262 -0
- package/Tests/Utils/NetworkDiscovery/ScanModeUtil.test.ts +474 -0
- package/Tests/Utils/NetworkDiscovery/SnmpScanConfigUtil.test.ts +2442 -0
- package/Tests/Utils/NetworkSite/SiteMaintenanceUtil.test.ts +188 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +522 -0
- package/Tests/Utils/NetworkSite/SiteUptimeUtil.test.ts +694 -0
- package/Tests/Utils/SecurityEvent/ThreatIntel/StixPatternParser.test.ts +281 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +87 -67
- package/Types/API/URL.ts +45 -10
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +8 -0
- package/Types/BaseDatabase/NotWildcard.ts +86 -0
- package/Types/BaseDatabase/Wildcard.ts +89 -0
- package/Types/BaseDatabase/WildcardPattern.ts +176 -0
- package/Types/Database/DateColumnValue.ts +184 -0
- package/Types/Database/TableColumn.ts +40 -5
- package/Types/Date.ts +37 -0
- package/Types/Email/EmailTemplateType.ts +1 -0
- package/Types/JSON.ts +8 -0
- package/Types/Log/LogQueryToFilter.ts +167 -129
- package/Types/Monitor/DockerAlertTemplates.ts +43 -12
- package/Types/Monitor/HostAlertTemplates.ts +31 -3
- package/Types/Monitor/KubernetesAlertTemplates.ts +98 -0
- package/Types/Monitor/MonitorStep.ts +49 -0
- package/Types/Monitor/PodmanAlertTemplates.ts +39 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +14 -0
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +11 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +11 -4
- package/Types/NetworkAutomation/RuleRunResult.ts +191 -2
- package/Types/NetworkSite/SiteHealthRollupPolicy.ts +96 -0
- package/Types/Permission.ts +411 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +42 -0
- package/Types/SecurityEvent/ThreatIntelConstants.ts +118 -0
- package/Types/SerializableObjectDictionary.ts +8 -0
- package/Types/Telemetry/SourceMap.ts +56 -0
- package/Types/Telemetry/TelemetrySearchQuery.ts +949 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +12 -1
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +83 -0
- package/UI/Components/Icon/Icon.tsx +28 -1
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +26 -4
- package/UI/Components/LogsViewer/components/LogSearchHelp.tsx +34 -16
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +15 -2
- package/Utils/Metrics/MetricExplorerUrl.ts +77 -15
- package/Utils/Monitor/InterfaceInventoryUtil.ts +251 -0
- package/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.ts +333 -0
- package/Utils/Monitor/NetworkTopologyUtil.ts +249 -28
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +14 -6
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +2 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +49 -18
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +215 -0
- package/Utils/NetworkDiscovery/RescanIntervalUtil.ts +148 -0
- package/Utils/NetworkDiscovery/ScanModeUtil.ts +105 -0
- package/Utils/NetworkDiscovery/SnmpScanConfigUtil.ts +827 -0
- package/Utils/NetworkSite/SiteMaintenanceUtil.ts +110 -0
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +350 -19
- package/Utils/NetworkSite/SiteUptimeUtil.ts +422 -21
- package/Utils/SecurityEvent/ThreatIntel/StixPatternParser.ts +383 -0
- package/Utils/Telemetry/CrossSignalScope.ts +37 -39
- package/build/dist/Models/AnalyticsModels/Index.js +2 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +325 -0
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +11 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +9 -3
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +9 -3
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/HostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/HostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +22 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Monitor.js +81 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +103 -7
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +91 -6
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +276 -31
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js +124 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +66 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ServiceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js +496 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +800 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js +1 -0
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js +1 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +18 -1
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +8 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +35 -1
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +18 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +30 -2
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +18 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +45 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +100 -35
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +64 -59
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js +65 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js +42 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js +88 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js +61 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js +179 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +40 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +177 -30
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterFeedService.js +89 -0
- package/build/dist/Server/Services/CephClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +175 -1
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceFeedService.js +89 -0
- package/build/dist/Server/Services/CloudResourceFeedService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +28 -3
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceService.js +177 -1
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +201 -0
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostFeedService.js +89 -0
- package/build/dist/Server/Services/DockerHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +177 -1
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js +90 -0
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +175 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +40 -30
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/ExceptionAggregationService.js +8 -2
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostFeedService.js +89 -0
- package/build/dist/Server/Services/HostFeedService.js.map +1 -0
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/HostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/HostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +175 -1
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +10 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +24 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterFeedService.js +89 -0
- package/build/dist/Server/Services/KubernetesClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +177 -1
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +19 -196
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +59 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +115 -13
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +86 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +561 -67
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +130 -16
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +850 -8
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +594 -5
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkInterfaceService.js +306 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +408 -47
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostFeedService.js +89 -0
- package/build/dist/Server/Services/PodmanHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +177 -1
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +40 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js +89 -0
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +175 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +56 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceFeedService.js +89 -0
- package/build/dist/Server/Services/ServiceFeedService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +24 -0
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ServiceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ServiceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +173 -2
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +7 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +9 -3
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +265 -0
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js +157 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js +276 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js.map +1 -0
- package/build/dist/Server/Services/TraceAggregationService.js +62 -6
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +22 -13
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js +120 -0
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js.map +1 -1
- package/build/dist/Server/Services/UserWebhookService.js +11 -2
- package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +12 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/AggregateBy.js +2 -0
- package/build/dist/Server/Types/Database/AggregateBy.js.map +1 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js +90 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js.map +1 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js +14 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +42 -0
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +18 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js +10 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +8 -0
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +8 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +15 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js +266 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +134 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +8 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/Database/RelationIdUtil.js +31 -0
- package/build/dist/Server/Utils/Database/RelationIdUtil.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js +26 -8
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +42 -17
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +9 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js +15 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +386 -271
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +278 -64
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +469 -350
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +183 -44
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +46 -3
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +18 -91
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js +194 -0
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js.map +1 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +332 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js +279 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js.map +1 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js +415 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js.map +1 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js +424 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js.map +1 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js +108 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js.map +1 -0
- package/build/dist/Server/Utils/Response.js +12 -1
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +160 -58
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +89 -0
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +75 -234
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +41 -16
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js +217 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js +103 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js +168 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +527 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js +376 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +70 -44
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js +3 -0
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +327 -0
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js +84 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +10 -1
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/VendorAssets.js +29 -0
- package/build/dist/Server/Utils/VendorAssets.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +121 -6
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/API/URL.js +40 -10
- package/build/dist/Types/API/URL.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +8 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/NotWildcard.js +72 -0
- package/build/dist/Types/BaseDatabase/NotWildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js +75 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js +137 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js.map +1 -0
- package/build/dist/Types/Database/DateColumnValue.js +125 -0
- package/build/dist/Types/Database/DateColumnValue.js.map +1 -0
- package/build/dist/Types/Database/TableColumn.js +18 -2
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Date.js +31 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/JSON.js +2 -0
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Log/LogQueryToFilter.js +111 -108
- package/build/dist/Types/Log/LogQueryToFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +40 -16
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/HostAlertTemplates.js +29 -7
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +98 -4
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +40 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +36 -16
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -1
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js +90 -0
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js.map +1 -1
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js +84 -0
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +354 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js +100 -0
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js.map +1 -0
- package/build/dist/Types/SerializableObjectDictionary.js +8 -0
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/Types/Telemetry/SourceMap.js +9 -0
- package/build/dist/Types/Telemetry/SourceMap.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js +661 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +12 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +67 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +28 -1
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +25 -4
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js +36 -16
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +54 -9
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -1
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js +128 -0
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js +190 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +206 -28
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +14 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +34 -18
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +163 -0
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js +99 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js +85 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js +560 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js +56 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +185 -10
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js +248 -21
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js +255 -0
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +27 -30
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/package.json +2 -1
- package/Tests/Types/Log/LogQueryParser.test.ts +0 -186
- package/Types/Log/LogQueryParser.ts +0 -252
- package/build/dist/Types/Log/LogQueryParser.js +0 -200
- package/build/dist/Types/Log/LogQueryParser.js.map +0 -1
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves minified stack frames back to original source locations using
|
|
3
|
+
* uploaded source maps (see the TelemetrySourceMap model).
|
|
4
|
+
*
|
|
5
|
+
* Resolution is lazy — it runs at read time when an exception detail view
|
|
6
|
+
* asks for it, never on the ingestion hot path. That also tolerates the
|
|
7
|
+
* CI race where a map is uploaded slightly after the first error of a new
|
|
8
|
+
* release arrives.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
MinifiedStackFrame,
|
|
13
|
+
ResolvedStackFrame,
|
|
14
|
+
SourceCodeSnippet,
|
|
15
|
+
} from "../../../Types/Telemetry/SourceMap";
|
|
16
|
+
import BadDataException from "../../../Types/Exception/BadDataException";
|
|
17
|
+
import {
|
|
18
|
+
AnyMap,
|
|
19
|
+
TraceMap,
|
|
20
|
+
originalPositionFor,
|
|
21
|
+
} from "@jridgewell/trace-mapping";
|
|
22
|
+
|
|
23
|
+
export interface SourceMapBundle {
|
|
24
|
+
/** Bundle path the map was uploaded for, e.g. "main.a8f1b2.js". */
|
|
25
|
+
bundlePath: string;
|
|
26
|
+
/** The raw source map JSON. */
|
|
27
|
+
content: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* Hard ceiling on one map. Matches MAX_MULTIPART_FILE_BYTES on the upload
|
|
32
|
+
* path; also enforced on the decoded string (invalid UTF-8 bytes expand to
|
|
33
|
+
* 3-byte U+FFFD on decode, so the string can outgrow the raw file).
|
|
34
|
+
*/
|
|
35
|
+
export const MAX_SOURCE_MAP_SIZE_IN_BYTES: number = 50 * 1024 * 1024;
|
|
36
|
+
|
|
37
|
+
/** Lines of context shown on each side of the resolved line. */
|
|
38
|
+
const SNIPPET_CONTEXT_LINES: number = 3;
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* A single line longer than this is not human-authored source (it is
|
|
42
|
+
* almost certainly minified or generated content that leaked into
|
|
43
|
+
* sourcesContent) and would bloat the API response for no debugging value.
|
|
44
|
+
*/
|
|
45
|
+
const MAX_SNIPPET_LINE_LENGTH: number = 512;
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* Ceiling on frames actually resolved per call — stack traces are never
|
|
49
|
+
* this deep, but the frames array is attacker-shaped (parsed from
|
|
50
|
+
* client-supplied stack trace text). Frames past the cap still pass
|
|
51
|
+
* through unresolved so the output length always equals the input length,
|
|
52
|
+
* which the dashboard overlay relies on.
|
|
53
|
+
*/
|
|
54
|
+
const MAX_FRAMES_TO_RESOLVE: number = 500;
|
|
55
|
+
|
|
56
|
+
interface ParsedBundle {
|
|
57
|
+
bundlePath: string;
|
|
58
|
+
normalizedPath: string;
|
|
59
|
+
traceMap: TraceMap;
|
|
60
|
+
sourcesContent: Array<string | null>;
|
|
61
|
+
sources: Array<string | null>;
|
|
62
|
+
resolvedSources: Array<string>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default class SourceMapResolver {
|
|
66
|
+
/**
|
|
67
|
+
* Throws BadDataException unless content parses as a source map v3:
|
|
68
|
+
* a JSON object with version 3 and either a mappings string (plain map)
|
|
69
|
+
* or a sections array (indexed map — resolveFrames flattens these via
|
|
70
|
+
* AnyMap). Canonical validator, shared by the upload endpoint and the
|
|
71
|
+
* model's onBeforeCreate hook.
|
|
72
|
+
*/
|
|
73
|
+
public static validateSourceMapContent(content: string): void {
|
|
74
|
+
let json: {
|
|
75
|
+
version?: unknown;
|
|
76
|
+
mappings?: unknown;
|
|
77
|
+
sections?: unknown;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
json = JSON.parse(content);
|
|
82
|
+
} catch {
|
|
83
|
+
throw new BadDataException("Source map is not valid JSON.");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!json || typeof json !== "object" || Array.isArray(json)) {
|
|
87
|
+
throw new BadDataException("Source map must be a JSON object.");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (json.version !== 3) {
|
|
91
|
+
throw new BadDataException(
|
|
92
|
+
"Source map must be version 3 (the version field must be the number 3).",
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (typeof json.mappings !== "string" && !Array.isArray(json.sections)) {
|
|
97
|
+
throw new BadDataException(
|
|
98
|
+
"Source map must have a mappings string or a sections array.",
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Coerce an untrusted JSON value (an API request body's frames array)
|
|
105
|
+
* into well-typed minified stack frames. Junk entries are dropped;
|
|
106
|
+
* junk fields are normalized. Never throws.
|
|
107
|
+
*/
|
|
108
|
+
public static sanitizeMinifiedStackFrames(
|
|
109
|
+
value: unknown,
|
|
110
|
+
): Array<MinifiedStackFrame> {
|
|
111
|
+
if (!Array.isArray(value)) {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const frames: Array<MinifiedStackFrame> = [];
|
|
116
|
+
|
|
117
|
+
for (const item of value) {
|
|
118
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const raw: Record<string, unknown> = item as Record<string, unknown>;
|
|
123
|
+
|
|
124
|
+
frames.push({
|
|
125
|
+
functionName:
|
|
126
|
+
typeof raw["functionName"] === "string"
|
|
127
|
+
? (raw["functionName"] as string)
|
|
128
|
+
: "",
|
|
129
|
+
fileName:
|
|
130
|
+
typeof raw["fileName"] === "string"
|
|
131
|
+
? (raw["fileName"] as string)
|
|
132
|
+
: "",
|
|
133
|
+
lineNumber:
|
|
134
|
+
typeof raw["lineNumber"] === "number" &&
|
|
135
|
+
Number.isFinite(raw["lineNumber"] as number)
|
|
136
|
+
? (raw["lineNumber"] as number)
|
|
137
|
+
: 0,
|
|
138
|
+
columnNumber:
|
|
139
|
+
typeof raw["columnNumber"] === "number" &&
|
|
140
|
+
Number.isFinite(raw["columnNumber"] as number)
|
|
141
|
+
? (raw["columnNumber"] as number)
|
|
142
|
+
: undefined,
|
|
143
|
+
inApp: Boolean(raw["inApp"]),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return frames;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Normalize a bundle path or stack frame file name for matching:
|
|
152
|
+
* strip URL scheme + host, query string, hash, and leading slashes,
|
|
153
|
+
* so "https://app.example.com/assets/main.js?v=1" and
|
|
154
|
+
* "assets/main.js" compare equal.
|
|
155
|
+
*/
|
|
156
|
+
public static normalizePath(path: string): string {
|
|
157
|
+
let normalized: string = (path || "").trim();
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
* Windows build outputs hand paths like build\static\js\main.js to
|
|
161
|
+
* upload scripts. Frames always carry forward slashes (URLs), so
|
|
162
|
+
* normalize the separator before any other processing.
|
|
163
|
+
*/
|
|
164
|
+
normalized = normalized.replace(/\\/g, "/");
|
|
165
|
+
|
|
166
|
+
// Strip scheme + host of absolute URLs (http, https, webpack, ...).
|
|
167
|
+
const schemeMatch: RegExpMatchArray | null = normalized.match(
|
|
168
|
+
/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//,
|
|
169
|
+
);
|
|
170
|
+
if (schemeMatch) {
|
|
171
|
+
const afterScheme: string = normalized.substring(schemeMatch[0].length);
|
|
172
|
+
const firstSlash: number = afterScheme.indexOf("/");
|
|
173
|
+
normalized = firstSlash >= 0 ? afterScheme.substring(firstSlash) : "";
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Strip query string and hash.
|
|
177
|
+
const queryIndex: number = normalized.indexOf("?");
|
|
178
|
+
if (queryIndex >= 0) {
|
|
179
|
+
normalized = normalized.substring(0, queryIndex);
|
|
180
|
+
}
|
|
181
|
+
const hashIndex: number = normalized.indexOf("#");
|
|
182
|
+
if (hashIndex >= 0) {
|
|
183
|
+
normalized = normalized.substring(0, hashIndex);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Strip leading slashes.
|
|
187
|
+
normalized = normalized.replace(/^\/+/, "");
|
|
188
|
+
|
|
189
|
+
return normalized;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* How well a bundle path matches a stack frame file name: the number of
|
|
194
|
+
* trailing path segments they share, or 0 when the file names differ.
|
|
195
|
+
* Matching is segment-aligned so "main.js" never matches "not-main.js".
|
|
196
|
+
*/
|
|
197
|
+
public static getMatchScore(
|
|
198
|
+
frameFileName: string,
|
|
199
|
+
bundlePath: string,
|
|
200
|
+
): number {
|
|
201
|
+
const frameSegments: Array<string> = SourceMapResolver.normalizePath(
|
|
202
|
+
frameFileName,
|
|
203
|
+
)
|
|
204
|
+
.split("/")
|
|
205
|
+
.filter((s: string) => {
|
|
206
|
+
return s.length > 0;
|
|
207
|
+
});
|
|
208
|
+
const bundleSegments: Array<string> = SourceMapResolver.normalizePath(
|
|
209
|
+
bundlePath,
|
|
210
|
+
)
|
|
211
|
+
.split("/")
|
|
212
|
+
.filter((s: string) => {
|
|
213
|
+
return s.length > 0;
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
if (frameSegments.length === 0 || bundleSegments.length === 0) {
|
|
217
|
+
return 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
let shared: number = 0;
|
|
221
|
+
while (
|
|
222
|
+
shared < frameSegments.length &&
|
|
223
|
+
shared < bundleSegments.length &&
|
|
224
|
+
frameSegments[frameSegments.length - 1 - shared] ===
|
|
225
|
+
bundleSegments[bundleSegments.length - 1 - shared]
|
|
226
|
+
) {
|
|
227
|
+
shared++;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// The file name itself (last segment) must match for any score at all.
|
|
231
|
+
return shared;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Resolve parsed stack frames against a set of uploaded source maps.
|
|
236
|
+
* Frames that cannot be resolved (no matching map, no mapping at that
|
|
237
|
+
* position, malformed map) pass through unchanged with resolved: false —
|
|
238
|
+
* resolution must never make a stack trace worse than the minified one.
|
|
239
|
+
*/
|
|
240
|
+
public static resolveFrames(
|
|
241
|
+
frames: Array<MinifiedStackFrame>,
|
|
242
|
+
bundles: Array<SourceMapBundle>,
|
|
243
|
+
): Array<ResolvedStackFrame> {
|
|
244
|
+
const parsedBundleCache: Map<string, ParsedBundle | null> = new Map();
|
|
245
|
+
|
|
246
|
+
type ParseBundleFunction = (bundle: SourceMapBundle) => ParsedBundle | null;
|
|
247
|
+
|
|
248
|
+
const parseBundle: ParseBundleFunction = (
|
|
249
|
+
bundle: SourceMapBundle,
|
|
250
|
+
): ParsedBundle | null => {
|
|
251
|
+
if (parsedBundleCache.has(bundle.bundlePath)) {
|
|
252
|
+
return parsedBundleCache.get(bundle.bundlePath) || null;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
let parsed: ParsedBundle | null = null;
|
|
256
|
+
|
|
257
|
+
try {
|
|
258
|
+
/*
|
|
259
|
+
* AnyMap, not TraceMap: it accepts both plain v3 maps and indexed
|
|
260
|
+
* ("sections") maps — which the upload validator deliberately
|
|
261
|
+
* admits — and flattens the latter, exposing the combined
|
|
262
|
+
* sources / resolvedSources / sourcesContent.
|
|
263
|
+
*/
|
|
264
|
+
const traceMap: TraceMap = new AnyMap(bundle.content);
|
|
265
|
+
|
|
266
|
+
parsed = {
|
|
267
|
+
bundlePath: bundle.bundlePath,
|
|
268
|
+
normalizedPath: SourceMapResolver.normalizePath(bundle.bundlePath),
|
|
269
|
+
traceMap: traceMap,
|
|
270
|
+
sourcesContent: Array.isArray(traceMap.sourcesContent)
|
|
271
|
+
? traceMap.sourcesContent
|
|
272
|
+
: [],
|
|
273
|
+
sources: Array.isArray(traceMap.sources) ? traceMap.sources : [],
|
|
274
|
+
resolvedSources: Array.isArray(traceMap.resolvedSources)
|
|
275
|
+
? traceMap.resolvedSources
|
|
276
|
+
: [],
|
|
277
|
+
};
|
|
278
|
+
} catch {
|
|
279
|
+
// Malformed map — treat as absent.
|
|
280
|
+
parsed = null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
parsedBundleCache.set(bundle.bundlePath, parsed);
|
|
284
|
+
return parsed;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const results: Array<ResolvedStackFrame> = [];
|
|
288
|
+
|
|
289
|
+
for (let i: number = 0; i < frames.length; i++) {
|
|
290
|
+
const frame: MinifiedStackFrame = frames[i]!;
|
|
291
|
+
|
|
292
|
+
if (i < MAX_FRAMES_TO_RESOLVE) {
|
|
293
|
+
results.push(
|
|
294
|
+
SourceMapResolver.resolveFrame(frame, bundles, parseBundle),
|
|
295
|
+
);
|
|
296
|
+
} else {
|
|
297
|
+
/*
|
|
298
|
+
* Past the resolution budget: pass through unresolved rather than
|
|
299
|
+
* truncating, so callers always get one output frame per input
|
|
300
|
+
* frame (the dashboard overlay discards length-mismatched
|
|
301
|
+
* responses wholesale).
|
|
302
|
+
*/
|
|
303
|
+
results.push({ ...frame, resolved: false });
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return results;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
private static resolveFrame(
|
|
311
|
+
frame: MinifiedStackFrame,
|
|
312
|
+
bundles: Array<SourceMapBundle>,
|
|
313
|
+
parseBundle: (bundle: SourceMapBundle) => ParsedBundle | null,
|
|
314
|
+
): ResolvedStackFrame {
|
|
315
|
+
const unresolved: ResolvedStackFrame = {
|
|
316
|
+
...frame,
|
|
317
|
+
resolved: false,
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
if (!frame.fileName || !frame.lineNumber || frame.lineNumber < 1) {
|
|
321
|
+
return unresolved;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Pick the bundle whose path shares the most trailing segments.
|
|
325
|
+
let bestBundle: SourceMapBundle | null = null;
|
|
326
|
+
let bestScore: number = 0;
|
|
327
|
+
|
|
328
|
+
for (const bundle of bundles) {
|
|
329
|
+
const score: number = SourceMapResolver.getMatchScore(
|
|
330
|
+
frame.fileName,
|
|
331
|
+
bundle.bundlePath,
|
|
332
|
+
);
|
|
333
|
+
if (score > bestScore) {
|
|
334
|
+
bestScore = score;
|
|
335
|
+
bestBundle = bundle;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if (!bestBundle) {
|
|
340
|
+
return unresolved;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const parsed: ParsedBundle | null = parseBundle(bestBundle);
|
|
344
|
+
|
|
345
|
+
if (!parsed) {
|
|
346
|
+
return unresolved;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
try {
|
|
350
|
+
/*
|
|
351
|
+
* trace-mapping expects a 1-based line and a 0-based column, while
|
|
352
|
+
* JS stack traces (and StackTraceParser) carry 1-based columns.
|
|
353
|
+
* Frames without a column (some runtimes omit it) probe column 0 —
|
|
354
|
+
* for the typical fully-minified single-line bundle every mapping
|
|
355
|
+
* is on line 1 anyway, so this still lands on a real segment often
|
|
356
|
+
* enough to be worth trying.
|
|
357
|
+
*/
|
|
358
|
+
const position: {
|
|
359
|
+
source: string | null;
|
|
360
|
+
line: number | null;
|
|
361
|
+
column: number | null;
|
|
362
|
+
name: string | null;
|
|
363
|
+
} = originalPositionFor(parsed.traceMap, {
|
|
364
|
+
line: frame.lineNumber,
|
|
365
|
+
column: Math.max(0, (frame.columnNumber || 1) - 1),
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
if (!position.source || position.line === null) {
|
|
369
|
+
return unresolved;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
const originalFileName: string = SourceMapResolver.cleanSourcePath(
|
|
373
|
+
position.source,
|
|
374
|
+
);
|
|
375
|
+
|
|
376
|
+
return {
|
|
377
|
+
...frame,
|
|
378
|
+
resolved: true,
|
|
379
|
+
originalFileName: originalFileName,
|
|
380
|
+
originalLineNumber: position.line,
|
|
381
|
+
originalColumnNumber:
|
|
382
|
+
position.column !== null ? position.column + 1 : undefined,
|
|
383
|
+
originalFunctionName: position.name || undefined,
|
|
384
|
+
sourceCodeSnippet: SourceMapResolver.extractSnippet(
|
|
385
|
+
parsed,
|
|
386
|
+
position.source,
|
|
387
|
+
position.line,
|
|
388
|
+
),
|
|
389
|
+
/*
|
|
390
|
+
* A frame that maps back to original source is application code
|
|
391
|
+
* unless the original path says otherwise (bundled dependencies
|
|
392
|
+
* keep their node_modules path in the map).
|
|
393
|
+
*/
|
|
394
|
+
inApp: !originalFileName.includes("node_modules/"),
|
|
395
|
+
};
|
|
396
|
+
} catch {
|
|
397
|
+
return unresolved;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Strip bundler scheme prefixes (webpack://, rollup://, vite/deps
|
|
403
|
+
* paths...) and leading ./ or ../ noise from an original source path.
|
|
404
|
+
*/
|
|
405
|
+
public static cleanSourcePath(sourcePath: string): string {
|
|
406
|
+
let cleaned: string = sourcePath;
|
|
407
|
+
|
|
408
|
+
// webpack://my-app/./src/foo.ts → ./src/foo.ts
|
|
409
|
+
const schemeMatch: RegExpMatchArray | null = cleaned.match(
|
|
410
|
+
/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//,
|
|
411
|
+
);
|
|
412
|
+
if (schemeMatch) {
|
|
413
|
+
const afterScheme: string = cleaned.substring(schemeMatch[0].length);
|
|
414
|
+
const firstSlash: number = afterScheme.indexOf("/");
|
|
415
|
+
cleaned = firstSlash >= 0 ? afterScheme.substring(firstSlash + 1) : "";
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// ./src/foo.ts → src/foo.ts ; ../../src/foo.ts → src/foo.ts
|
|
419
|
+
cleaned = cleaned.replace(/^(\.\.?\/)+/, "");
|
|
420
|
+
|
|
421
|
+
return cleaned || sourcePath;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
private static extractSnippet(
|
|
425
|
+
parsed: ParsedBundle,
|
|
426
|
+
source: string,
|
|
427
|
+
line: number,
|
|
428
|
+
): SourceCodeSnippet | undefined {
|
|
429
|
+
if (!parsed.sourcesContent || parsed.sourcesContent.length === 0) {
|
|
430
|
+
return undefined;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/*
|
|
434
|
+
* originalPositionFor returns the source as it appears after sourceRoot
|
|
435
|
+
* resolution, so look it up in resolvedSources first, then fall back to
|
|
436
|
+
* the raw sources array (maps without sourceRoot).
|
|
437
|
+
*/
|
|
438
|
+
let index: number = parsed.resolvedSources.indexOf(source);
|
|
439
|
+
if (index < 0) {
|
|
440
|
+
index = parsed.sources.indexOf(source);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (index < 0 || index >= parsed.sourcesContent.length) {
|
|
444
|
+
return undefined;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
const content: string | null = parsed.sourcesContent[index] ?? null;
|
|
448
|
+
|
|
449
|
+
if (typeof content !== "string" || content.length === 0) {
|
|
450
|
+
return undefined;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const allLines: Array<string> = content.split("\n");
|
|
454
|
+
|
|
455
|
+
if (line < 1 || line > allLines.length) {
|
|
456
|
+
return undefined;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const startLine: number = Math.max(1, line - SNIPPET_CONTEXT_LINES);
|
|
460
|
+
const endLine: number = Math.min(
|
|
461
|
+
allLines.length,
|
|
462
|
+
line + SNIPPET_CONTEXT_LINES,
|
|
463
|
+
);
|
|
464
|
+
|
|
465
|
+
const snippetLines: Array<string> = [];
|
|
466
|
+
for (let i: number = startLine; i <= endLine; i++) {
|
|
467
|
+
let text: string = allLines[i - 1] || "";
|
|
468
|
+
if (text.length > MAX_SNIPPET_LINE_LENGTH) {
|
|
469
|
+
text = text.substring(0, MAX_SNIPPET_LINE_LENGTH) + "…";
|
|
470
|
+
}
|
|
471
|
+
snippetLines.push(text);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return {
|
|
475
|
+
startLine: startLine,
|
|
476
|
+
lines: snippetLines,
|
|
477
|
+
highlightLine: line,
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import Hostname from "../../Types/API/Hostname";
|
|
2
|
+
import Protocol from "../../Types/API/Protocol";
|
|
3
|
+
import Route from "../../Types/API/Route";
|
|
4
|
+
import URL from "../../Types/API/URL";
|
|
5
|
+
import OneUptimeDate from "../../Types/Date";
|
|
6
|
+
import EmailTemplateType from "../../Types/Email/EmailTemplateType";
|
|
7
|
+
import ObjectID from "../../Types/ObjectID";
|
|
8
|
+
import { DashboardRoute } from "../../ServiceRoute";
|
|
9
|
+
import User from "../../Models/DatabaseModels/User";
|
|
10
|
+
import DatabaseConfig from "../DatabaseConfig";
|
|
11
|
+
import MailService from "../Services/MailService";
|
|
12
|
+
import UserService from "../Services/UserService";
|
|
13
|
+
import logger from "./Logger";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Tell the account holder, at their own address, that a set of recovery codes
|
|
17
|
+
* was just created for them.
|
|
18
|
+
*
|
|
19
|
+
* WHY THIS EXISTS AT ALL
|
|
20
|
+
*
|
|
21
|
+
* Backup codes are sign-in credentials. The self-service regenerate route has
|
|
22
|
+
* always mailed the owner when a set changed -- not to prevent anything, but
|
|
23
|
+
* so that a change the owner did not make is VISIBLE to them, at an address
|
|
24
|
+
* rather than in the browser that made it. Enrolment now mints codes too, and
|
|
25
|
+
* it mints them on a route authenticated by a session alone: somebody holding
|
|
26
|
+
* a stolen session can register a security key of their own and walk away with
|
|
27
|
+
* ten recovery codes for an account they do not own. Without this mail the
|
|
28
|
+
* real owner finds out at the sign-in they cannot complete.
|
|
29
|
+
*
|
|
30
|
+
* NOTHING SENSITIVE TRAVELS. The codes themselves are never mailed -- a count
|
|
31
|
+
* and a timestamp, and a link to the page where the owner can replace the set.
|
|
32
|
+
* Mailing a recovery credential would hand the account to whoever later reads
|
|
33
|
+
* the mailbox, which is exactly the second factor's job to prevent.
|
|
34
|
+
*
|
|
35
|
+
* NEVER FATAL. Every caller invokes this without awaiting it. The codes are
|
|
36
|
+
* already written and already on their way to the user's screen by the time it
|
|
37
|
+
* runs, so an unreachable mail server must not fail the request that carries
|
|
38
|
+
* the only copy of them.
|
|
39
|
+
*/
|
|
40
|
+
export default class TwoFactorBackupCodeNotification {
|
|
41
|
+
public static async sendCodesCreatedEmail(data: {
|
|
42
|
+
userId: ObjectID;
|
|
43
|
+
codeCount: number;
|
|
44
|
+
}): Promise<void> {
|
|
45
|
+
/*
|
|
46
|
+
* The address is read off the account rather than taken from the caller.
|
|
47
|
+
* The caller proved which user they are; it did not prove where that
|
|
48
|
+
* user's mail should go, and this notice is worth nothing if it can be
|
|
49
|
+
* pointed somewhere else.
|
|
50
|
+
*/
|
|
51
|
+
const user: User | null = await UserService.findOneById({
|
|
52
|
+
id: data.userId,
|
|
53
|
+
select: {
|
|
54
|
+
email: true,
|
|
55
|
+
},
|
|
56
|
+
props: {
|
|
57
|
+
isRoot: true,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
if (!user || !user.email) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const host: Hostname = await DatabaseConfig.getHost();
|
|
66
|
+
const httpProtocol: Protocol = await DatabaseConfig.getHttpProtocol();
|
|
67
|
+
|
|
68
|
+
await MailService.sendMail({
|
|
69
|
+
toEmail: user.email,
|
|
70
|
+
subject: "Backup codes were created for your OneUptime account",
|
|
71
|
+
templateType: EmailTemplateType.TwoFactorBackupCodesCreated,
|
|
72
|
+
vars: {
|
|
73
|
+
generatedAt: OneUptimeDate.getCurrentDateAsFormattedString(),
|
|
74
|
+
newCodeCount: data.codeCount.toString(),
|
|
75
|
+
twoFactorAuthUrl: new URL(
|
|
76
|
+
httpProtocol,
|
|
77
|
+
host,
|
|
78
|
+
new Route(DashboardRoute.toString()).addRoute(
|
|
79
|
+
"/user-profile/two-factor-auth",
|
|
80
|
+
),
|
|
81
|
+
).toString(),
|
|
82
|
+
homeUrl: new URL(httpProtocol, host).toString(),
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Fire-and-forget wrapper, so a caller does not have to repeat the same
|
|
89
|
+
* detached-and-logged shape at every mint site.
|
|
90
|
+
*
|
|
91
|
+
* Deliberately returns void rather than the promise: a caller holding one
|
|
92
|
+
* would be tempted to await it, and awaiting is the thing this must never
|
|
93
|
+
* do. The mint sites run inside requests whose response carries the only
|
|
94
|
+
* copy of the codes.
|
|
95
|
+
*/
|
|
96
|
+
public static notifyCodesCreated(data: {
|
|
97
|
+
userId: ObjectID;
|
|
98
|
+
codeCount: number;
|
|
99
|
+
}): void {
|
|
100
|
+
TwoFactorBackupCodeNotification.sendCodesCreatedEmail(data).catch(
|
|
101
|
+
(err: Error) => {
|
|
102
|
+
logger.error(err);
|
|
103
|
+
},
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
package/Server/Utils/VM/VMAPI.ts
CHANGED
|
@@ -11,6 +11,9 @@ export default class VMUtil {
|
|
|
11
11
|
options: {
|
|
12
12
|
args?: JSONObject | undefined;
|
|
13
13
|
timeout?: number;
|
|
14
|
+
// See VMRunner.runCodeInSandbox — decided by the caller, not here.
|
|
15
|
+
allowPrivateNetworkRequests?: boolean | undefined;
|
|
16
|
+
privateNetworkHint?: string | undefined;
|
|
14
17
|
};
|
|
15
18
|
}): Promise<ReturnResult> {
|
|
16
19
|
return VMRunner.runCodeInSandbox(data);
|
|
@@ -61,6 +61,22 @@ export default class VMRunner {
|
|
|
61
61
|
options: {
|
|
62
62
|
timeout?: number;
|
|
63
63
|
args?: JSONObject | undefined;
|
|
64
|
+
/*
|
|
65
|
+
* Passed straight through to the SSRF guard on the axios bridge below.
|
|
66
|
+
* Decided by the CALLER, never here: this runner is shared between the
|
|
67
|
+
* workflow Custom JavaScript component, where the policy comes from the
|
|
68
|
+
* API server's environment, and the Probe's custom code monitor, where
|
|
69
|
+
* it comes from the probe's own environment — a different process on a
|
|
70
|
+
* different machine, usually owned by a different person. Absent ⇒ the
|
|
71
|
+
* strict policy, which is what a caller that says nothing should get.
|
|
72
|
+
*/
|
|
73
|
+
allowPrivateNetworkRequests?: boolean | undefined;
|
|
74
|
+
/*
|
|
75
|
+
* Overrides the sentence a private-tier refusal appends, telling the
|
|
76
|
+
* operator which setting would permit it. Whoever runs this sandbox
|
|
77
|
+
* knows which process's environment that is; the guard does not.
|
|
78
|
+
*/
|
|
79
|
+
privateNetworkHint?: string | undefined;
|
|
64
80
|
};
|
|
65
81
|
}): Promise<ReturnResult> {
|
|
66
82
|
const { code, options } = data;
|
|
@@ -419,7 +435,17 @@ export default class VMRunner {
|
|
|
419
435
|
config,
|
|
420
436
|
});
|
|
421
437
|
|
|
422
|
-
await SSRFProtection.validateWebhookTargetIsSafe(effectiveUrl
|
|
438
|
+
await SSRFProtection.validateWebhookTargetIsSafe(effectiveUrl, {
|
|
439
|
+
allowPrivateNetworkTargets:
|
|
440
|
+
options.allowPrivateNetworkRequests === true,
|
|
441
|
+
/*
|
|
442
|
+
* "Webhook URL" is wrong here in both directions: sandboxed code
|
|
443
|
+
* requests whatever it likes, and one of this runner's two callers
|
|
444
|
+
* is a monitor, not a webhook.
|
|
445
|
+
*/
|
|
446
|
+
targetLabel: "Request URL",
|
|
447
|
+
privateNetworkHint: options.privateNetworkHint,
|
|
448
|
+
});
|
|
423
449
|
|
|
424
450
|
/*
|
|
425
451
|
* The URL that was just validated has to be the URL that gets
|
|
@@ -44,6 +44,29 @@ export const VendorAssetsPath: string = path.resolve(
|
|
|
44
44
|
"Vendor",
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* OneUptime's own brand images, served under the same prefix.
|
|
49
|
+
*
|
|
50
|
+
* Not third-party, so they do not belong in Static/Vendor, but they have the
|
|
51
|
+
* identical problem: the server-rendered pages that carry the logo (the on-call
|
|
52
|
+
* acknowledge page, the SSO message page) come out of the App container, and
|
|
53
|
+
* `/img/...` is served by Home. nginx sends "/" to App on every install with
|
|
54
|
+
* billing off - which is every self-hosted install - so the logo those pages
|
|
55
|
+
* asked for 404'd and rendered as a broken image.
|
|
56
|
+
* See https://github.com/OneUptime/oneuptime/issues/3457.
|
|
57
|
+
*/
|
|
58
|
+
export const BrandAssetsRouteSegment: string = "brand";
|
|
59
|
+
|
|
60
|
+
export const BrandAssetsPath: string = path.resolve(
|
|
61
|
+
__dirname,
|
|
62
|
+
"..",
|
|
63
|
+
"Static",
|
|
64
|
+
"Brand",
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
/** Host-relative URL of the OneUptime wordmark, for use in a view's <img src>. */
|
|
68
|
+
export const OneUptimeLogoUrl: string = `${VendorAssetsRoute}/${BrandAssetsRouteSegment}/oneuptime-logo.svg`;
|
|
69
|
+
|
|
47
70
|
/**
|
|
48
71
|
* Mermaid is a dependency of Common already (Common/UI renders diagrams in
|
|
49
72
|
* markdown with it), so it is on disk in every image and there is no reason to
|
|
@@ -114,6 +137,25 @@ const mountVendorAssets: MountVendorAssetsFunction = (
|
|
|
114
137
|
);
|
|
115
138
|
}
|
|
116
139
|
|
|
140
|
+
if (fs.existsSync(BrandAssetsPath)) {
|
|
141
|
+
/*
|
|
142
|
+
* Revalidating rather than immutable: the filename carries no version, so
|
|
143
|
+
* a rebrand must not be stuck behind a year-old cache entry.
|
|
144
|
+
*/
|
|
145
|
+
app.use(
|
|
146
|
+
`${VendorAssetsRoute}/${BrandAssetsRouteSegment}`,
|
|
147
|
+
ExpressStatic(BrandAssetsPath, {
|
|
148
|
+
maxAge: REVALIDATE_CACHE_MAX_AGE_MILLISECONDS,
|
|
149
|
+
index: false,
|
|
150
|
+
redirect: false,
|
|
151
|
+
}) as RequestHandler,
|
|
152
|
+
);
|
|
153
|
+
} else {
|
|
154
|
+
logger.error(
|
|
155
|
+
`OneUptime brand images are missing at ${BrandAssetsPath}. Server-rendered pages will render without a logo.`,
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
117
159
|
const mermaidDistPath: string | null = getMermaidDistPath();
|
|
118
160
|
|
|
119
161
|
if (mermaidDistPath) {
|