@oneuptime/common 12.0.14 → 12.0.16
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 +10 -0
- package/Models/AnalyticsModels/LogCountBaseline.ts +174 -0
- package/Models/AnalyticsModels/SecurityEvent.ts +794 -0
- package/Models/AnalyticsModels/Span.ts +29 -1
- package/Models/AnalyticsModels/SpanCountBaseline.ts +198 -0
- package/Models/DatabaseModels/Alert.ts +42 -0
- package/Models/DatabaseModels/AlertMeasurement.ts +1114 -0
- package/Models/DatabaseModels/AlertMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/AlertStateTimeline.ts +10 -2
- package/Models/DatabaseModels/BillingPaymentMethod.ts +8 -10
- package/Models/DatabaseModels/DetectionRule.ts +487 -0
- package/Models/DatabaseModels/GlobalOidc.ts +20 -0
- package/Models/DatabaseModels/GlobalSso.ts +20 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +382 -0
- package/Models/DatabaseModels/Incident.ts +42 -0
- package/Models/DatabaseModels/IncidentMeasurement.ts +1114 -0
- package/Models/DatabaseModels/IncidentMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +10 -2
- package/Models/DatabaseModels/IncomingCallPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/IncomingCallPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Index.ts +20 -0
- package/Models/DatabaseModels/Label.ts +11 -0
- package/Models/DatabaseModels/LlmCostBudget.ts +655 -0
- package/Models/DatabaseModels/LlmModelPrice.ts +481 -0
- package/Models/DatabaseModels/LogSavedView.ts +87 -0
- package/Models/DatabaseModels/MarketingConversion.ts +222 -10
- package/Models/DatabaseModels/MetricSavedView.ts +59 -0
- package/Models/DatabaseModels/NetworkDeviceLinkRule.ts +46 -0
- package/Models/DatabaseModels/OnCallDutyPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Probe.ts +21 -0
- package/Models/DatabaseModels/RunbookLabelRule.ts +36 -0
- package/Models/DatabaseModels/RunbookOwnerRule.ts +42 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.ts +1104 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.ts +491 -0
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +10 -2
- package/Models/DatabaseModels/StatusPage.ts +7 -4
- package/Models/DatabaseModels/StatusPageLabelRule.ts +36 -0
- package/Models/DatabaseModels/StatusPageOwnerRule.ts +42 -0
- package/Models/DatabaseModels/TableView.ts +15 -0
- package/Models/DatabaseModels/Team.ts +13 -0
- package/Models/DatabaseModels/TeamMember.ts +8 -0
- package/Models/DatabaseModels/TraceSavedView.ts +52 -0
- package/Models/DatabaseModels/WorkflowLabelRule.ts +36 -0
- package/Models/DatabaseModels/WorkflowOwnerRule.ts +42 -0
- package/Server/API/StatusPageAPI.ts +29 -4
- package/Server/API/TelemetryAPI.ts +252 -6
- package/Server/API/UserAPI.ts +88 -0
- package/Server/EnvironmentConfig.ts +43 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787800000000-AddScopeToNetworkDeviceLinkRule.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787900000000-AddRestrictToAttachedProjectsToGlobalSso.ts +40 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.ts +88 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.ts +457 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.ts +45 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.ts +77 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
- package/Server/Middleware/IdentityRateLimit.ts +672 -0
- package/Server/Middleware/SlackAuthorization.ts +43 -6
- package/Server/Middleware/UserAuthorization.ts +236 -26
- package/Server/Middleware/WhatsAppAuthorization.ts +43 -3
- package/Server/Services/AccessTokenService.ts +15 -2
- package/Server/Services/AlertMeasurementService.ts +302 -0
- package/Server/Services/AlertMeasurementValueService.ts +508 -0
- package/Server/Services/AlertService.ts +50 -0
- package/Server/Services/AlertStateTimelineService.ts +54 -0
- package/Server/Services/DetectionRuleService.ts +74 -0
- package/Server/Services/GlobalOidcProjectService.ts +126 -1
- package/Server/Services/GlobalOidcService.ts +132 -0
- package/Server/Services/GlobalSsoProjectService.ts +126 -1
- package/Server/Services/GlobalSsoService.ts +132 -0
- package/Server/Services/GoogleSecOpsConnectionService.ts +89 -0
- package/Server/Services/IncidentMeasurementService.ts +304 -0
- package/Server/Services/IncidentMeasurementValueService.ts +523 -0
- package/Server/Services/IncidentService.ts +51 -0
- package/Server/Services/IncidentStateTimelineService.ts +54 -0
- package/Server/Services/Index.ts +30 -0
- package/Server/Services/LlmCostBudgetService.ts +93 -0
- package/Server/Services/LlmModelPriceService.ts +202 -0
- package/Server/Services/LogAggregationService.ts +1106 -2
- package/Server/Services/LogCountBaselineService.ts +163 -0
- package/Server/Services/MutableMetricService.ts +30 -9
- package/Server/Services/ScheduledMaintenanceMeasurementService.ts +311 -0
- package/Server/Services/ScheduledMaintenanceMeasurementValueService.ts +546 -0
- package/Server/Services/ScheduledMaintenanceService.ts +53 -0
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +188 -1
- package/Server/Services/SecurityEventService.ts +104 -0
- package/Server/Services/SpanCountBaselineService.ts +173 -0
- package/Server/Services/StatusPageService.ts +4 -3
- package/Server/Services/TelemetryUsageBillingService.ts +17 -2
- package/Server/Services/UserEmailService.ts +4 -4
- package/Server/Services/UserService.ts +284 -51
- package/Server/Services/UserTotpAuthService.ts +27 -86
- package/Server/Services/UserWebAuthnService.ts +26 -86
- package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +14 -0
- package/Server/Types/Database/Permissions/TenantPermission.ts +10 -0
- package/Server/Types/Database/QueryHelper.ts +1 -1
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +1 -1
- package/Server/Utils/AI/Toolbox/Index.ts +6 -0
- package/Server/Utils/AI/Toolbox/SecurityEventTools.ts +349 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +13 -4
- package/Server/Utils/Attribution.ts +130 -34
- package/Server/Utils/CronTab.ts +73 -0
- package/Server/Utils/GlobalSsoAuthorization.ts +175 -0
- package/Server/Utils/Marketing/ConversionUploadProvider.ts +123 -11
- package/Server/Utils/Marketing/Providers/GoogleAds.ts +71 -8
- package/Server/Utils/Marketing/Providers/LinkedIn.ts +55 -17
- package/Server/Utils/Marketing/Providers/Meta.ts +53 -19
- package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +38 -11
- package/Server/Utils/Marketing/Providers/Reddit.ts +46 -16
- package/Server/Utils/Measurement/MeasurementDefinitionValidator.ts +209 -0
- package/Server/Utils/Measurement/MeasurementMetricWriter.ts +189 -0
- package/Server/Utils/Monitor/Criteria/APIRequestCriteria.ts +48 -33
- package/Server/Utils/Monitor/Criteria/CountAnomaly.ts +182 -0
- package/Server/Utils/Monitor/Criteria/DnsMonitorCriteria.ts +35 -30
- package/Server/Utils/Monitor/Criteria/DomainMonitorCriteria.ts +33 -28
- package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +475 -47
- package/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.ts +35 -30
- package/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.ts +34 -28
- package/Server/Utils/Monitor/Criteria/LogMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.ts +33 -28
- package/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.ts +35 -0
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +69 -40
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +35 -29
- package/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/DataToProcess.ts +2 -0
- package/Server/Utils/Monitor/MonitorCriteriaDataExtractor.ts +14 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +23 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +20 -0
- package/Server/Utils/Monitor/MonitorResource.ts +177 -21
- package/Server/Utils/Monitor/MonitorStepResourceIdentity.ts +1 -0
- package/Server/Utils/Monitor/MonitorStepsReferenceExtractor.ts +1 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +548 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.ts +262 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +212 -0
- package/Server/Utils/SecurityEvent/SecurityEventRow.ts +101 -0
- package/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.ts +635 -0
- package/Server/Utils/StatusPageContentSecurityPolicy.ts +56 -0
- package/Server/Utils/StatusPageCustomizationAccess.ts +117 -0
- package/Server/Utils/Telemetry/LlmCostBudgetEvaluator.ts +379 -0
- package/Server/Utils/Telemetry/LlmSpan.ts +83 -4
- package/Server/Utils/Telemetry/LogErrorPatternSql.ts +136 -0
- package/Server/Utils/UserPermission/UserPermission.ts +57 -1
- package/Tests/App/Dashboard/AlertsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/CreatePageEntryPointPermissions.test.tsx +306 -0
- package/Tests/App/Dashboard/DangerZone.test.tsx +11 -0
- package/Tests/App/Dashboard/IncidentsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/LogMonitorAttributeOperatorPreview.test.tsx +459 -0
- package/Tests/App/Dashboard/OverviewCustomFields.test.tsx +24 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceSideMenu.test.tsx +6 -0
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +323 -0
- package/Tests/Models/DatabaseModels/ProjectSharedResources.test.ts +386 -0
- package/Tests/Server/API/LogErrorPatternAPI.test.ts +811 -0
- package/Tests/Server/API/StatusPageCustomizationOrigin.test.ts +348 -0
- package/Tests/Server/API/UserAuthenticationAPI.test.ts +11 -0
- package/Tests/Server/API/UserProjectsAPI.test.ts +11 -2
- package/Tests/Server/API/UserTwoFactorAuthAdminAPI.test.ts +918 -0
- package/Tests/Server/Infrastructure/LocalCache.test.ts +149 -0
- package/Tests/Server/Infrastructure/Postgres/FixTotpOtpUrlAlgorithmMigration.test.ts +9 -59
- package/Tests/Server/Infrastructure/Postgres/SchemaMigrationsOrdering.test.ts +227 -0
- package/Tests/Server/Middleware/SlackAuthorization.test.ts +149 -0
- package/Tests/Server/Middleware/UserAuthorization.test.ts +27 -13
- package/Tests/Server/Middleware/UserAuthorizationGlobalSsoGovernance.test.ts +1455 -0
- package/Tests/Server/Middleware/UserAuthorizationSSOProvider.test.ts +91 -2
- package/Tests/Server/Middleware/WhatsAppAuthorization.test.ts +233 -0
- package/Tests/Server/Services/AccessTokenProjectUserGrant.test.ts +249 -0
- package/Tests/Server/Services/AlertMeasurementService.test.ts +665 -0
- package/Tests/Server/Services/AlertMeasurementValueService.test.ts +389 -0
- package/Tests/Server/Services/DetectionRuleService.test.ts +254 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +21 -8
- package/Tests/Server/Services/GlobalSsoProviderAuthorization.test.ts +1242 -0
- package/Tests/Server/Services/IncidentMeasurementService.test.ts +394 -0
- package/Tests/Server/Services/IncidentMeasurementValueService.test.ts +816 -0
- package/Tests/Server/Services/LlmCostBudgetService.test.ts +104 -0
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +405 -0
- package/Tests/Server/Services/LogErrorPatternAggregation.test.ts +804 -0
- package/Tests/Server/Services/MonitorResourceProbeAgreementHydration.test.ts +459 -0
- package/Tests/Server/Services/MonitorResourceProbeAgreementReuse.test.ts +10 -0
- package/Tests/Server/Services/MutableMetricNameRouting.test.ts +83 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementService.test.ts +750 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementValueService.test.ts +478 -0
- package/Tests/Server/Services/UserAuthenticationService.test.ts +216 -4
- package/Tests/Server/Services/UserTwoFactorAuthAdmin.test.ts +1190 -0
- package/Tests/Server/Types/AnalyticsDatabase/AggregateUtilBucketTimestamp.test.ts +416 -0
- package/Tests/Server/Types/Database/Permissions/ScopedRoleSharedResourceAccess.test.ts +466 -0
- package/Tests/Server/Types/Database/QueryHelperManyToManyAndEmptyValues.test.ts +551 -0
- package/Tests/Server/Types/Database/QueryHelperOperators.test.ts +265 -0
- package/Tests/Server/Types/Database/QueryHelperTextAndStructuralOperators.test.ts +206 -0
- package/Tests/Server/Types/Database/SelectUtil.test.ts +348 -0
- package/Tests/Server/Utils/AnalyticsDatabase/ClusterAwareSchema.test.ts +6 -0
- package/Tests/Server/Utils/AnalyticsDatabase/FractionalAttributeThreshold.test.ts +224 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +172 -2
- package/Tests/Server/Utils/Attribution.test.ts +228 -1
- package/Tests/Server/Utils/CronTab.test.ts +116 -0
- package/Tests/Server/Utils/GlobalSSOToken.test.ts +581 -0
- package/Tests/Server/Utils/GlobalSsoAuthorization.test.ts +1401 -0
- package/Tests/Server/Utils/Marketing/AdUploadableConversionTypes.test.ts +315 -0
- package/Tests/Server/Utils/Marketing/ConversionUploadProvider.test.ts +124 -7
- package/Tests/Server/Utils/Marketing/GoogleAds.test.ts +253 -1
- package/Tests/Server/Utils/Marketing/LinkedIn.test.ts +282 -0
- package/Tests/Server/Utils/Marketing/Meta.test.ts +304 -0
- package/Tests/Server/Utils/Marketing/MicrosoftAds.test.ts +263 -0
- package/Tests/Server/Utils/Marketing/Reddit.test.ts +259 -0
- package/Tests/Server/Utils/Measurement/MeasurementDefinitionValidator.test.ts +322 -0
- package/Tests/Server/Utils/Measurement/MeasurementMetricWriter.test.ts +373 -0
- package/Tests/Server/Utils/Monitor/Criteria/APIRequestCriteriaEvaluateOverTime.test.ts +508 -0
- package/Tests/Server/Utils/Monitor/Criteria/APIRequestCriteriaPortTimings.test.ts +30 -9
- package/Tests/Server/Utils/Monitor/Criteria/CountAnomaly.test.ts +221 -0
- package/Tests/Server/Utils/Monitor/Criteria/EvaluateOverTime.test.ts +987 -0
- package/Tests/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.test.ts +916 -0
- package/Tests/Server/Utils/Monitor/Criteria/LogMonitorCriteria.test.ts +236 -0
- package/Tests/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.test.ts +382 -0
- package/Tests/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.test.ts +147 -0
- package/Tests/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.test.ts +1219 -0
- package/Tests/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.test.ts +274 -0
- package/Tests/Server/Utils/Monitor/MonitorResourceIngestedStepSelection.test.ts +86 -0
- package/Tests/Server/Utils/Monitor/SecurityEventsMonitorDataExtractor.test.ts +93 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +660 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsClient.test.ts +308 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +271 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventRow.test.ts +272 -0
- package/Tests/Server/Utils/SecurityEvent/SigmaClickhouseCompiler.test.ts +511 -0
- package/Tests/Server/Utils/StatusPageContentSecurityPolicy.test.ts +136 -0
- package/Tests/Server/Utils/StatusPageCustomizationAccess.test.ts +223 -0
- package/Tests/Server/Utils/Telemetry/LlmCostBudgetEvaluator.test.ts +497 -0
- package/Tests/Server/Utils/Telemetry/LlmSpan.test.ts +380 -0
- package/Tests/Server/Utils/Telemetry/LogErrorPatternSql.test.ts +207 -0
- package/Tests/Server/Utils/UserPermission/ProjectUserGrant.test.ts +293 -0
- package/Tests/Types/Monitor/MonitorStepConfigHelpers.test.ts +165 -0
- package/Tests/Types/Monitor/MonitorStepInfraMonitorUtils.test.ts +194 -0
- package/Tests/Types/Monitor/MonitorStepSecurityEventsMonitor.test.ts +201 -0
- package/Tests/Types/NetworkDevice/NetworkDeviceLinkRuleScope.test.ts +215 -0
- package/Tests/Types/SecurityEvent/OcsfEventClass.test.ts +105 -0
- package/Tests/Types/SecurityEvent/OcsfSeverity.test.ts +111 -0
- package/Tests/Types/Telemetry/LlmCostCatalog.test.ts +516 -0
- package/Tests/UI/Components/ActiveFilterChipsOperatorValues.test.tsx +222 -0
- package/Tests/UI/Components/BulkActionPermissionGating.test.tsx +296 -0
- package/Tests/UI/Components/CardModelDetailPermissionGating.test.tsx +305 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetail.test.tsx +23 -0
- package/Tests/UI/Components/DictionaryFilterOperatorDisplay.test.ts +239 -0
- package/Tests/UI/Components/DisabledButtonTooltip.test.tsx +267 -0
- package/Tests/UI/Components/DuplicateModel.test.tsx +37 -0
- package/Tests/UI/Components/Forms/FormSubmitAnalytics.test.tsx +206 -0
- package/Tests/UI/Components/ModelCardPermissionGating.test.tsx +348 -0
- package/Tests/UI/Components/ModelDelete.test.tsx +25 -1
- package/Tests/UI/Components/ModelFormCreatePermission.test.tsx +342 -0
- package/Tests/UI/Components/ModelTable/BaseModelTablePermissionGating.test.tsx +680 -0
- package/Tests/UI/Components/OrderedStatesListCreateGate.test.tsx +174 -0
- package/Tests/UI/Components/SavedViewsDropdownSearch.test.tsx +1127 -0
- package/Tests/UI/Components/SavedViewsFacetSection.test.tsx +958 -0
- package/Tests/UI/Components/SavedViewsList.test.ts +699 -0
- package/Tests/UI/Components/SavedViewsSidebarIntegration.test.tsx +640 -0
- package/Tests/UI/Components/SavedViewsSurfaceParity.test.tsx +679 -0
- package/Tests/UI/Components/TableViewLoadFailure.test.tsx +248 -0
- package/Tests/UI/Types/UseComponentOutsideClick.test.tsx +226 -0
- package/Tests/UI/Utils/AIChatExport/ConversationMarkdown.test.ts +774 -0
- package/Tests/UI/Utils/AIChatExport/MarkdownBlocks.test.ts +791 -0
- package/Tests/UI/Utils/AIChatExport/MarkdownSafety.test.ts +544 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +467 -0
- package/Tests/Utils/Analytics.test.ts +187 -0
- package/Tests/Utils/Measurement/MeasurementEvaluator.test.ts +639 -0
- package/Tests/Utils/Monitor/MonitorMetricType.test.ts +80 -0
- package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
- package/Tests/Utils/Monitor/NetworkDeviceLinkRuleUtil.test.ts +1576 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +433 -0
- package/Tests/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.test.ts +214 -0
- package/Tests/Utils/SecurityEvent/GenericNormalizer.test.ts +204 -0
- package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.test.ts +252 -0
- package/Tests/Utils/SecurityEvent/NormalizerHelpers.test.ts +274 -0
- package/Tests/Utils/SecurityEvent/OcsfNormalizer.test.ts +208 -0
- package/Tests/Utils/SecurityEvent/SecurityEventNormalizer.test.ts +172 -0
- package/Tests/Utils/SecurityEvent/SigmaRuleParser.test.ts +471 -0
- package/Tests/Utils/SecurityEvent/UdmNormalizer.test.ts +361 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +82 -0
- package/Tests/Utils/Telemetry/LogErrorPattern.test.ts +463 -0
- package/Types/AI/AIChatTypes.ts +1 -0
- package/Types/Alerts/AlertMeasurementAnchorType.ts +14 -0
- package/Types/Alerts/AlertStateRole.ts +11 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +16 -0
- package/Types/Dashboard/Chart/ChartType.ts +1 -0
- package/Types/Dashboard/DashboardComponentType.ts +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.ts +18 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.ts +16 -0
- package/Types/Incident/IncidentMeasurementAnchorType.ts +34 -0
- package/Types/Incident/IncidentStateRole.ts +14 -0
- package/Types/Marketing/Attribution.ts +75 -0
- package/Types/Marketing/MarketingConversion.ts +43 -1
- package/Types/Measurement/MeasurementAggregationType.ts +43 -0
- package/Types/Measurement/MeasurementAnchorKind.ts +23 -0
- package/Types/Measurement/MeasurementOccurrence.ts +14 -0
- package/Types/Measurement/MeasurementStatus.ts +34 -0
- package/Types/MeteredPlan/ProductType.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +12 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +64 -0
- package/Types/Monitor/MonitorStep.ts +28 -0
- package/Types/Monitor/MonitorStepSecurityEventsMonitor.ts +100 -0
- package/Types/Monitor/MonitorType.ts +20 -0
- package/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.ts +17 -0
- package/Types/NetworkDevice/NetworkDeviceLinkRuleScope.ts +51 -0
- package/Types/Permission.ts +399 -2
- package/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.ts +20 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.ts +16 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.ts +92 -0
- package/Types/SecurityEvent/OcsfEventClass.ts +205 -0
- package/Types/SecurityEvent/OcsfSeverity.ts +88 -0
- package/Types/SecurityEvent/SecurityEventFormat.ts +23 -0
- package/Types/SecurityEvent/SigmaRule.ts +70 -0
- package/Types/Telemetry/LlmConventions.ts +20 -1
- package/Types/Telemetry/LlmCostCatalog.ts +557 -0
- package/Types/Telemetry/ServiceType.ts +1 -0
- package/Types/Telemetry/TelemetryRetentionConfig.ts +5 -1
- package/Types/Telemetry/TelemetryType.ts +1 -0
- package/Types/TwoFactorAuthStatus.ts +42 -0
- package/Types/UserAuthenticationStatus.ts +18 -0
- package/UI/Components/ActionButton/ActionButtonSchema.ts +7 -0
- package/UI/Components/BulkUpdate/BulkArchiveActions.tsx +35 -2
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +34 -1
- package/UI/Components/BulkUpdate/BulkOwnerActions.tsx +45 -1
- package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +3 -0
- package/UI/Components/Button/Button.tsx +37 -2
- package/UI/Components/Card/Card.tsx +6 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +24 -1
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +57 -0
- package/UI/Components/DuplicateModel/DuplicateModel.tsx +16 -0
- package/UI/Components/FormModal/BasicFormModal.tsx +12 -0
- package/UI/Components/Forms/BasicForm.tsx +13 -1
- package/UI/Components/Forms/BasicModelForm.tsx +2 -1
- package/UI/Components/Forms/ModelForm.tsx +64 -3
- package/UI/Components/Forms/Utils/FormAnalyticsName.ts +39 -0
- package/UI/Components/List/ListRow.tsx +6 -0
- package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +34 -7
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +7 -40
- package/UI/Components/LogsViewer/components/SavedViewsDropdown.tsx +155 -3
- package/UI/Components/ModelDelete/ModelDelete.tsx +20 -0
- package/UI/Components/ModelDetail/CardModelDetail.tsx +36 -23
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +6 -1
- package/UI/Components/ModelList/ModelList.tsx +21 -2
- package/UI/Components/ModelList/StaticModelList.tsx +11 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +168 -62
- package/UI/Components/ModelTable/ModelTable.tsx +16 -10
- package/UI/Components/ModelTable/TableView.tsx +36 -4
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +36 -4
- package/UI/Components/OrderedStatesList/Item.tsx +6 -0
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +81 -47
- package/UI/Components/ResetObjectID/ResetObjectID.tsx +16 -0
- package/UI/Components/SavedViews/SavedViewsFacetSection.tsx +242 -0
- package/UI/Components/SavedViews/SavedViewsList.ts +168 -0
- package/UI/Components/SavedViews/SavedViewsSearchInput.tsx +46 -0
- package/UI/Components/SavedViews/SavedViewsShowMoreButton.tsx +44 -0
- package/UI/Components/Table/TableRow.tsx +12 -0
- package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +152 -2
- package/UI/Types/UseComponentOutsideClick.ts +47 -0
- package/UI/Utils/PermissionGate.ts +277 -0
- package/Utils/Analytics.ts +55 -2
- package/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.ts +84 -0
- package/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.ts +110 -0
- package/Utils/Dashboard/Components/Index.ts +14 -0
- package/Utils/Measurement/MeasurementEvaluator.ts +359 -0
- package/Utils/Monitor/MonitorMetricType.ts +40 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.ts +1 -0
- package/Utils/Monitor/NetworkDeviceLinkRuleUtil.ts +669 -37
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +231 -0
- package/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.ts +115 -0
- package/Utils/SecurityEvent/GenericNormalizer.ts +208 -0
- package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +206 -0
- package/Utils/SecurityEvent/NormalizerHelpers.ts +263 -0
- package/Utils/SecurityEvent/OcsfNormalizer.ts +194 -0
- package/Utils/SecurityEvent/SecurityEventNormalizer.ts +82 -0
- package/Utils/SecurityEvent/Sigma/SigmaRuleParser.ts +579 -0
- package/Utils/SecurityEvent/UdmNormalizer.ts +442 -0
- package/Utils/Telemetry/CrossSignalScope.ts +46 -9
- package/Utils/Telemetry/LogErrorPattern.ts +350 -0
- package/build/dist/Models/AnalyticsModels/Index.js +10 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js +159 -0
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +596 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/Span.js +24 -1
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js +181 -0
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Alert.js +43 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js +10 -11
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +517 -0
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GlobalOidc.js +21 -0
- package/build/dist/Models/DatabaseModels/GlobalOidc.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalSso.js +21 -0
- package/build/dist/Models/DatabaseModels/GlobalSso.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +410 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Incident.js +43 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +20 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Label.js +11 -0
- package/build/dist/Models/DatabaseModels/Label.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js +681 -0
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js +503 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js +87 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MarketingConversion.js +237 -11
- package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricSavedView.js +59 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceLinkRule.js +47 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLinkRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Probe.js +21 -0
- package/build/dist/Models/DatabaseModels/Probe.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +1133 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +515 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +4 -4
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TableView.js +15 -0
- package/build/dist/Models/DatabaseModels/TableView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Team.js +13 -0
- package/build/dist/Models/DatabaseModels/Team.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamMember.js +8 -0
- package/build/dist/Models/DatabaseModels/TeamMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceSavedView.js +52 -0
- package/build/dist/Models/DatabaseModels/TraceSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +25 -4
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +136 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +75 -2
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +35 -1
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787800000000-AddScopeToNetworkDeviceLinkRule.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787800000000-AddScopeToNetworkDeviceLinkRule.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787900000000-AddRestrictToAttachedProjectsToGlobalSso.js +29 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787900000000-AddRestrictToAttachedProjectsToGlobalSso.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js +36 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js +162 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js +52 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +491 -0
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -0
- package/build/dist/Server/Middleware/SlackAuthorization.js +28 -4
- package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +197 -22
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js +32 -2
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js.map +1 -1
- package/build/dist/Server/Services/AccessTokenService.js +13 -2
- package/build/dist/Server/Services/AccessTokenService.js.map +1 -1
- package/build/dist/Server/Services/AlertMeasurementService.js +250 -0
- package/build/dist/Server/Services/AlertMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js +400 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/AlertService.js +37 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +48 -0
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/DetectionRuleService.js +50 -0
- package/build/dist/Server/Services/DetectionRuleService.js.map +1 -0
- package/build/dist/Server/Services/GlobalOidcProjectService.js +105 -0
- package/build/dist/Server/Services/GlobalOidcProjectService.js.map +1 -1
- package/build/dist/Server/Services/GlobalOidcService.js +127 -0
- package/build/dist/Server/Services/GlobalOidcService.js.map +1 -1
- package/build/dist/Server/Services/GlobalSsoProjectService.js +105 -0
- package/build/dist/Server/Services/GlobalSsoProjectService.js.map +1 -1
- package/build/dist/Server/Services/GlobalSsoService.js +127 -0
- package/build/dist/Server/Services/GlobalSsoService.js.map +1 -1
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +55 -0
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js +252 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js +413 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/IncidentService.js +41 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +50 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +30 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LlmCostBudgetService.js +89 -0
- package/build/dist/Server/Services/LlmCostBudgetService.js.map +1 -0
- package/build/dist/Server/Services/LlmModelPriceService.js +163 -0
- package/build/dist/Server/Services/LlmModelPriceService.js.map +1 -0
- package/build/dist/Server/Services/LogAggregationService.js +709 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/LogCountBaselineService.js +112 -0
- package/build/dist/Server/Services/LogCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/MutableMetricService.js +28 -9
- package/build/dist/Server/Services/MutableMetricService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js +254 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js +434 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +37 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +134 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/SecurityEventService.js +64 -0
- package/build/dist/Server/Services/SecurityEventService.js.map +1 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js +122 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageService.js +4 -3
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +15 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/UserEmailService.js +4 -4
- package/build/dist/Server/Services/UserService.js +262 -42
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTotpAuthService.js +0 -73
- package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -1
- package/build/dist/Server/Services/UserWebAuthnService.js +1 -73
- package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -1
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +13 -0
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +10 -0
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +3 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js +257 -0
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +13 -4
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Attribution.js +77 -33
- package/build/dist/Server/Utils/Attribution.js.map +1 -1
- package/build/dist/Server/Utils/CronTab.js +66 -0
- package/build/dist/Server/Utils/CronTab.js.map +1 -1
- package/build/dist/Server/Utils/GlobalSsoAuthorization.js +112 -0
- package/build/dist/Server/Utils/GlobalSsoAuthorization.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +57 -4
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +53 -9
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +42 -18
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js +43 -19
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +25 -12
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +35 -16
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -1
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js +109 -0
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js.map +1 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js +131 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js +37 -35
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js +111 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/DnsMonitorCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/DnsMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/DomainMonitorCriteria.js +20 -22
- package/build/dist/Server/Utils/Monitor/Criteria/DomainMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +370 -42
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js +35 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +64 -52
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +25 -29
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js +7 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +20 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +9 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +133 -23
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js +6 -5
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +404 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js +145 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +176 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js +69 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js +493 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js.map +1 -0
- package/build/dist/Server/Utils/StatusPageContentSecurityPolicy.js +39 -0
- package/build/dist/Server/Utils/StatusPageContentSecurityPolicy.js.map +1 -0
- package/build/dist/Server/Utils/StatusPageCustomizationAccess.js +85 -0
- package/build/dist/Server/Utils/StatusPageCustomizationAccess.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js +317 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js +56 -4
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js +112 -0
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js.map +1 -0
- package/build/dist/Server/Utils/UserPermission/UserPermission.js +46 -1
- package/build/dist/Server/Utils/UserPermission/UserPermission.js.map +1 -1
- package/build/dist/Types/AI/AIChatTypes.js +1 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -1
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js +15 -0
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Alerts/AlertStateRole.js +12 -0
- package/build/dist/Types/Alerts/AlertStateRole.js.map +1 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +16 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/Dashboard/Chart/ChartType.js +1 -0
- package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js +29 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Incident/IncidentStateRole.js +15 -0
- package/build/dist/Types/Incident/IncidentStateRole.js.map +1 -0
- package/build/dist/Types/Marketing/Attribution.js +68 -0
- package/build/dist/Types/Marketing/Attribution.js.map +1 -0
- package/build/dist/Types/Marketing/MarketingConversion.js +40 -1
- package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -1
- package/build/dist/Types/Measurement/MeasurementAggregationType.js +40 -0
- package/build/dist/Types/Measurement/MeasurementAggregationType.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js +22 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js +15 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js +32 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js.map +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +3 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +59 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +17 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js +64 -0
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +19 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceLinkRuleScope.js +46 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceLinkRuleScope.js.map +1 -0
- package/build/dist/Types/Permission.js +347 -2
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js +19 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js +17 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js.map +1 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js +2 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js +181 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js +81 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js +21 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js +16 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js.map +1 -0
- package/build/dist/Types/Telemetry/LlmConventions.js +19 -1
- package/build/dist/Types/Telemetry/LlmConventions.js.map +1 -1
- package/build/dist/Types/Telemetry/LlmCostCatalog.js +484 -0
- package/build/dist/Types/Telemetry/LlmCostCatalog.js.map +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryRetentionConfig.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
- package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
- package/build/dist/Types/TwoFactorAuthStatus.js +41 -0
- package/build/dist/Types/TwoFactorAuthStatus.js.map +1 -0
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js +16 -2
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +15 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js +20 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +22 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +1 -1
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +14 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +47 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js +8 -0
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js.map +1 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js +2 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +10 -1
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicModelForm.js +2 -1
- package/build/dist/UI/Components/Forms/BasicModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +44 -2
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/Utils/FormAnalyticsName.js +33 -0
- package/build/dist/UI/Components/Forms/Utils/FormAnalyticsName.js.map +1 -0
- package/build/dist/UI/Components/List/ListRow.js +4 -1
- package/build/dist/UI/Components/List/ListRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +32 -7
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +2 -17
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js +13 -0
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +27 -11
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js +2 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +13 -2
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js +4 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +101 -40
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js +9 -7
- package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +32 -4
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +19 -2
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js +4 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +33 -32
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js +8 -0
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js.map +1 -1
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js +98 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js +99 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js +17 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js +15 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js.map +1 -0
- package/build/dist/UI/Components/Table/TableRow.js +8 -2
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Types/UseComponentOutsideClick.js +39 -0
- package/build/dist/UI/Types/UseComponentOutsideClick.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +164 -0
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -0
- package/build/dist/Utils/Analytics.js +50 -2
- package/build/dist/Utils/Analytics.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js +92 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +8 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js +210 -0
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js +37 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js +1 -0
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js +359 -37
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +108 -0
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.js +87 -0
- package/build/dist/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js +176 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +146 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js +196 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js +136 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js +64 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +388 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js +328 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +29 -7
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/build/dist/Utils/Telemetry/LogErrorPattern.js +284 -0
- package/build/dist/Utils/Telemetry/LogErrorPattern.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import OneUptimeDate from "../../Types/Date";
|
|
2
|
+
import ColumnLength from "../../Types/Database/ColumnLength";
|
|
3
|
+
/*
|
|
4
|
+
* Why a network discovery scan is still sitting in "Pending".
|
|
5
|
+
*
|
|
6
|
+
* A scan leaves "Pending" in exactly one place: the probe asks
|
|
7
|
+
* /probe/discovery-scan/list and the server claims a row for it
|
|
8
|
+
* (App/FeatureSet/Telemetry/API/ProbeIngest/DiscoveryScan.ts). Nothing on the
|
|
9
|
+
* server can make that happen — if the probe never asks, the row simply never
|
|
10
|
+
* moves.
|
|
11
|
+
*
|
|
12
|
+
* Until this existed, that outcome was completely silent. The scans list
|
|
13
|
+
* showed "Pending" and an em-dash in Responded Hosts, forever, with no
|
|
14
|
+
* timestamp, no probe state and no message anywhere in the product; the only
|
|
15
|
+
* evidence lived in the probe container's log, if the operator had it. That is
|
|
16
|
+
* what OneUptime issue #3287 reported: four scans submitted over an hour, all
|
|
17
|
+
* "Pending", nothing to act on.
|
|
18
|
+
*
|
|
19
|
+
* So this module writes the sentence the operator was missing. It is pure and
|
|
20
|
+
* lives in Common so the wording can be unit-tested without a database, the
|
|
21
|
+
* same way ScanTargetUtil's messages are.
|
|
22
|
+
*
|
|
23
|
+
* It deliberately does NOT fail the scan. A scan nobody has claimed is still
|
|
24
|
+
* perfectly runnable the moment the probe comes back, and a recurring one
|
|
25
|
+
* would tangle with the re-queue pass; what was missing was information, not a
|
|
26
|
+
* state change.
|
|
27
|
+
*/
|
|
28
|
+
/*
|
|
29
|
+
* How long a scan may sit unclaimed before the job says anything.
|
|
30
|
+
*
|
|
31
|
+
* The probe polls every minute, so this is fifteen consecutive failed polls —
|
|
32
|
+
* long enough that a restarting probe, a redeploy or a brief network blip
|
|
33
|
+
* never produces a message, short enough to be useful while the operator is
|
|
34
|
+
* still looking at the page they just submitted from.
|
|
35
|
+
*
|
|
36
|
+
* It is NOT the whole guard against false positives: a scan queued behind
|
|
37
|
+
* another scan on the same probe is legitimately Pending for as long as that
|
|
38
|
+
* sweep takes (the claim endpoint hands out one at a time), so the caller
|
|
39
|
+
* excludes probes that currently have a scan In Progress. This threshold only
|
|
40
|
+
* decides how long an IDLE probe gets before its silence is worth reporting.
|
|
41
|
+
*/
|
|
42
|
+
export const UNCLAIMED_PENDING_MINUTES = 15;
|
|
43
|
+
/*
|
|
44
|
+
* The two cases below are genuinely different problems with different fixes,
|
|
45
|
+
* and telling them apart is the entire point of this message: a probe that is
|
|
46
|
+
* not connected is an infrastructure problem the operator can see and fix,
|
|
47
|
+
* whereas a probe that IS connected and still is not claiming scans means the
|
|
48
|
+
* probe is running but its discovery job is not — an old image, a wedged
|
|
49
|
+
* sweep, or a probe that cannot reach the probe-ingest route specifically.
|
|
50
|
+
*/
|
|
51
|
+
export function buildUnclaimedScanDiagnosis(probeState) {
|
|
52
|
+
const probeLabel = probeState.probeName
|
|
53
|
+
? `Probe "${truncateProbeName(probeState.probeName)}"`
|
|
54
|
+
: "The assigned probe";
|
|
55
|
+
if (!probeState.isProbeConnected) {
|
|
56
|
+
const lastSeen = probeState.lastAliveAt
|
|
57
|
+
? `It was last seen ${OneUptimeDate.fromNow(probeState.lastAliveAt)}.`
|
|
58
|
+
: "It has never connected.";
|
|
59
|
+
return (`Not started yet: ${probeLabel} is not connected to OneUptime, so it has not picked this scan up. ` +
|
|
60
|
+
`${lastSeen} The scan will run on its own as soon as the probe reconnects.`);
|
|
61
|
+
}
|
|
62
|
+
return (`Not started yet: ${probeLabel} is connected but has not picked this scan up for over ` +
|
|
63
|
+
`${UNCLAIMED_PENDING_MINUTES} minutes. Check that the probe is running a version that supports ` +
|
|
64
|
+
`network discovery, and that it can reach the probe-ingest endpoint. The scan will run on its own ` +
|
|
65
|
+
`once the probe starts claiming scans again.`);
|
|
66
|
+
}
|
|
67
|
+
/*
|
|
68
|
+
* statusMessage is a varchar(500) and this job writes through the full
|
|
69
|
+
* update pipeline, which does NOT clamp — an over-long value would throw and
|
|
70
|
+
* the diagnosis would be lost rather than truncated. The only unbounded part
|
|
71
|
+
* of the sentence is the probe's name (itself a ShortText column, so at most
|
|
72
|
+
* 100 characters), and it is cut here so the arithmetic holds for every
|
|
73
|
+
* possible name. See the test that asserts the worst case still fits.
|
|
74
|
+
*/
|
|
75
|
+
const MAX_PROBE_NAME_LENGTH = 60;
|
|
76
|
+
function truncateProbeName(name) {
|
|
77
|
+
if (name.length <= MAX_PROBE_NAME_LENGTH) {
|
|
78
|
+
return name;
|
|
79
|
+
}
|
|
80
|
+
return name.substring(0, MAX_PROBE_NAME_LENGTH) + "…";
|
|
81
|
+
}
|
|
82
|
+
/*
|
|
83
|
+
* Exported so the job and its tests agree on the ceiling they are checking
|
|
84
|
+
* against, rather than both hard-coding 500.
|
|
85
|
+
*/
|
|
86
|
+
export const MAX_SCAN_STATUS_MESSAGE_LENGTH = ColumnLength.LongText;
|
|
87
|
+
//# sourceMappingURL=UnclaimedScanDiagnosis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnclaimedScanDiagnosis.js","sourceRoot":"","sources":["../../../../Utils/NetworkDiscovery/UnclaimedScanDiagnosis.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,YAAY,MAAM,mCAAmC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAW,EAAE,CAAC;AAepD;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,UAAmC;IAEnC,MAAM,UAAU,GAAW,UAAU,CAAC,SAAS;QAC7C,CAAC,CAAC,UAAU,iBAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG;QACtD,CAAC,CAAC,oBAAoB,CAAC;IAEzB,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAW,UAAU,CAAC,WAAW;YAC7C,CAAC,CAAC,oBAAoB,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG;YACtE,CAAC,CAAC,yBAAyB,CAAC;QAE9B,OAAO,CACL,oBAAoB,UAAU,qEAAqE;YACnG,GAAG,QAAQ,gEAAgE,CAC5E,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAoB,UAAU,yDAAyD;QACvF,GAAG,yBAAyB,oEAAoE;QAChG,mGAAmG;QACnG,6CAA6C,CAC9C,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAW,EAAE,CAAC;AAEzC,SAAS,iBAAiB,CAAC,IAAY;IACrC,IAAI,IAAI,CAAC,MAAM,IAAI,qBAAqB,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,qBAAqB,CAAC,GAAG,GAAG,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAW,YAAY,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import OcsfSeverity, { OcsfSeverityId, normalizeOcsfSeverity, } from "../../Types/SecurityEvent/OcsfSeverity";
|
|
2
|
+
import { buildObservables, contentHashEventUid, flattenPayload, parseEventTime, readString, readValue, } from "./NormalizerHelpers";
|
|
3
|
+
import { prettifyUdmEventType } from "./UdmNormalizer";
|
|
4
|
+
/*
|
|
5
|
+
* Best-effort normalizer for security events that are neither OCSF nor
|
|
6
|
+
* UDM — arbitrary vendor JSON forwarded from a SIEM, a webhook, or a
|
|
7
|
+
* custom script. Field lookup walks common aliases; anything not
|
|
8
|
+
* recognized still lands in `attributes`, so nothing is lost.
|
|
9
|
+
*/
|
|
10
|
+
const MESSAGE_FIELDS = [
|
|
11
|
+
"message",
|
|
12
|
+
"msg",
|
|
13
|
+
"summary",
|
|
14
|
+
"description",
|
|
15
|
+
"title",
|
|
16
|
+
"alert_name",
|
|
17
|
+
"alertName",
|
|
18
|
+
"name",
|
|
19
|
+
];
|
|
20
|
+
const SEVERITY_FIELDS = [
|
|
21
|
+
"severity",
|
|
22
|
+
"severity_name",
|
|
23
|
+
"level",
|
|
24
|
+
"priority",
|
|
25
|
+
"risk_level",
|
|
26
|
+
"riskLevel",
|
|
27
|
+
];
|
|
28
|
+
const TIME_FIELDS = [
|
|
29
|
+
"timestamp",
|
|
30
|
+
"time",
|
|
31
|
+
"@timestamp",
|
|
32
|
+
"event_time",
|
|
33
|
+
"eventTime",
|
|
34
|
+
"created_at",
|
|
35
|
+
"createdAt",
|
|
36
|
+
"date",
|
|
37
|
+
"detected_at",
|
|
38
|
+
"detectedAt",
|
|
39
|
+
];
|
|
40
|
+
const USER_FIELDS = [
|
|
41
|
+
"user",
|
|
42
|
+
"username",
|
|
43
|
+
"user_name",
|
|
44
|
+
"userName",
|
|
45
|
+
"account",
|
|
46
|
+
"principal",
|
|
47
|
+
"actor",
|
|
48
|
+
];
|
|
49
|
+
const HOST_FIELDS = [
|
|
50
|
+
"host",
|
|
51
|
+
"hostname",
|
|
52
|
+
"host_name",
|
|
53
|
+
"computer",
|
|
54
|
+
"computer_name",
|
|
55
|
+
"device",
|
|
56
|
+
"device_name",
|
|
57
|
+
"machine",
|
|
58
|
+
];
|
|
59
|
+
const SOURCE_IP_FIELDS = [
|
|
60
|
+
"source_ip",
|
|
61
|
+
"src_ip",
|
|
62
|
+
"sourceIp",
|
|
63
|
+
"srcIp",
|
|
64
|
+
"client_ip",
|
|
65
|
+
"clientIp",
|
|
66
|
+
"ip",
|
|
67
|
+
"ip_address",
|
|
68
|
+
"ipAddress",
|
|
69
|
+
];
|
|
70
|
+
const TARGET_IP_FIELDS = [
|
|
71
|
+
"destination_ip",
|
|
72
|
+
"dest_ip",
|
|
73
|
+
"dst_ip",
|
|
74
|
+
"destinationIp",
|
|
75
|
+
"target_ip",
|
|
76
|
+
"targetIp",
|
|
77
|
+
"server_ip",
|
|
78
|
+
];
|
|
79
|
+
const TYPE_FIELDS = [
|
|
80
|
+
"event_type",
|
|
81
|
+
"eventType",
|
|
82
|
+
"category",
|
|
83
|
+
"type",
|
|
84
|
+
"action",
|
|
85
|
+
];
|
|
86
|
+
const VENDOR_FIELDS = ["vendor", "vendor_name", "vendorName"];
|
|
87
|
+
const PRODUCT_FIELDS = [
|
|
88
|
+
"product",
|
|
89
|
+
"product_name",
|
|
90
|
+
"productName",
|
|
91
|
+
"source",
|
|
92
|
+
"log_source",
|
|
93
|
+
"logSource",
|
|
94
|
+
];
|
|
95
|
+
const RULE_NAME_FIELDS = [
|
|
96
|
+
"rule",
|
|
97
|
+
"rule_name",
|
|
98
|
+
"ruleName",
|
|
99
|
+
"signature",
|
|
100
|
+
"detection",
|
|
101
|
+
];
|
|
102
|
+
const ID_FIELDS = [
|
|
103
|
+
"id",
|
|
104
|
+
"uid",
|
|
105
|
+
"uuid",
|
|
106
|
+
"event_id",
|
|
107
|
+
"eventId",
|
|
108
|
+
"alert_id",
|
|
109
|
+
"alertId",
|
|
110
|
+
];
|
|
111
|
+
function readFirst(payload, fields) {
|
|
112
|
+
for (const field of fields) {
|
|
113
|
+
const value = readString(payload, field);
|
|
114
|
+
if (value) {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return "";
|
|
119
|
+
}
|
|
120
|
+
export default class GenericNormalizer {
|
|
121
|
+
static normalize(payload) {
|
|
122
|
+
const severityName = normalizeOcsfSeverity(readFirst(payload, SEVERITY_FIELDS)) ||
|
|
123
|
+
OcsfSeverity.Unknown;
|
|
124
|
+
let time = null;
|
|
125
|
+
for (const field of TIME_FIELDS) {
|
|
126
|
+
time = parseEventTime(readValue(payload, field));
|
|
127
|
+
if (time) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const typeText = readFirst(payload, TYPE_FIELDS);
|
|
132
|
+
const className = typeText
|
|
133
|
+
? prettifyUdmEventType(typeText.replace(/[\s.-]+/g, "_"))
|
|
134
|
+
: "Base Event";
|
|
135
|
+
const principalUser = readFirst(payload, USER_FIELDS);
|
|
136
|
+
const principalHost = readFirst(payload, HOST_FIELDS);
|
|
137
|
+
const principalIp = readFirst(payload, SOURCE_IP_FIELDS);
|
|
138
|
+
const targetIp = readFirst(payload, TARGET_IP_FIELDS);
|
|
139
|
+
return {
|
|
140
|
+
time: time || new Date(),
|
|
141
|
+
eventUid: readFirst(payload, ID_FIELDS) || contentHashEventUid(payload),
|
|
142
|
+
categoryUid: 0,
|
|
143
|
+
categoryName: "Uncategorized",
|
|
144
|
+
classUid: 0,
|
|
145
|
+
className,
|
|
146
|
+
activityName: "",
|
|
147
|
+
severityId: OcsfSeverityId[severityName],
|
|
148
|
+
severityName,
|
|
149
|
+
statusName: readString(payload, "status"),
|
|
150
|
+
message: readFirst(payload, MESSAGE_FIELDS) || "Security event",
|
|
151
|
+
vendorName: readFirst(payload, VENDOR_FIELDS),
|
|
152
|
+
productName: readFirst(payload, PRODUCT_FIELDS),
|
|
153
|
+
ruleId: readString(payload, "rule_id") || readString(payload, "ruleId"),
|
|
154
|
+
ruleName: readFirst(payload, RULE_NAME_FIELDS),
|
|
155
|
+
mitreTactics: [],
|
|
156
|
+
mitreTechniques: [],
|
|
157
|
+
principalUser,
|
|
158
|
+
principalHost,
|
|
159
|
+
principalIp,
|
|
160
|
+
principalProcess: readString(payload, "process"),
|
|
161
|
+
targetUser: readString(payload, "target_user"),
|
|
162
|
+
targetHost: readString(payload, "target_host"),
|
|
163
|
+
targetIp,
|
|
164
|
+
targetPort: 0,
|
|
165
|
+
targetResource: readString(payload, "target"),
|
|
166
|
+
observables: buildObservables([
|
|
167
|
+
principalUser,
|
|
168
|
+
principalHost,
|
|
169
|
+
principalIp,
|
|
170
|
+
targetIp,
|
|
171
|
+
]),
|
|
172
|
+
attributes: flattenPayload(payload),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=GenericNormalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericNormalizer.js","sourceRoot":"","sources":["../../../../Utils/SecurityEvent/GenericNormalizer.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,EAAE,EACnB,cAAc,EACd,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,UAAU,EACV,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OA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BACb,aAAa;gBACb,WAAW;gBACX,QAAQ;aACT,CAAC;YACF,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC;SACpC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import OcsfSeverity, { OcsfSeverityId, normalizeOcsfSeverity, } from "../../Types/SecurityEvent/OcsfSeverity";
|
|
2
|
+
import { ocsfCategoryForClassUid } from "../../Types/SecurityEvent/OcsfEventClass";
|
|
3
|
+
import UdmNormalizer from "./UdmNormalizer";
|
|
4
|
+
import { buildObservables, contentHashEventUid, flattenPayload, parseEventTime, readString, readValue, } from "./NormalizerHelpers";
|
|
5
|
+
/*
|
|
6
|
+
* Google SecOps (Chronicle) detection/alert payload -> a Detection Finding
|
|
7
|
+
* (OCSF class 2004).
|
|
8
|
+
*
|
|
9
|
+
* This is the shape a SecOps SOAR playbook webhook or the detections
|
|
10
|
+
* stream (legacyStreamDetectionAlerts) delivers: rule metadata in a
|
|
11
|
+
* `detection` array plus the matched UDM events in `collectionElements`.
|
|
12
|
+
* The matched sample events are run through the UDM entity extraction so
|
|
13
|
+
* the finding row inherits their observables — that is what makes a
|
|
14
|
+
* detection joinable to the hosts/users it fired on.
|
|
15
|
+
*/
|
|
16
|
+
const DETECTION_FINDING_CLASS_UID = 2004;
|
|
17
|
+
/*
|
|
18
|
+
* How many sample events to mine for observables. Detections can carry
|
|
19
|
+
* hundreds of matched events; a handful is enough to identify the
|
|
20
|
+
* entities involved without turning one finding row into a megabyte.
|
|
21
|
+
*/
|
|
22
|
+
const MAX_SAMPLE_EVENTS = 25;
|
|
23
|
+
function collectSampleEvents(payload) {
|
|
24
|
+
var _a;
|
|
25
|
+
const events = [];
|
|
26
|
+
const collectionElements = (_a = readValue(payload, "collectionElements")) !== null && _a !== void 0 ? _a : readValue(payload, "collection_elements");
|
|
27
|
+
if (!Array.isArray(collectionElements)) {
|
|
28
|
+
return events;
|
|
29
|
+
}
|
|
30
|
+
for (const element of collectionElements) {
|
|
31
|
+
if (typeof element !== "object" || element === null) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const references = readValue(element, "references");
|
|
35
|
+
if (!Array.isArray(references)) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
for (const reference of references) {
|
|
39
|
+
if (events.length >= MAX_SAMPLE_EVENTS) {
|
|
40
|
+
return events;
|
|
41
|
+
}
|
|
42
|
+
if (typeof reference !== "object" || reference === null) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const event = readValue(reference, "event");
|
|
46
|
+
if (event && typeof event === "object" && !Array.isArray(event)) {
|
|
47
|
+
events.push(event);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return events;
|
|
52
|
+
}
|
|
53
|
+
function readDetectionEntry(payload) {
|
|
54
|
+
const detection = readValue(payload, "detection");
|
|
55
|
+
if (Array.isArray(detection)) {
|
|
56
|
+
const first = detection[0];
|
|
57
|
+
if (first && typeof first === "object" && !Array.isArray(first)) {
|
|
58
|
+
return first;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (detection && typeof detection === "object") {
|
|
63
|
+
return detection;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
export default class GoogleSecOpsAlertNormalizer {
|
|
68
|
+
static isGoogleSecOpsAlert(payload) {
|
|
69
|
+
const type = readString(payload, "type").toUpperCase();
|
|
70
|
+
return Boolean(readDetectionEntry(payload) ||
|
|
71
|
+
type.includes("RULE_DETECTION") ||
|
|
72
|
+
readValue(payload, "collectionElements") ||
|
|
73
|
+
readValue(payload, "collection_elements"));
|
|
74
|
+
}
|
|
75
|
+
static normalize(payload) {
|
|
76
|
+
var _a, _b, _c;
|
|
77
|
+
const detection = readDetectionEntry(payload);
|
|
78
|
+
const ruleName = detection
|
|
79
|
+
? readString(detection, "ruleName") || readString(detection, "rule_name")
|
|
80
|
+
: "";
|
|
81
|
+
const ruleId = detection
|
|
82
|
+
? readString(detection, "ruleId") ||
|
|
83
|
+
readString(detection, "rule_id") ||
|
|
84
|
+
readString(detection, "ruleVersionId") ||
|
|
85
|
+
readString(detection, "rule_version_id")
|
|
86
|
+
: "";
|
|
87
|
+
const severityName = (detection && normalizeOcsfSeverity(readString(detection, "severity"))) ||
|
|
88
|
+
normalizeOcsfSeverity(readString(payload, "severity")) ||
|
|
89
|
+
OcsfSeverity.Unknown;
|
|
90
|
+
const time = parseEventTime((_c = (_b = (_a = readValue(payload, "detectionTime")) !== null && _a !== void 0 ? _a : readValue(payload, "detection_time")) !== null && _b !== void 0 ? _b : readValue(payload, "createdTime")) !== null && _c !== void 0 ? _c : readValue(payload, "created_time"));
|
|
91
|
+
/*
|
|
92
|
+
* Mine the matched UDM sample events for entities. The detection row's
|
|
93
|
+
* observables become the union across samples, and the first sample
|
|
94
|
+
* supplies the principal/target columns so the finding points at a
|
|
95
|
+
* concrete actor instead of nothing.
|
|
96
|
+
*/
|
|
97
|
+
const sampleEvents = collectSampleEvents(payload);
|
|
98
|
+
const sampleObservables = [];
|
|
99
|
+
let firstSample = null;
|
|
100
|
+
for (const sampleEvent of sampleEvents) {
|
|
101
|
+
const normalized = UdmNormalizer.normalize(sampleEvent);
|
|
102
|
+
if (!firstSample) {
|
|
103
|
+
firstSample = normalized;
|
|
104
|
+
}
|
|
105
|
+
sampleObservables.push(...normalized.observables);
|
|
106
|
+
}
|
|
107
|
+
const { categoryUid, categoryName } = ocsfCategoryForClassUid(DETECTION_FINDING_CLASS_UID);
|
|
108
|
+
const description = detection
|
|
109
|
+
? readString(detection, "description")
|
|
110
|
+
: "";
|
|
111
|
+
const message = ruleName || description || "Google SecOps detection";
|
|
112
|
+
return {
|
|
113
|
+
time: time || new Date(),
|
|
114
|
+
eventUid: readString(payload, "id") || contentHashEventUid(payload),
|
|
115
|
+
categoryUid,
|
|
116
|
+
categoryName,
|
|
117
|
+
classUid: DETECTION_FINDING_CLASS_UID,
|
|
118
|
+
className: "Detection Finding",
|
|
119
|
+
activityName: "Create",
|
|
120
|
+
severityId: OcsfSeverityId[severityName],
|
|
121
|
+
severityName,
|
|
122
|
+
statusName: readString(payload, "detection.alertState") ||
|
|
123
|
+
readString(payload, "detection.alert_state") ||
|
|
124
|
+
"",
|
|
125
|
+
message,
|
|
126
|
+
vendorName: "Google",
|
|
127
|
+
productName: "Google SecOps",
|
|
128
|
+
ruleId,
|
|
129
|
+
ruleName,
|
|
130
|
+
mitreTactics: firstSample ? firstSample.mitreTactics : [],
|
|
131
|
+
mitreTechniques: firstSample ? firstSample.mitreTechniques : [],
|
|
132
|
+
principalUser: firstSample ? firstSample.principalUser : "",
|
|
133
|
+
principalHost: firstSample ? firstSample.principalHost : "",
|
|
134
|
+
principalIp: firstSample ? firstSample.principalIp : "",
|
|
135
|
+
principalProcess: firstSample ? firstSample.principalProcess : "",
|
|
136
|
+
targetUser: firstSample ? firstSample.targetUser : "",
|
|
137
|
+
targetHost: firstSample ? firstSample.targetHost : "",
|
|
138
|
+
targetIp: firstSample ? firstSample.targetIp : "",
|
|
139
|
+
targetPort: firstSample ? firstSample.targetPort : 0,
|
|
140
|
+
targetResource: firstSample ? firstSample.targetResource : "",
|
|
141
|
+
observables: buildObservables(sampleObservables),
|
|
142
|
+
attributes: flattenPayload(payload),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=GoogleSecOpsAlertNormalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleSecOpsAlertNormalizer.js","sourceRoot":"","sources":["../../../../Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,EAAE,EACnB,cAAc,EACd,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,aAAa,MAAM,iBAAiB,CAAC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,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;YACrD,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;YACrD,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YACjD,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACpD,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;YAC7D,WAAW,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;YAChD,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC;SACpC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import Crypto from "../Crypto";
|
|
2
|
+
/*
|
|
3
|
+
* Shared helpers for the security-event normalizers (OCSF, UDM, SecOps
|
|
4
|
+
* alert, generic). Pure and isomorphic — no server imports — so the same
|
|
5
|
+
* code is unit-testable and usable from the UI if ever needed.
|
|
6
|
+
*/
|
|
7
|
+
/*
|
|
8
|
+
* Flatten a nested payload into dot-notation keys with scalar values, the
|
|
9
|
+
* shape the SecurityEvent `attributes` Map(String,String) column stores.
|
|
10
|
+
*
|
|
11
|
+
* Arrays of scalars collapse to a comma-joined string (queryable with a
|
|
12
|
+
* "contains" filter); arrays of objects recurse with the index in the key.
|
|
13
|
+
* Depth is capped so a hostile payload cannot recurse unboundedly.
|
|
14
|
+
*/
|
|
15
|
+
export function flattenPayload(payload, maxDepth = 10) {
|
|
16
|
+
const result = {};
|
|
17
|
+
const visit = (value, prefix, depth) => {
|
|
18
|
+
if (value === null || value === undefined) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (Array.isArray(value)) {
|
|
22
|
+
const scalars = value.filter((item) => {
|
|
23
|
+
return typeof item !== "object" || item === null;
|
|
24
|
+
});
|
|
25
|
+
if (scalars.length === value.length) {
|
|
26
|
+
if (value.length > 0) {
|
|
27
|
+
result[prefix] = value
|
|
28
|
+
.map((item) => {
|
|
29
|
+
return String(item);
|
|
30
|
+
})
|
|
31
|
+
.join(",");
|
|
32
|
+
}
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
value.forEach((item, index) => {
|
|
36
|
+
visit(item, `${prefix}.${index}`, depth + 1);
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (typeof value === "object") {
|
|
41
|
+
if (depth >= maxDepth) {
|
|
42
|
+
result[prefix] = JSON.stringify(value);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const key of Object.keys(value)) {
|
|
46
|
+
const child = value[key];
|
|
47
|
+
visit(child, prefix ? `${prefix}.${key}` : key, depth + 1);
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
result[prefix] = String(value);
|
|
52
|
+
};
|
|
53
|
+
visit(payload, "", 0);
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
/*
|
|
57
|
+
* Read a string off a nested payload by dot path, tolerating arrays along
|
|
58
|
+
* the way (first element wins). Returns '' when the path is absent or not
|
|
59
|
+
* scalar — normalizers treat empty string as "source did not say".
|
|
60
|
+
*/
|
|
61
|
+
export function readString(payload, path) {
|
|
62
|
+
const value = readValue(payload, path);
|
|
63
|
+
if (value === null || value === undefined) {
|
|
64
|
+
return "";
|
|
65
|
+
}
|
|
66
|
+
if (Array.isArray(value)) {
|
|
67
|
+
const first = value.find((item) => {
|
|
68
|
+
return item !== null && item !== undefined && typeof item !== "object";
|
|
69
|
+
});
|
|
70
|
+
return first === undefined ? "" : String(first);
|
|
71
|
+
}
|
|
72
|
+
if (typeof value === "object") {
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
return String(value);
|
|
76
|
+
}
|
|
77
|
+
export function readNumber(payload, path) {
|
|
78
|
+
const value = readValue(payload, path);
|
|
79
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
83
|
+
const parsed = Number(value);
|
|
84
|
+
if (Number.isFinite(parsed)) {
|
|
85
|
+
return parsed;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
export function readStringArray(payload, path) {
|
|
91
|
+
const value = readValue(payload, path);
|
|
92
|
+
if (value === null || value === undefined) {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
if (Array.isArray(value)) {
|
|
96
|
+
return value
|
|
97
|
+
.filter((item) => {
|
|
98
|
+
return item !== null && item !== undefined && typeof item !== "object";
|
|
99
|
+
})
|
|
100
|
+
.map((item) => {
|
|
101
|
+
return String(item);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (typeof value === "object") {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
return [String(value)];
|
|
108
|
+
}
|
|
109
|
+
export function readValue(payload, path) {
|
|
110
|
+
const parts = path.split(".");
|
|
111
|
+
let current = payload;
|
|
112
|
+
for (const part of parts) {
|
|
113
|
+
if (current === null || current === undefined) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
if (Array.isArray(current)) {
|
|
117
|
+
current = current[0];
|
|
118
|
+
}
|
|
119
|
+
if (current === null ||
|
|
120
|
+
current === undefined ||
|
|
121
|
+
typeof current !== "object" ||
|
|
122
|
+
Array.isArray(current)) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
current = current[part];
|
|
126
|
+
}
|
|
127
|
+
return current === undefined ? null : current;
|
|
128
|
+
}
|
|
129
|
+
/*
|
|
130
|
+
* Parse the timestamps security payloads actually carry: RFC3339 strings,
|
|
131
|
+
* epoch seconds, epoch millis, and epoch micros/nanos (which UDM and OCSF
|
|
132
|
+
* both use in places). Returns null rather than guessing when the value is
|
|
133
|
+
* unparseable — the caller decides the fallback.
|
|
134
|
+
*/
|
|
135
|
+
export function parseEventTime(value) {
|
|
136
|
+
if (value === null || value === undefined) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
140
|
+
const numeric = Number(value);
|
|
141
|
+
if (!Number.isFinite(numeric)) {
|
|
142
|
+
const parsed = new Date(value);
|
|
143
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
144
|
+
}
|
|
145
|
+
return parseEventTime(numeric);
|
|
146
|
+
}
|
|
147
|
+
if (typeof value === "number" && Number.isFinite(value) && value > 0) {
|
|
148
|
+
// Epoch scale by magnitude: seconds < 1e11 < millis < 1e14 < micros < 1e17 < nanos.
|
|
149
|
+
let millis = value;
|
|
150
|
+
if (value >= 1e17) {
|
|
151
|
+
millis = value / 1e6;
|
|
152
|
+
}
|
|
153
|
+
else if (value >= 1e14) {
|
|
154
|
+
millis = value / 1e3;
|
|
155
|
+
}
|
|
156
|
+
else if (value < 1e11) {
|
|
157
|
+
millis = value * 1000;
|
|
158
|
+
}
|
|
159
|
+
const parsed = new Date(Math.trunc(millis));
|
|
160
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
161
|
+
}
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
/*
|
|
165
|
+
* Build the deduplicated observables array from the entity fields a
|
|
166
|
+
* normalizer extracted. Order is stable (users, hosts, ips, then extras)
|
|
167
|
+
* so tests and content hashing are deterministic.
|
|
168
|
+
*/
|
|
169
|
+
export function buildObservables(values) {
|
|
170
|
+
const seen = new Set();
|
|
171
|
+
const observables = [];
|
|
172
|
+
for (const value of values) {
|
|
173
|
+
const trimmed = (value || "").trim();
|
|
174
|
+
if (!trimmed) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
const canonical = trimmed.toLowerCase();
|
|
178
|
+
if (seen.has(canonical)) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
seen.add(canonical);
|
|
182
|
+
observables.push(trimmed);
|
|
183
|
+
}
|
|
184
|
+
return observables;
|
|
185
|
+
}
|
|
186
|
+
/*
|
|
187
|
+
* Stable content hash used as eventUid when the source payload carries no
|
|
188
|
+
* id of its own. Repeated deliveries of the same payload produce the same
|
|
189
|
+
* uid, so downstream consumers can dedupe.
|
|
190
|
+
*/
|
|
191
|
+
export function contentHashEventUid(payload) {
|
|
192
|
+
const flattened = flattenPayload(payload);
|
|
193
|
+
const canonical = JSON.stringify(flattened, Object.keys(flattened).sort());
|
|
194
|
+
return `sha256:${Crypto.getSha256Hash(canonical)}`;
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=NormalizerHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NormalizerHelpers.js","sourceRoot":"","sources":["../../../../Utils/SecurityEvent/NormalizerHelpers.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B;;;;GAIG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAmB,EACnB,WAAmB,EAAE;IAErB,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,MAAM,KAAK,GAA8D,CACvE,KAAgB,EAChB,MAAc,EACd,KAAa,EACP,EAAE;QACR,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,OAAO,GAAqB,KAAK,CAAC,MAAM,CAC5C,CAAC,IAAe,EAAW,EAAE;gBAC3B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC;YACnD,CAAC,CACF,CAAC;YAEF,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,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