@oneuptime/common 13.0.7 → 13.0.8
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/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.ts +1 -1
- package/Models/DatabaseModels/ProjectOnCallCalendarFeed.ts +1 -1
- package/Models/DatabaseModels/UserOnCallCalendarFeed.ts +1 -1
- package/Server/API/AIBillingAPI.ts +1 -0
- package/Server/API/AIInsightAPI.ts +1 -4
- package/Server/API/AIInvestigationAPI.ts +1 -4
- package/Server/API/AIReadinessAPI.ts +4 -5
- package/Server/API/AlertAPI.ts +1 -0
- package/Server/API/AutoRemediationAPI.ts +1 -4
- package/Server/API/BaseAPI.ts +13 -0
- package/Server/API/BaseAnalyticsAPI.ts +80 -9
- package/Server/API/BillingAPI.ts +2 -0
- package/Server/API/BillingInvoiceAPI.ts +1 -0
- package/Server/API/BillingPaymentMethodAPI.ts +2 -0
- package/Server/API/CodeFixRunAPI.ts +1 -3
- package/Server/API/CommonAPI.ts +68 -4
- package/Server/API/DashboardAPI.ts +12 -12
- package/Server/API/GlobalConfigAPI.ts +17 -0
- package/Server/API/IncidentAPI.ts +2 -0
- package/Server/API/IncidentEpisodeAPI.ts +1 -0
- package/Server/API/NotificationAPI.ts +1 -0
- package/Server/API/OnCallCalendarAPI.ts +4 -5
- package/Server/API/OnCallDutyPolicyAPI.ts +7 -0
- package/Server/API/OnCallReadinessAPI.ts +4 -1
- package/Server/API/OnCallScheduleTimelineAPI.ts +731 -0
- package/Server/API/ProjectAPI.ts +1 -0
- package/Server/API/ScheduledMaintenanceAPI.ts +1 -0
- package/Server/API/StatusPageAPI.ts +161 -32
- package/Server/API/TeamMemberAPI.ts +3 -0
- package/Server/API/UserCallAPI.ts +2 -0
- package/Server/API/UserEmailAPI.ts +2 -0
- package/Server/API/UserIncomingCallNumberAPI.ts +2 -0
- package/Server/API/UserMicrosoftTeamsAPI.ts +1 -0
- package/Server/API/UserSlackAPI.ts +1 -0
- package/Server/API/UserSmsAPI.ts +2 -0
- package/Server/API/UserTotpAuthAPI.ts +1 -0
- package/Server/API/UserWebAuthnAPI.ts +2 -0
- package/Server/API/UserWebhookAPI.ts +1 -0
- package/Server/API/UserWhatsAppAPI.ts +2 -0
- package/Server/Middleware/MasterAdminAuthorization.ts +13 -2
- package/Server/Middleware/UserAuthorization.ts +79 -5
- package/Server/Services/ApiKeyPermissionService.ts +101 -4
- package/Server/Services/DatabaseService.ts +245 -0
- package/Server/Services/DetectionRuleService.ts +5 -4
- package/Server/Services/OnCallDutyPolicyChildService.ts +261 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.ts +2 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +2 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleTeamService.ts +2 -2
- package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +2 -2
- package/Server/Services/PayAsYouGoBillingService.ts +23 -28
- package/Server/Services/ProjectService.ts +18 -0
- package/Server/Services/RumSessionPinService.ts +274 -22
- package/Server/Services/TeamPermissionService.ts +120 -26
- package/Server/Services/ThreatIntelFeedService.ts +6 -3
- package/Server/Types/Database/Permissions/BasePermission.ts +9 -7
- package/Server/Types/Database/Permissions/Index.ts +75 -11
- package/Server/Types/Database/Permissions/TablePermission.ts +24 -28
- package/Server/Utils/AI/AIChatPrivacyFilter.ts +8 -0
- package/Server/Utils/AI/AIRunPrivacyFilter.ts +8 -0
- package/Server/Utils/MasterAdminPageAccess.ts +61 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +3 -1
- package/Server/Utils/Monitor/MonitorIncident.ts +3 -1
- package/Server/Utils/OnCall/OnCallCalendarFeedRenderer.ts +1 -1
- package/Server/Utils/Realtime.ts +163 -45
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +11 -28
- package/Server/Utils/SecurityEvent/GoogleSecOpsSeverityRepair.ts +170 -0
- package/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.ts +1 -1
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +6 -2
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.ts +10 -9
- package/Tests/App/Dashboard/AffectedResourcesPicker.test.tsx +1059 -0
- package/Tests/App/Dashboard/AffectedResourcesPickerEditForm.test.tsx +376 -0
- package/Tests/App/Dashboard/AffectedResourcesPickerHiddenTypes.test.tsx +757 -0
- package/Tests/App/Dashboard/AffectedResourcesSummaryStep.test.tsx +307 -0
- package/Tests/App/Dashboard/ArgumentsFormGroupByUnlistedAttributes.test.tsx +131 -0
- package/Tests/App/Dashboard/DashboardHeaderRequests.test.tsx +1 -1
- package/Tests/App/Dashboard/DashboardMonitorLabelVariable.test.tsx +9 -1
- package/Tests/App/Dashboard/DashboardVariableAllContract.test.tsx +24 -0
- package/Tests/App/Dashboard/DashboardVariableSelector.test.tsx +162 -8
- package/Tests/App/Dashboard/EntityFilterDropdownArchivedSlos.test.tsx +105 -6
- package/Tests/App/Dashboard/EntityFilterDropdownUnlistedSelection.test.tsx +434 -0
- package/Tests/App/Dashboard/EscalationRuleReadiness.test.tsx +276 -1
- package/Tests/App/Dashboard/OnCallCalendarFeedSideMenus.test.tsx +9 -1
- package/Tests/App/Dashboard/PayAsYouGoConsentGate.test.tsx +58 -42
- package/Tests/App/Dashboard/PayAsYouGoNotices.test.tsx +42 -5
- package/Tests/App/Dashboard/ResourceAuditLogsSideMenus.test.tsx +34 -23
- package/Tests/App/Dashboard/ScheduleTimeline.test.tsx +1580 -0
- package/Tests/App/Dashboard/ScheduleTimelineAPI.test.ts +280 -0
- package/Tests/App/Dashboard/ScheduleTimelineModel.test.ts +673 -0
- package/Tests/App/Dashboard/SecurityEventConnectionDiagnostics.test.tsx +95 -68
- package/Tests/App/Dashboard/SecurityEventsDetectionRulesPage.test.tsx +86 -3
- package/Tests/App/Dashboard/SecurityEventsEmptyState.test.tsx +28 -3
- package/Tests/App/Dashboard/SecurityEventsExplorer.test.tsx +761 -0
- package/Tests/App/Dashboard/SecurityEventsGuideContent.test.ts +1313 -0
- package/Tests/App/Dashboard/SecurityEventsHowItWorksCard.test.tsx +536 -0
- package/Tests/App/Dashboard/SecurityEventsNoResults.test.tsx +222 -0
- package/Tests/App/Dashboard/SecurityEventsThreatIntelPage.test.tsx +199 -0
- package/Tests/App/Dashboard/SecurityEventsVolumeChart.test.tsx +321 -0
- package/Tests/App/Dashboard/SloOverviewHero.test.tsx +171 -36
- package/Tests/App/Dashboard/SloViewSideMenu.test.tsx +215 -0
- package/Tests/App/Dashboard/SloViewSideMenuCounts.test.tsx +40 -3
- package/Tests/App/PublicDashboard/DashboardVariableSelector.test.tsx +12 -4
- package/Tests/App/PublicDashboard/PublicDashboardWidgetListAuth.test.tsx +623 -0
- package/Tests/Models/OnCallCalendarFeedModels.test.ts +23 -1
- package/Tests/Server/API/AIChatRouteAuthorization.test.ts +138 -5
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +187 -0
- package/Tests/Server/API/AIInvestigationAvailabilityAuthorization.test.ts +51 -3
- package/Tests/Server/API/AIInvestigationEvidenceAPI.test.ts +55 -2
- package/Tests/Server/API/BaseAnalyticsAPIAggregateCache.test.ts +729 -0
- package/Tests/Server/API/BillingPayAsYouGoStatus.test.ts +93 -7
- package/Tests/Server/API/BillingPaymentMethodAPI.test.ts +36 -3
- package/Tests/Server/API/CommonAPIAuthGuard.test.ts +1003 -24
- package/Tests/Server/API/DashboardPublicRateLimit.test.ts +6 -3
- package/Tests/Server/API/ExpiredSessionAIRoutes.test.ts +708 -0
- package/Tests/Server/API/ExpiredSessionCustomRoutes.test.ts +928 -0
- package/Tests/Server/API/ExpiredSessionMonitorTemplate.test.ts +319 -0
- package/Tests/Server/API/ExpiredSessionOnCallDutyPolicy.test.ts +336 -0
- package/Tests/Server/API/ExpiredSessionRouteGuards.test.ts +820 -0
- package/Tests/Server/API/GlobalConfigLicense.test.ts +140 -0
- package/Tests/Server/API/NotificationChannelVerificationAPI.test.ts +115 -12
- package/Tests/Server/API/OnCallCalendarAPI.test.ts +375 -8
- package/Tests/Server/API/OnCallReadinessAPI.test.ts +175 -17
- package/Tests/Server/API/OnCallScheduleTimelineAPI.test.ts +1513 -0
- package/Tests/Server/API/OnCallSetupReminderAPI.test.ts +119 -7
- package/Tests/Server/API/ProjectScopedCustomRouteAuth.test.ts +111 -4
- package/Tests/Server/API/PublicRouteInvalidAccessToken.test.ts +615 -0
- package/Tests/Server/API/SecurityEventAttributesAPI.test.ts +89 -2
- package/Tests/Server/API/SessionReplayAPI.test.ts +121 -0
- package/Tests/Server/API/StatusPageMasterPasswordRateLimit.test.ts +4 -2
- package/Tests/Server/API/StatusPagePostmortemVisibility.test.ts +441 -0
- package/Tests/Server/API/StatusPageTestEmailReportAuth.test.ts +664 -0
- package/Tests/Server/API/TeamMemberRemoveUserFromProjectAPI.test.ts +7 -0
- package/Tests/Server/API/UserIncomingCallNumberApi.test.ts +6 -0
- package/Tests/Server/API/UserNotificationSettingAPI.test.ts +65 -4
- package/Tests/Server/API/UserProjectsAPI.test.ts +63 -3
- package/Tests/Server/API/UserTotpAuthAPI.test.ts +48 -2
- package/Tests/Server/API/UserWebAuthnAuthenticationOptionsRoute.test.ts +11 -2
- package/Tests/Server/API/UserWebAuthnBackupCodeMinting.test.ts +46 -3
- package/Tests/Server/API/UserWebAuthnPasskeyAPI.test.ts +18 -2
- package/Tests/Server/API/ZZVerifyChatsAuth.test.ts +24 -7
- package/Tests/Server/Middleware/ExpiredSessionUserMiddleware.test.ts +563 -0
- package/Tests/Server/Middleware/MasterAdminAuthorization.test.ts +299 -19
- package/Tests/Server/Middleware/PublicRouteUserMiddleware.test.ts +453 -0
- package/Tests/Server/Services/AIChatPrivacyPin.test.ts +24 -0
- package/Tests/Server/Services/ApiKeyPermissionSecurity.test.ts +2 -0
- package/Tests/Server/Services/ApiKeyPermissionService.test.ts +3 -3
- package/Tests/Server/Services/DatabaseServiceCreateSuppliedId.test.ts +147 -0
- package/Tests/Server/Services/DatabaseServiceLoginBeforeHooks.test.ts +1078 -0
- package/Tests/Server/Services/DatabaseServiceTenantRelationGuard.test.ts +259 -0
- package/Tests/Server/Services/DatabaseServiceWriteOperatorValues.test.ts +147 -0
- package/Tests/Server/Services/MonitorPayAsYouGoBilling.test.ts +115 -1
- package/Tests/Server/Services/OnCallChildCreateAuthorizationPostgres.test.ts +711 -0
- package/Tests/Server/Services/OnCallDutyPolicyChildService.test.ts +733 -0
- package/Tests/Server/Services/PayAsYouGoBillingService.test.ts +190 -140
- package/Tests/Server/Services/PayAsYouGoStripeRateLimitBudget.test.ts +4 -9
- package/Tests/Server/Services/PermissionBlockDeletion.test.ts +780 -0
- package/Tests/Server/Services/PermissionBlockDeletionPostgres.test.ts +628 -0
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +77 -1
- package/Tests/Server/Services/RumSessionPinCreatePermission.test.ts +715 -0
- package/Tests/Server/Services/TeamMemberMultiTenantReadPostgres.test.ts +394 -0
- package/Tests/Server/Services/TeamPrivilegeEscalation.test.ts +6 -0
- package/Tests/Server/Services/TelemetryPayAsYouGoBilling.test.ts +131 -0
- package/Tests/Server/Services/UserNotificationRuleAdminGuards.test.ts +13 -2
- package/Tests/Server/Types/Database/Permissions/ModelPermissionAnonymousRefusal.test.ts +518 -0
- package/Tests/Server/Types/Database/Permissions/MultiTenantPermissions.test.ts +350 -0
- package/Tests/Server/Types/Database/Permissions/OnCallCalendarFeedPermissions.test.ts +282 -25
- package/Tests/Server/Types/Database/Permissions/TableLevelBlockPermission.test.ts +459 -0
- package/Tests/Server/Utils/AI/AIRunPrivacyFilter.test.ts +101 -9
- package/Tests/Server/Utils/AI/ChatAgentHelpers.test.ts +88 -4
- package/Tests/Server/Utils/AI/Toolbox/ExceptionTools.test.ts +459 -0
- package/Tests/Server/Utils/AI/Toolbox/LogTools.test.ts +794 -0
- package/Tests/Server/Utils/AI/Toolbox/RecentChangesTools.test.ts +574 -0
- package/Tests/Server/Utils/AI/Toolbox/SecurityEventTools.test.ts +596 -0
- package/Tests/Server/Utils/CaptchaRequestAndLogging.test.ts +395 -0
- package/Tests/Server/Utils/MasterAdminPageAccess.test.ts +251 -0
- package/Tests/Server/Utils/Monitor/MonitorActionTimestamps.test.ts +616 -0
- package/Tests/Server/Utils/Realtime.test.ts +502 -0
- package/Tests/Server/Utils/SecurityEvent/Connectors/GoogleSecOps/GoogleSecOpsConnectorSeverity.test.ts +216 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +142 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsSeverityRepair.test.ts +140 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsSeverityRepairClickhouseIntegration.test.ts +542 -0
- package/Tests/Server/Utils/Telemetry/ChangeEventRow.test.ts +743 -0
- package/Tests/Server/Utils/Telemetry/RuntimeMetrics.test.ts +465 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.test.ts +202 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.test.ts +194 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.test.ts +231 -0
- package/Tests/Server/Utils/Workspace/Slack/Messages/Alert.test.ts +194 -0
- package/Tests/Server/Utils/Workspace/Slack/Messages/AlertEpisode.test.ts +194 -0
- package/Tests/Server/Utils/Workspace/Slack/Messages/Incident.test.ts +194 -0
- package/Tests/Server/Utils/Workspace/Slack/Messages/IncidentEpisode.test.ts +194 -0
- package/Tests/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.test.ts +247 -0
- package/Tests/Types/AI/AIInsightEvidence.test.ts +206 -0
- package/Tests/Types/BaseDatabase/DatabaseCommonInteractionPropsUtilAnonymous.test.ts +144 -0
- package/Tests/Types/Call/CallProvider.test.ts +528 -0
- package/Tests/Types/Kubernetes/KubernetesCostIngest.test.ts +236 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleTimeline.test.ts +736 -0
- package/Tests/Types/OnCallDutyPolicy/ScheduleTimelineLayout.test.ts +996 -0
- package/Tests/Types/SecurityEvent/SigmaRule.test.ts +142 -0
- package/Tests/Types/Workflow/Components/JSON.test.ts +182 -0
- package/Tests/UI/Components/BasicFormDropdownNormalization.test.tsx +116 -1
- package/Tests/UI/Components/Dropdown/DropdownAsyncOptions.test.tsx +81 -0
- package/Tests/UI/Components/EditionLabelLicenseRefresh.test.tsx +89 -1
- package/Tests/UI/Components/EventAttachmentList.test.tsx +174 -0
- package/Tests/UI/Components/Forms/BasicFormBurnRateTemplateDefaults.test.tsx +395 -0
- package/Tests/UI/Components/Forms/BasicFormCollapsibleSections.test.tsx +286 -0
- package/Tests/UI/Components/Forms/FormSummary.test.tsx +128 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableQueryChange.test.tsx +365 -0
- package/Tests/UI/Components/OpenAuthenticatedUrl.test.ts +358 -0
- package/Tests/UI/Components/SessionAwareImage.test.tsx +496 -0
- package/Tests/UI/Components/TelemetryHistogramZeroBuckets.test.tsx +190 -0
- package/Tests/UI/Components/TooltipInteractive.test.tsx +97 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardInstallGuidance.test.tsx +1 -1
- package/Tests/UI/Monitor/EvaluationLogListTimestamps.test.tsx +367 -0
- package/Tests/UI/Utils/API/BaseAPIRefreshSession.test.ts +1087 -0
- package/Tests/UI/Utils/API/DashboardHost.ts +12 -0
- package/Tests/UI/Utils/API/FakeAxiosServer.ts +183 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealBreadcrumbTrails.ts +10 -0
- package/Tests/UI/Utils/Breadcrumb/fixtures/RealRoutePatterns.ts +2 -0
- package/Tests/UI/Utils/Cookie.test.ts +440 -0
- package/Tests/UI/Utils/ModelAPIRequestClient.test.ts +278 -0
- package/Tests/UI/Utils/Navigation.test.ts +33 -0
- package/Tests/UI/Utils/PricingPlan.test.ts +295 -0
- package/Tests/UI/Utils/Realtime.test.ts +759 -0
- package/Tests/UI/Utils/Telemetry/Telemetry.test.ts +500 -0
- package/Tests/Utils/APIInstanceDispatch.test.ts +311 -0
- package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizerSeverity.test.ts +565 -0
- package/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.ts +40 -0
- package/Types/Monitor/MonitorEvaluationSummary.ts +3 -0
- package/Types/OnCallDutyPolicy/ScheduleTimeline.ts +507 -0
- package/Types/OnCallDutyPolicy/ScheduleTimelineLayout.ts +589 -0
- package/Types/Realtime/EventName.ts +11 -0
- package/Types/SecurityEvent/DetectionFindingConstants.ts +14 -0
- package/Types/SecurityEvent/OcsfSeverity.ts +31 -26
- package/Types/SecurityEvent/SigmaRule.ts +51 -0
- package/Types/SecurityEvent/ThreatIntelConstants.ts +18 -0
- package/UI/Components/AttachmentList/EventAttachmentList.tsx +30 -2
- package/UI/Components/Dashboard/DashboardVariableControl.tsx +12 -2
- package/UI/Components/Dropdown/Dropdown.tsx +6 -1
- package/UI/Components/EditionLabel/EditionLabel.tsx +12 -0
- package/UI/Components/EventItem/EventItem.tsx +12 -1
- package/UI/Components/Forms/BasicForm.tsx +151 -126
- package/UI/Components/Forms/CollapsibleFormSection.tsx +63 -0
- package/UI/Components/Forms/Fields/FormField.tsx +10 -4
- package/UI/Components/Forms/FormSummary.tsx +7 -0
- package/UI/Components/Forms/Types/Field.ts +10 -0
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +2 -1
- package/UI/Components/Markdown.tsx/SessionAwareImage.tsx +122 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +34 -5
- package/UI/Components/ModelTable/TableView.tsx +1 -1
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +8 -1
- package/UI/Components/Tooltip/Tooltip.tsx +8 -1
- package/UI/Utils/API/API.ts +173 -12
- package/UI/Utils/API/RequestOptions.ts +11 -0
- package/UI/Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts +31 -7
- package/UI/Utils/ModelAPI/ModelAPI.ts +30 -9
- package/UI/Utils/Navigation.ts +9 -0
- package/UI/Utils/OpenAuthenticatedUrl.ts +154 -0
- package/UI/Utils/Realtime.ts +176 -30
- package/Utils/API.ts +14 -5
- package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +157 -7
- package/Utils/SecurityEvent/Sigma/SigmaRuleParser.ts +9 -17
- package/Utils/Slo/SloBurnRateTemplate.ts +2 -2
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProjectOnCallCalendarFeed.js +1 -1
- package/build/dist/Models/DatabaseModels/ProjectOnCallCalendarFeed.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserOnCallCalendarFeed.js +1 -1
- package/build/dist/Models/DatabaseModels/UserOnCallCalendarFeed.js.map +1 -1
- package/build/dist/Server/API/AIBillingAPI.js +1 -1
- package/build/dist/Server/API/AIBillingAPI.js.map +1 -1
- package/build/dist/Server/API/AIInsightAPI.js +1 -4
- package/build/dist/Server/API/AIInsightAPI.js.map +1 -1
- package/build/dist/Server/API/AIInvestigationAPI.js +1 -4
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
- package/build/dist/Server/API/AIReadinessAPI.js +1 -3
- package/build/dist/Server/API/AIReadinessAPI.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +1 -1
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/AutoRemediationAPI.js +1 -4
- package/build/dist/Server/API/AutoRemediationAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +12 -0
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAnalyticsAPI.js +55 -10
- package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
- package/build/dist/Server/API/BillingAPI.js +2 -2
- package/build/dist/Server/API/BillingAPI.js.map +1 -1
- package/build/dist/Server/API/BillingInvoiceAPI.js +1 -1
- package/build/dist/Server/API/BillingInvoiceAPI.js.map +1 -1
- package/build/dist/Server/API/BillingPaymentMethodAPI.js +2 -2
- package/build/dist/Server/API/BillingPaymentMethodAPI.js.map +1 -1
- package/build/dist/Server/API/CodeFixRunAPI.js +1 -3
- package/build/dist/Server/API/CodeFixRunAPI.js.map +1 -1
- package/build/dist/Server/API/CommonAPI.js +50 -5
- package/build/dist/Server/API/CommonAPI.js.map +1 -1
- package/build/dist/Server/API/DashboardAPI.js +12 -12
- package/build/dist/Server/API/DashboardAPI.js.map +1 -1
- package/build/dist/Server/API/GlobalConfigAPI.js +12 -0
- package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +2 -2
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/NotificationAPI.js +1 -1
- package/build/dist/Server/API/NotificationAPI.js.map +1 -1
- package/build/dist/Server/API/OnCallCalendarAPI.js +1 -4
- package/build/dist/Server/API/OnCallCalendarAPI.js.map +1 -1
- package/build/dist/Server/API/OnCallDutyPolicyAPI.js +6 -0
- package/build/dist/Server/API/OnCallDutyPolicyAPI.js.map +1 -1
- package/build/dist/Server/API/OnCallReadinessAPI.js +4 -1
- package/build/dist/Server/API/OnCallReadinessAPI.js.map +1 -1
- package/build/dist/Server/API/OnCallScheduleTimelineAPI.js +494 -0
- package/build/dist/Server/API/OnCallScheduleTimelineAPI.js.map +1 -0
- package/build/dist/Server/API/ProjectAPI.js +1 -1
- package/build/dist/Server/API/ProjectAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +125 -33
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TeamMemberAPI.js +3 -3
- package/build/dist/Server/API/TeamMemberAPI.js.map +1 -1
- package/build/dist/Server/API/UserCallAPI.js +2 -2
- package/build/dist/Server/API/UserCallAPI.js.map +1 -1
- package/build/dist/Server/API/UserEmailAPI.js +2 -2
- package/build/dist/Server/API/UserEmailAPI.js.map +1 -1
- package/build/dist/Server/API/UserIncomingCallNumberAPI.js +2 -2
- package/build/dist/Server/API/UserIncomingCallNumberAPI.js.map +1 -1
- package/build/dist/Server/API/UserMicrosoftTeamsAPI.js +1 -1
- package/build/dist/Server/API/UserMicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/UserSlackAPI.js +1 -1
- package/build/dist/Server/API/UserSlackAPI.js.map +1 -1
- package/build/dist/Server/API/UserSmsAPI.js +2 -2
- package/build/dist/Server/API/UserSmsAPI.js.map +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js +2 -2
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebhookAPI.js +1 -1
- package/build/dist/Server/API/UserWebhookAPI.js.map +1 -1
- package/build/dist/Server/API/UserWhatsAppAPI.js +2 -2
- package/build/dist/Server/API/UserWhatsAppAPI.js.map +1 -1
- package/build/dist/Server/Middleware/MasterAdminAuthorization.js +11 -2
- package/build/dist/Server/Middleware/MasterAdminAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +64 -4
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Services/ApiKeyPermissionService.js +80 -4
- package/build/dist/Server/Services/ApiKeyPermissionService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +171 -0
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DetectionRuleService.js +4 -4
- package/build/dist/Server/Services/DetectionRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyChildService.js +170 -0
- package/build/dist/Server/Services/OnCallDutyPolicyChildService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js +2 -2
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +2 -2
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleTeamService.js +2 -2
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleTeamService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +2 -2
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
- package/build/dist/Server/Services/PayAsYouGoBillingService.js +20 -27
- package/build/dist/Server/Services/PayAsYouGoBillingService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +17 -0
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/RumSessionPinService.js +180 -16
- package/build/dist/Server/Services/RumSessionPinService.js.map +1 -1
- package/build/dist/Server/Services/TeamPermissionService.js +89 -27
- package/build/dist/Server/Services/TeamPermissionService.js.map +1 -1
- package/build/dist/Server/Services/ThreatIntelFeedService.js +5 -4
- package/build/dist/Server/Services/ThreatIntelFeedService.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/BasePermission.js +9 -6
- package/build/dist/Server/Types/Database/Permissions/BasePermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/Index.js +60 -6
- package/build/dist/Server/Types/Database/Permissions/Index.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TablePermission.js +14 -13
- package/build/dist/Server/Types/Database/Permissions/TablePermission.js.map +1 -1
- package/build/dist/Server/Utils/AI/AIChatPrivacyFilter.js +7 -0
- package/build/dist/Server/Utils/AI/AIChatPrivacyFilter.js.map +1 -1
- package/build/dist/Server/Utils/AI/AIRunPrivacyFilter.js +7 -0
- package/build/dist/Server/Utils/AI/AIRunPrivacyFilter.js.map +1 -1
- package/build/dist/Server/Utils/MasterAdminPageAccess.js +39 -0
- package/build/dist/Server/Utils/MasterAdminPageAccess.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +3 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +3 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Realtime.js +126 -37
- package/build/dist/Server/Utils/Realtime.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +7 -25
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOpsSeverityRepair.js +127 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOpsSeverityRepair.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js +1 -1
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +3 -2
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js +4 -8
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js.map +1 -1
- package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js +31 -1
- package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/ScheduleTimeline.js +321 -0
- package/build/dist/Types/OnCallDutyPolicy/ScheduleTimeline.js.map +1 -0
- package/build/dist/Types/OnCallDutyPolicy/ScheduleTimelineLayout.js +372 -0
- package/build/dist/Types/OnCallDutyPolicy/ScheduleTimelineLayout.js.map +1 -0
- package/build/dist/Types/Realtime/EventName.js +10 -0
- package/build/dist/Types/Realtime/EventName.js.map +1 -1
- package/build/dist/Types/SecurityEvent/DetectionFindingConstants.js +11 -0
- package/build/dist/Types/SecurityEvent/DetectionFindingConstants.js.map +1 -1
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js +30 -25
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js.map +1 -1
- package/build/dist/Types/SecurityEvent/SigmaRule.js +47 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js.map +1 -1
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js +14 -0
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js.map +1 -1
- package/build/dist/UI/Components/AttachmentList/EventAttachmentList.js +9 -4
- package/build/dist/UI/Components/AttachmentList/EventAttachmentList.js.map +1 -1
- package/build/dist/UI/Components/Dashboard/DashboardVariableControl.js +10 -2
- package/build/dist/UI/Components/Dashboard/DashboardVariableControl.js.map +1 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js +5 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +11 -0
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/EventItem/EventItem.js +2 -2
- package/build/dist/UI/Components/EventItem/EventItem.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +70 -64
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/CollapsibleFormSection.js +27 -0
- package/build/dist/UI/Components/Forms/CollapsibleFormSection.js.map +1 -0
- package/build/dist/UI/Components/Forms/Fields/FormField.js +10 -7
- package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
- package/build/dist/UI/Components/Forms/FormSummary.js +7 -0
- package/build/dist/UI/Components/Forms/FormSummary.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +2 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/SessionAwareImage.js +84 -0
- package/build/dist/UI/Components/Markdown.tsx/SessionAwareImage.js.map +1 -0
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +14 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +8 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js +2 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
- package/build/dist/UI/Utils/API/API.js +143 -19
- package/build/dist/UI/Utils/API/API.js.map +1 -1
- package/build/dist/UI/Utils/AnalyticsModelAPI/AnalyticsModelAPI.js +21 -7
- package/build/dist/UI/Utils/AnalyticsModelAPI/AnalyticsModelAPI.js.map +1 -1
- package/build/dist/UI/Utils/ModelAPI/ModelAPI.js +26 -9
- package/build/dist/UI/Utils/ModelAPI/ModelAPI.js.map +1 -1
- package/build/dist/UI/Utils/Navigation.js +8 -0
- package/build/dist/UI/Utils/Navigation.js.map +1 -1
- package/build/dist/UI/Utils/OpenAuthenticatedUrl.js +92 -0
- package/build/dist/UI/Utils/OpenAuthenticatedUrl.js.map +1 -0
- package/build/dist/UI/Utils/Realtime.js +120 -15
- package/build/dist/UI/Utils/Realtime.js.map +1 -1
- package/build/dist/Utils/API.js +13 -5
- package/build/dist/Utils/API.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +123 -6
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +4 -18
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js.map +1 -1
- package/build/dist/Utils/Slo/SloBurnRateTemplate.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import OneUptimeDate from "../Date";
|
|
2
|
+
import moment from "moment-timezone";
|
|
3
|
+
/*
|
|
4
|
+
* The geometry of the schedule timeline, kept free of React so every rule
|
|
5
|
+
* that decides WHERE something is drawn is unit-tested on its own.
|
|
6
|
+
*
|
|
7
|
+
* Two ideas carry the whole file:
|
|
8
|
+
*
|
|
9
|
+
* 1. Days are computed in the VIEW timezone, never the browser's. A week is
|
|
10
|
+
* Monday 00:00 to the next Monday 00:00 on the wall clock of the zone the
|
|
11
|
+
* reader picked, so "Tuesday" means the same thing in the header and in
|
|
12
|
+
* the tooltip, whatever machine the page is open on.
|
|
13
|
+
*
|
|
14
|
+
* 2. Positions are in COLUMN space, not in raw time. Every day column has the
|
|
15
|
+
* same width, but a DST day lasts 23 or 25 hours, so a bar positioned by
|
|
16
|
+
* (t - rangeStart) / rangeLength would drift off its column by up to an
|
|
17
|
+
* hour across a clock change. Instead an instant is placed in the column
|
|
18
|
+
* of its day, at the fraction of that day that has elapsed, and a shift
|
|
19
|
+
* that ends at local midnight always ends exactly on a gridline.
|
|
20
|
+
*/
|
|
21
|
+
export var TimelineViewMode;
|
|
22
|
+
(function (TimelineViewMode) {
|
|
23
|
+
TimelineViewMode["Week"] = "week";
|
|
24
|
+
TimelineViewMode["Month"] = "month";
|
|
25
|
+
})(TimelineViewMode || (TimelineViewMode = {}));
|
|
26
|
+
const MILLISECONDS_PER_MINUTE = 60 * 1000;
|
|
27
|
+
const HEX_COLOR_PATTERN = /^[0-9a-fA-F]{6}$/;
|
|
28
|
+
export default class ScheduleTimelineLayout {
|
|
29
|
+
/*
|
|
30
|
+
* The days on screen for `mode` around `anchor`, in `timezone`:
|
|
31
|
+
* Week -> the ISO week (Monday first) containing the anchor;
|
|
32
|
+
* Month -> the calendar month containing the anchor.
|
|
33
|
+
*
|
|
34
|
+
* Days are walked as plain calendar dates and each day's edge is parsed in
|
|
35
|
+
* the zone, rather than by stepping a zoned moment a day at a time. In the
|
|
36
|
+
* zones whose DST gap is AT midnight (America/Santiago, America/Havana,
|
|
37
|
+
* Asia/Beirut, Atlantic/Azores, Africa/Cairo) there is no 00:00 on the
|
|
38
|
+
* change day; stepping a zoned moment lands an hour off and drags the
|
|
39
|
+
* neighbouring day's edge with it, while parsing the date resolves to the
|
|
40
|
+
* first instant that day actually has.
|
|
41
|
+
*/
|
|
42
|
+
static getRange(data) {
|
|
43
|
+
const anchorDate = ScheduleTimelineLayout.getCalendarDate(data.anchor, data.timezone);
|
|
44
|
+
const firstDate = data.mode === TimelineViewMode.Month
|
|
45
|
+
? anchorDate.clone().startOf("month")
|
|
46
|
+
: anchorDate.clone().startOf("isoWeek");
|
|
47
|
+
const dayCount = data.mode === TimelineViewMode.Month ? firstDate.daysInMonth() : 7;
|
|
48
|
+
const days = [];
|
|
49
|
+
for (let index = 0; index < dayCount; index++) {
|
|
50
|
+
const date = firstDate.clone().add(index, "days");
|
|
51
|
+
const isoWeekday = date.isoWeekday();
|
|
52
|
+
days.push({
|
|
53
|
+
key: date.format("YYYY-MM-DD"),
|
|
54
|
+
start: ScheduleTimelineLayout.getStartOfLocalDay(date, data.timezone),
|
|
55
|
+
end: ScheduleTimelineLayout.getStartOfLocalDay(date.clone().add(1, "day"), data.timezone),
|
|
56
|
+
dayOfMonth: date.date(),
|
|
57
|
+
weekdayShort: date.format("ddd"),
|
|
58
|
+
weekdayNarrow: date.format("dd").charAt(0),
|
|
59
|
+
monthShort: date.format("MMM"),
|
|
60
|
+
isWeekend: isoWeekday === 6 || isoWeekday === 7,
|
|
61
|
+
isFirstOfMonth: date.date() === 1,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
mode: data.mode,
|
|
66
|
+
timezone: data.timezone,
|
|
67
|
+
start: days[0].start,
|
|
68
|
+
end: days[days.length - 1].end,
|
|
69
|
+
days,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/*
|
|
73
|
+
* An anchor inside the week / month before or after: local noon of that
|
|
74
|
+
* period's first day. Noon rather than midnight, so no anchor ever sits on
|
|
75
|
+
* an edge that a DST change or a later zone switch could move.
|
|
76
|
+
*/
|
|
77
|
+
static shiftAnchor(data) {
|
|
78
|
+
const anchorDate = ScheduleTimelineLayout.getCalendarDate(data.anchor, data.timezone);
|
|
79
|
+
const target = data.mode === TimelineViewMode.Month
|
|
80
|
+
? anchorDate.clone().startOf("month").add(data.direction, "month")
|
|
81
|
+
: anchorDate
|
|
82
|
+
.clone()
|
|
83
|
+
.startOf("isoWeek")
|
|
84
|
+
.add(data.direction * 7, "days");
|
|
85
|
+
return moment
|
|
86
|
+
.tz(`${target.format("YYYY-MM-DD")} 12:00`, "YYYY-MM-DD HH:mm", data.timezone)
|
|
87
|
+
.toDate();
|
|
88
|
+
}
|
|
89
|
+
/*
|
|
90
|
+
* The same wall-clock moment in another zone. Used when the reader changes
|
|
91
|
+
* the view zone, so the dates on screen stay the dates on screen: the same
|
|
92
|
+
* INSTANT would fall on the previous day in any zone west of the old one
|
|
93
|
+
* and quietly page the view back a week or a month.
|
|
94
|
+
*/
|
|
95
|
+
static moveAnchorToTimezone(data) {
|
|
96
|
+
const wallClock = moment
|
|
97
|
+
.tz(data.anchor, data.fromTimezone)
|
|
98
|
+
.format("YYYY-MM-DDTHH:mm:ss");
|
|
99
|
+
return moment
|
|
100
|
+
.tz(wallClock, "YYYY-MM-DDTHH:mm:ss", data.toTimezone)
|
|
101
|
+
.toDate();
|
|
102
|
+
}
|
|
103
|
+
// The calendar date of `date` in `timezone`, as a zone-free UTC moment.
|
|
104
|
+
static getCalendarDate(date, timezone) {
|
|
105
|
+
return moment.utc(moment.tz(date, timezone).format("YYYY-MM-DD"), "YYYY-MM-DD");
|
|
106
|
+
}
|
|
107
|
+
// The first instant of a calendar date in `timezone` (DST-gap safe).
|
|
108
|
+
static getStartOfLocalDay(calendarDate, timezone) {
|
|
109
|
+
return moment
|
|
110
|
+
.tz(calendarDate.format("YYYY-MM-DD"), "YYYY-MM-DD", timezone)
|
|
111
|
+
.toDate();
|
|
112
|
+
}
|
|
113
|
+
/*
|
|
114
|
+
* "September 14 – 20, 2026", "Sep 28 – Oct 4, 2026",
|
|
115
|
+
* "Dec 28, 2026 – Jan 3, 2027" or "September 2026".
|
|
116
|
+
*/
|
|
117
|
+
static getRangeLabel(range) {
|
|
118
|
+
const first = moment.tz(range.start, range.timezone);
|
|
119
|
+
if (range.mode === TimelineViewMode.Month) {
|
|
120
|
+
return first.format("MMMM YYYY");
|
|
121
|
+
}
|
|
122
|
+
const lastDay = range.days[range.days.length - 1];
|
|
123
|
+
const last = moment.tz(lastDay ? lastDay.start : range.start, range.timezone);
|
|
124
|
+
if (first.year() !== last.year()) {
|
|
125
|
+
return `${first.format("MMM D, YYYY")} – ${last.format("MMM D, YYYY")}`;
|
|
126
|
+
}
|
|
127
|
+
if (first.month() !== last.month()) {
|
|
128
|
+
return `${first.format("MMM D")} – ${last.format("MMM D, YYYY")}`;
|
|
129
|
+
}
|
|
130
|
+
return `${first.format("MMMM D")} – ${last.format("D, YYYY")}`;
|
|
131
|
+
}
|
|
132
|
+
// "YYYY-MM-DD" of the day containing `date` in `timezone`.
|
|
133
|
+
static getDayKey(date, timezone) {
|
|
134
|
+
return moment.tz(date, timezone).format("YYYY-MM-DD");
|
|
135
|
+
}
|
|
136
|
+
static isWithinRange(date, range) {
|
|
137
|
+
return (date.getTime() >= range.start.getTime() &&
|
|
138
|
+
date.getTime() < range.end.getTime());
|
|
139
|
+
}
|
|
140
|
+
/*
|
|
141
|
+
* Where `instant` falls across the day columns, from 0 (the left edge of
|
|
142
|
+
* the first day) to 1 (the right edge of the last). See the file comment
|
|
143
|
+
* for why this is column space rather than raw time.
|
|
144
|
+
*/
|
|
145
|
+
static getFraction(instant, range) {
|
|
146
|
+
const days = range.days;
|
|
147
|
+
if (days.length === 0) {
|
|
148
|
+
return 0;
|
|
149
|
+
}
|
|
150
|
+
const time = instant.getTime();
|
|
151
|
+
if (time <= days[0].start.getTime()) {
|
|
152
|
+
return 0;
|
|
153
|
+
}
|
|
154
|
+
if (time >= days[days.length - 1].end.getTime()) {
|
|
155
|
+
return 1;
|
|
156
|
+
}
|
|
157
|
+
let low = 0;
|
|
158
|
+
let high = days.length - 1;
|
|
159
|
+
while (low < high) {
|
|
160
|
+
const mid = Math.floor((low + high + 1) / 2);
|
|
161
|
+
if (days[mid].start.getTime() <= time) {
|
|
162
|
+
low = mid;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
high = mid - 1;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const day = days[low];
|
|
169
|
+
const dayLength = day.end.getTime() - day.start.getTime();
|
|
170
|
+
const withinDay = dayLength > 0 ? (time - day.start.getTime()) / dayLength : 0;
|
|
171
|
+
return (low + Math.min(1, Math.max(0, withinDay))) / days.length;
|
|
172
|
+
}
|
|
173
|
+
/*
|
|
174
|
+
* Place intervals on the day area. Anything that does not overlap the
|
|
175
|
+
* range is dropped; anything that runs past an edge is cut there and says
|
|
176
|
+
* so, so the bar can square off that end instead of pretending to start or
|
|
177
|
+
* stop at the edge of the screen.
|
|
178
|
+
*/
|
|
179
|
+
static positionIntervals(items, range) {
|
|
180
|
+
const out = [];
|
|
181
|
+
for (const item of items) {
|
|
182
|
+
if (item.end.getTime() <= range.start.getTime() ||
|
|
183
|
+
item.start.getTime() >= range.end.getTime()) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
const left = ScheduleTimelineLayout.getFraction(item.start, range) * 100;
|
|
187
|
+
const right = ScheduleTimelineLayout.getFraction(item.end, range) * 100;
|
|
188
|
+
if (right <= left) {
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
out.push({
|
|
192
|
+
item,
|
|
193
|
+
left,
|
|
194
|
+
width: right - left,
|
|
195
|
+
continuesBefore: item.start.getTime() < range.start.getTime(),
|
|
196
|
+
continuesAfter: item.end.getTime() > range.end.getTime(),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return out;
|
|
200
|
+
}
|
|
201
|
+
/*
|
|
202
|
+
* The stretches of [windowStart, windowEnd) that no interval covers,
|
|
203
|
+
* ignoring holes shorter than `minimumGapMs` (the engine's one-second seams
|
|
204
|
+
* and similar slivers would otherwise draw as hairlines). Overlapping and
|
|
205
|
+
* unsorted input is fine.
|
|
206
|
+
*/
|
|
207
|
+
static computeGaps(intervals, windowStart, windowEnd, minimumGapMs = MILLISECONDS_PER_MINUTE) {
|
|
208
|
+
const startTime = windowStart.getTime();
|
|
209
|
+
const endTime = windowEnd.getTime();
|
|
210
|
+
if (endTime <= startTime) {
|
|
211
|
+
return [];
|
|
212
|
+
}
|
|
213
|
+
const sorted = intervals
|
|
214
|
+
.filter((interval) => {
|
|
215
|
+
return (interval.end.getTime() > startTime &&
|
|
216
|
+
interval.start.getTime() < endTime &&
|
|
217
|
+
interval.end.getTime() > interval.start.getTime());
|
|
218
|
+
})
|
|
219
|
+
.sort((a, b) => {
|
|
220
|
+
return a.start.getTime() - b.start.getTime();
|
|
221
|
+
});
|
|
222
|
+
const gaps = [];
|
|
223
|
+
let cursor = startTime;
|
|
224
|
+
const pushGap = (from, to) => {
|
|
225
|
+
if (to - from >= Math.max(1, minimumGapMs)) {
|
|
226
|
+
gaps.push({ start: new Date(from), end: new Date(to) });
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
for (const interval of sorted) {
|
|
230
|
+
const intervalStart = Math.max(startTime, interval.start.getTime());
|
|
231
|
+
const intervalEnd = Math.min(endTime, interval.end.getTime());
|
|
232
|
+
if (intervalStart > cursor) {
|
|
233
|
+
pushGap(cursor, intervalStart);
|
|
234
|
+
}
|
|
235
|
+
cursor = Math.max(cursor, intervalEnd);
|
|
236
|
+
}
|
|
237
|
+
if (cursor < endTime) {
|
|
238
|
+
pushGap(cursor, endTime);
|
|
239
|
+
}
|
|
240
|
+
return gaps;
|
|
241
|
+
}
|
|
242
|
+
// The first interval containing `now`, if any.
|
|
243
|
+
static findActive(items, now) {
|
|
244
|
+
for (const item of items) {
|
|
245
|
+
if (item.start.getTime() <= now.getTime() &&
|
|
246
|
+
item.end.getTime() > now.getTime()) {
|
|
247
|
+
return item;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
/*
|
|
253
|
+
* "Mon, Sep 14, 09:00 → Mon, Sep 21, 09:00", or
|
|
254
|
+
* "Mon, Sep 14, 09:00 – 17:00" when both ends are on the same day. The end
|
|
255
|
+
* is exclusive, so a shift ending at midnight reads "→ Tue, 00:00".
|
|
256
|
+
*/
|
|
257
|
+
static formatInterval(data) {
|
|
258
|
+
var _a;
|
|
259
|
+
const use12HourFormat = (_a = data.use12HourFormat) !== null && _a !== void 0 ? _a : OneUptimeDate.getUserPrefers12HourFormat();
|
|
260
|
+
const timeFormat = use12HourFormat ? "h:mm A" : "HH:mm";
|
|
261
|
+
const dateFormat = "ddd, MMM D";
|
|
262
|
+
const start = moment.tz(data.start, data.timezone);
|
|
263
|
+
const end = moment.tz(data.end, data.timezone);
|
|
264
|
+
const startText = `${start.format(dateFormat)}, ${start.format(timeFormat)}`;
|
|
265
|
+
if (start.format("YYYY-MM-DD") === end.format("YYYY-MM-DD")) {
|
|
266
|
+
return `${startText} – ${end.format(timeFormat)}`;
|
|
267
|
+
}
|
|
268
|
+
const sameYear = start.year() === end.year();
|
|
269
|
+
const endDateFormat = sameYear ? dateFormat : "ddd, MMM D, YYYY";
|
|
270
|
+
return `${startText} → ${end.format(endDateFormat)}, ${end.format(timeFormat)}`;
|
|
271
|
+
}
|
|
272
|
+
// "7d", "3d 12h", "8h", "8h 30m", "45m", "<1m".
|
|
273
|
+
static formatDuration(milliseconds) {
|
|
274
|
+
if (!Number.isFinite(milliseconds) ||
|
|
275
|
+
milliseconds < MILLISECONDS_PER_MINUTE) {
|
|
276
|
+
return "<1m";
|
|
277
|
+
}
|
|
278
|
+
const totalMinutes = Math.round(milliseconds / MILLISECONDS_PER_MINUTE);
|
|
279
|
+
const days = Math.floor(totalMinutes / (24 * 60));
|
|
280
|
+
const hours = Math.floor((totalMinutes % (24 * 60)) / 60);
|
|
281
|
+
const minutes = totalMinutes % 60;
|
|
282
|
+
if (days > 0) {
|
|
283
|
+
return hours > 0 ? `${days}d ${hours}h` : `${days}d`;
|
|
284
|
+
}
|
|
285
|
+
if (hours > 0) {
|
|
286
|
+
return minutes > 0 ? `${hours}h ${minutes}m` : `${hours}h`;
|
|
287
|
+
}
|
|
288
|
+
return `${minutes}m`;
|
|
289
|
+
}
|
|
290
|
+
/*
|
|
291
|
+
* Hours on call inside the window, summed over the intervals (each cut to
|
|
292
|
+
* the window). Overlaps are NOT merged: two schedules at once are two
|
|
293
|
+
* rosters, and the legend reports load, not wall-clock presence.
|
|
294
|
+
*/
|
|
295
|
+
static sumWithin(intervals, window) {
|
|
296
|
+
let total = 0;
|
|
297
|
+
for (const interval of intervals) {
|
|
298
|
+
const start = Math.max(interval.start.getTime(), window.start.getTime());
|
|
299
|
+
const end = Math.min(interval.end.getTime(), window.end.getTime());
|
|
300
|
+
if (end > start) {
|
|
301
|
+
total += end - start;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return total;
|
|
305
|
+
}
|
|
306
|
+
/*
|
|
307
|
+
* Whether the reader may page to the previous / next range: only while
|
|
308
|
+
* part of that range is still inside the window the server can draw.
|
|
309
|
+
*/
|
|
310
|
+
static getNavigability(data) {
|
|
311
|
+
const previous = ScheduleTimelineLayout.getRange({
|
|
312
|
+
mode: data.mode,
|
|
313
|
+
timezone: data.timezone,
|
|
314
|
+
anchor: ScheduleTimelineLayout.shiftAnchor(Object.assign(Object.assign({}, data), { direction: -1 })),
|
|
315
|
+
});
|
|
316
|
+
const next = ScheduleTimelineLayout.getRange({
|
|
317
|
+
mode: data.mode,
|
|
318
|
+
timezone: data.timezone,
|
|
319
|
+
anchor: ScheduleTimelineLayout.shiftAnchor(Object.assign(Object.assign({}, data), { direction: 1 })),
|
|
320
|
+
});
|
|
321
|
+
return {
|
|
322
|
+
canGoBack: previous.end.getTime() > data.addressable.start.getTime(),
|
|
323
|
+
canGoForward: next.start.getTime() < data.addressable.end.getTime(),
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
/*
|
|
327
|
+
* `#rrggbb` (or `#rgb`) at `alpha`, as an rgba() string. Anything that is
|
|
328
|
+
* not a hex colour is returned untouched so a bad value degrades to a solid
|
|
329
|
+
* colour rather than to no colour at all.
|
|
330
|
+
*/
|
|
331
|
+
static withAlpha(color, alpha) {
|
|
332
|
+
const rgb = ScheduleTimelineLayout.parseHex(color);
|
|
333
|
+
if (!rgb) {
|
|
334
|
+
return color;
|
|
335
|
+
}
|
|
336
|
+
const clamped = Math.min(1, Math.max(0, alpha));
|
|
337
|
+
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${clamped})`;
|
|
338
|
+
}
|
|
339
|
+
/*
|
|
340
|
+
* Near-black or white, whichever reads on `color`. The per-user palette
|
|
341
|
+
* runs from black to yellow and lime, so a fixed text colour is unreadable
|
|
342
|
+
* on some avatars.
|
|
343
|
+
*/
|
|
344
|
+
static getContrastTextColor(color) {
|
|
345
|
+
const rgb = ScheduleTimelineLayout.parseHex(color);
|
|
346
|
+
if (!rgb) {
|
|
347
|
+
return "#ffffff";
|
|
348
|
+
}
|
|
349
|
+
const luminance = (0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]) / 255;
|
|
350
|
+
return luminance > 0.62 ? "#111827" : "#ffffff";
|
|
351
|
+
}
|
|
352
|
+
static parseHex(color) {
|
|
353
|
+
const hex = color.trim().replace(/^#/, "");
|
|
354
|
+
const full = hex.length === 3
|
|
355
|
+
? hex
|
|
356
|
+
.split("")
|
|
357
|
+
.map((char) => {
|
|
358
|
+
return char + char;
|
|
359
|
+
})
|
|
360
|
+
.join("")
|
|
361
|
+
: hex;
|
|
362
|
+
if (!HEX_COLOR_PATTERN.test(full)) {
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
return [
|
|
366
|
+
parseInt(full.slice(0, 2), 16),
|
|
367
|
+
parseInt(full.slice(2, 4), 16),
|
|
368
|
+
parseInt(full.slice(4, 6), 16),
|
|
369
|
+
];
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
//# sourceMappingURL=ScheduleTimelineLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduleTimelineLayout.js","sourceRoot":"","sources":["../../../../Types/OnCallDutyPolicy/ScheduleTimelineLayout.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAyCD,MAAM,uBAAuB,GAAW,EAAE,GAAG,IAAI,CAAC;AAElD,MAAM,iBAAiB,GAAW,kBAAkB,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,sBAAsB;IACzC;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,QAAQ,CAAC,IAItB;QACC,MAAM,UAAU,GAAkB,sBAAsB,CAAC,eAAe,CACtE,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,QAAQ,CACd,CAAC;QAEF,MAAM,SAAS,GACb,IAAI,CAAC,IAAI,KAAK,gBAAgB,CAAC,KAAK;YAClC,CAAC,CAAC,UAAU,CAAC,KA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,GAAG,IAAI,CAAC;YACrB,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC;YACb,CAAC,CAAC,GAAG,CAAC;QAEV,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO;YACL,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;SAC/B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
var EventName;
|
|
2
2
|
(function (EventName) {
|
|
3
3
|
EventName["ListenToModalEvent"] = "ListenToModelEvent";
|
|
4
|
+
/*
|
|
5
|
+
* Server -> client. A ListenToModelEvent was refused because the socket's
|
|
6
|
+
* handshake carried no access token, or one that no longer decodes (the
|
|
7
|
+
* dashboard's access token lives 15 minutes; the handshake cookie lives as
|
|
8
|
+
* long as the connection). The payload is the refused ListenToModelEventJSON.
|
|
9
|
+
*
|
|
10
|
+
* The socket can not be re-authenticated in place: the cookie is read from
|
|
11
|
+
* the handshake, so the client has to refresh its session and reconnect.
|
|
12
|
+
*/
|
|
13
|
+
EventName["AuthenticationRequired"] = "AuthenticationRequired";
|
|
4
14
|
})(EventName || (EventName = {}));
|
|
5
15
|
export default EventName;
|
|
6
16
|
//# sourceMappingURL=EventName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventName.js","sourceRoot":"","sources":["../../../../Types/Realtime/EventName.ts"],"names":[],"mappings":"AAAA,IAAK,
|
|
1
|
+
{"version":3,"file":"EventName.js","sourceRoot":"","sources":["../../../../Types/Realtime/EventName.ts"],"names":[],"mappings":"AAAA,IAAK,SAaJ;AAbD,WAAK,SAAS;IACZ,sDAAyC,CAAA;IAEzC;;;;;;;;OAQG;IACH,8DAAiD,CAAA;AACnD,CAAC,EAbI,SAAS,KAAT,SAAS,QAab;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -24,4 +24,15 @@ export const DETECTION_MATCH_COUNT_THRESHOLD_MIN = 1;
|
|
|
24
24
|
export const DETECTION_MATCH_COUNT_THRESHOLD_MAX = 1000000;
|
|
25
25
|
export const DETECTION_GROUP_VALUE_ATTRIBUTE = "oneuptime.detection.group_value";
|
|
26
26
|
export const DETECTION_SIGMA_ID_ATTRIBUTE = "oneuptime.detection.sigma_id";
|
|
27
|
+
// Save-time bounds for DetectionRule.evaluationIntervalInMinutes.
|
|
28
|
+
export const DETECTION_EVALUATION_INTERVAL_MIN_IN_MINUTES = 1;
|
|
29
|
+
export const DETECTION_EVALUATION_INTERVAL_MAX_IN_MINUTES = 1440;
|
|
30
|
+
/*
|
|
31
|
+
* Cap on how far back one evaluation may scan, whatever lastEvaluatedAt
|
|
32
|
+
* says — a rule re-enabled after a month must not trigger a month-long
|
|
33
|
+
* table scan.
|
|
34
|
+
*/
|
|
35
|
+
export const DETECTION_MAX_LOOKBACK_IN_MINUTES = 24 * 60;
|
|
36
|
+
// One alert per distinct group value per cycle, at most.
|
|
37
|
+
export const DETECTION_MAX_GROUPS_PER_EVALUATION = 100;
|
|
27
38
|
//# sourceMappingURL=DetectionFindingConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetectionFindingConstants.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/DetectionFindingConstants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,2BAA2B,GAAW,IAAI,CAAC;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAW,mBAAmB,CAAC;AAExE,+DAA+D;AAC/D,MAAM,CAAC,MAAM,2BAA2B,GACtC,6BAA6B,CAAC;AAChC,MAAM,CAAC,MAAM,6BAA6B,GACxC,+BAA+B,CAAC;AAClC,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AACpC,qEAAqE;AACrE,MAAM,CAAC,MAAM,kCAAkC,GAC7C,oCAAoC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAW,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,mCAAmC,GAAW,OAAO,CAAC;AACnE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,4BAA4B,GACvC,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"DetectionFindingConstants.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/DetectionFindingConstants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,2BAA2B,GAAW,IAAI,CAAC;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAW,mBAAmB,CAAC;AAExE,+DAA+D;AAC/D,MAAM,CAAC,MAAM,2BAA2B,GACtC,6BAA6B,CAAC;AAChC,MAAM,CAAC,MAAM,6BAA6B,GACxC,+BAA+B,CAAC;AAClC,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AACpC,qEAAqE;AACrE,MAAM,CAAC,MAAM,kCAAkC,GAC7C,oCAAoC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAW,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,mCAAmC,GAAW,OAAO,CAAC;AACnE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,4BAA4B,GACvC,8BAA8B,CAAC;AAEjC,kEAAkE;AAClE,MAAM,CAAC,MAAM,4CAA4C,GAAW,CAAC,CAAC;AACtE,MAAM,CAAC,MAAM,4CAA4C,GAAW,IAAI,CAAC;AAEzE;;;;GAIG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAW,EAAE,GAAG,EAAE,CAAC;AAEjE,yDAAyD;AACzD,MAAM,CAAC,MAAM,mCAAmC,GAAW,GAAG,CAAC"}
|
|
@@ -39,6 +39,35 @@ export function ocsfSeverityFromId(id) {
|
|
|
39
39
|
}
|
|
40
40
|
return OcsfSeverity.Unknown;
|
|
41
41
|
}
|
|
42
|
+
/*
|
|
43
|
+
* Upper-cased severity text -> OCSF severity. Exported so SQL that grades
|
|
44
|
+
* stored rows (the Google SecOps severity backfill) is generated from this
|
|
45
|
+
* table instead of restating it.
|
|
46
|
+
*/
|
|
47
|
+
export const OCSF_SEVERITY_ALIASES = {
|
|
48
|
+
UNKNOWN: OcsfSeverity.Unknown,
|
|
49
|
+
UNKNOWN_SEVERITY: OcsfSeverity.Unknown,
|
|
50
|
+
NONE: OcsfSeverity.Informational,
|
|
51
|
+
INFO: OcsfSeverity.Informational,
|
|
52
|
+
INFORMATION: OcsfSeverity.Informational,
|
|
53
|
+
INFORMATIONAL: OcsfSeverity.Informational,
|
|
54
|
+
NOTICE: OcsfSeverity.Informational,
|
|
55
|
+
DEBUG: OcsfSeverity.Informational,
|
|
56
|
+
LOW: OcsfSeverity.Low,
|
|
57
|
+
WARN: OcsfSeverity.Low,
|
|
58
|
+
WARNING: OcsfSeverity.Low,
|
|
59
|
+
MEDIUM: OcsfSeverity.Medium,
|
|
60
|
+
MODERATE: OcsfSeverity.Medium,
|
|
61
|
+
ERR: OcsfSeverity.Medium,
|
|
62
|
+
ERROR: OcsfSeverity.Medium,
|
|
63
|
+
HIGH: OcsfSeverity.High,
|
|
64
|
+
SEVERE: OcsfSeverity.High,
|
|
65
|
+
CRITICAL: OcsfSeverity.Critical,
|
|
66
|
+
CRIT: OcsfSeverity.Critical,
|
|
67
|
+
ALERT: OcsfSeverity.Critical,
|
|
68
|
+
FATAL: OcsfSeverity.Fatal,
|
|
69
|
+
EMERGENCY: OcsfSeverity.Fatal,
|
|
70
|
+
};
|
|
42
71
|
/*
|
|
43
72
|
* Loose severity text -> OCSF severity. Accepts the dialects we ingest:
|
|
44
73
|
* UDM security_result severities (EMERGENCY/ALERT/CRITICAL/ERROR/HIGH/...),
|
|
@@ -51,31 +80,7 @@ export function normalizeOcsfSeverity(text) {
|
|
|
51
80
|
if (!normalized) {
|
|
52
81
|
return null;
|
|
53
82
|
}
|
|
54
|
-
|
|
55
|
-
UNKNOWN: OcsfSeverity.Unknown,
|
|
56
|
-
UNKNOWN_SEVERITY: OcsfSeverity.Unknown,
|
|
57
|
-
NONE: OcsfSeverity.Informational,
|
|
58
|
-
INFO: OcsfSeverity.Informational,
|
|
59
|
-
INFORMATION: OcsfSeverity.Informational,
|
|
60
|
-
INFORMATIONAL: OcsfSeverity.Informational,
|
|
61
|
-
NOTICE: OcsfSeverity.Informational,
|
|
62
|
-
DEBUG: OcsfSeverity.Informational,
|
|
63
|
-
LOW: OcsfSeverity.Low,
|
|
64
|
-
WARN: OcsfSeverity.Low,
|
|
65
|
-
WARNING: OcsfSeverity.Low,
|
|
66
|
-
MEDIUM: OcsfSeverity.Medium,
|
|
67
|
-
MODERATE: OcsfSeverity.Medium,
|
|
68
|
-
ERR: OcsfSeverity.Medium,
|
|
69
|
-
ERROR: OcsfSeverity.Medium,
|
|
70
|
-
HIGH: OcsfSeverity.High,
|
|
71
|
-
SEVERE: OcsfSeverity.High,
|
|
72
|
-
CRITICAL: OcsfSeverity.Critical,
|
|
73
|
-
CRIT: OcsfSeverity.Critical,
|
|
74
|
-
ALERT: OcsfSeverity.Critical,
|
|
75
|
-
FATAL: OcsfSeverity.Fatal,
|
|
76
|
-
EMERGENCY: OcsfSeverity.Fatal,
|
|
77
|
-
};
|
|
78
|
-
return aliases[normalized] || null;
|
|
83
|
+
return OCSF_SEVERITY_ALIASES[normalized] || null;
|
|
79
84
|
}
|
|
80
85
|
export default OcsfSeverity;
|
|
81
86
|
//# sourceMappingURL=OcsfSeverity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OcsfSeverity.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/OcsfSeverity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,IAAK,YASJ;AATD,WAAK,YAAY;IACf,mCAAmB,CAAA;IACnB,+CAA+B,CAAA;IAC/B,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,+BAAe,CAAA;AACjB,CAAC,EATI,YAAY,KAAZ,YAAY,QAShB;AAED,MAAM,CAAC,MAAM,cAAc,GAAiC;IAC1D,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;IACzB,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IAC/B,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACrB,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IACxB,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IACtB,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1B,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;IACvB,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE;CACzB,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,MAAM,OAAO,GAA4B,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAExE,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,OAAO,EAAE,CAAC;QACpC,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACjB,OAAO,IAAoB,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC,OAAO,CAAC;AAC9B,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"OcsfSeverity.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/OcsfSe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a;IAChC,WAAW,EAAE,YAAY,CAAC,aAAa;IACvC,aAAa,EAAE,YAAY,CAAC,aAAa;IACzC,MAAM,EAAE,YAAY,CAAC,aAAa;IAClC,KAAK,EAAE,YAAY,CAAC,aAAa;IACjC,GAAG,EAAE,YAAY,CAAC,GAAG;IACrB,IAAI,EAAE,YAAY,CAAC,GAAG;IACtB,OAAO,EAAE,YAAY,CAAC,GAAG;IACzB,MAAM,EAAE,YAAY,CAAC,MAAM;IAC3B,QAAQ,EAAE,YAAY,CAAC,MAAM;IAC7B,GAAG,EAAE,YAAY,CAAC,MAAM;IACxB,KAAK,EAAE,YAAY,CAAC,MAAM;IAC1B,IAAI,EAAE,YAAY,CAAC,IAAI;IACvB,MAAM,EAAE,YAAY,CAAC,IAAI;IACzB,QAAQ,EAAE,YAAY,CAAC,QAAQ;IAC/B,IAAI,EAAE,YAAY,CAAC,QAAQ;IAC3B,KAAK,EAAE,YAAY,CAAC,QAAQ;IAC5B,KAAK,EAAE,YAAY,CAAC,KAAK;IACzB,SAAS,EAAE,YAAY,CAAC,KAAK;CAC9B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,MAAM,UAAU,GAAW,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAE7D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,qBAAqB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC;AACnD,CAAC;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import OcsfSeverity from "./OcsfSeverity";
|
|
1
2
|
/*
|
|
2
3
|
* Typed representation of a parsed Sigma rule — the subset OneUptime's
|
|
3
4
|
* detection engine evaluates. Produced by SigmaRuleParser, consumed by
|
|
@@ -13,4 +14,50 @@ export var SigmaLevel;
|
|
|
13
14
|
SigmaLevel["High"] = "high";
|
|
14
15
|
SigmaLevel["Critical"] = "critical";
|
|
15
16
|
})(SigmaLevel || (SigmaLevel = {}));
|
|
17
|
+
/*
|
|
18
|
+
* The level a rule gets when its YAML has no `level:` or one outside the
|
|
19
|
+
* enum above. The parser applies it; the dashboard's rule guide states it.
|
|
20
|
+
*/
|
|
21
|
+
export const SIGMA_DEFAULT_LEVEL = SigmaLevel.Medium;
|
|
22
|
+
/*
|
|
23
|
+
* Sigma level -> OCSF severity stamped on a rule's Detection Finding rows.
|
|
24
|
+
* Lives here rather than in the evaluator so the dashboard's rule guide
|
|
25
|
+
* renders its severity table from the same map the engine writes with.
|
|
26
|
+
*/
|
|
27
|
+
export const SIGMA_LEVEL_TO_OCSF_SEVERITY = {
|
|
28
|
+
[SigmaLevel.Informational]: OcsfSeverity.Informational,
|
|
29
|
+
[SigmaLevel.Low]: OcsfSeverity.Low,
|
|
30
|
+
[SigmaLevel.Medium]: OcsfSeverity.Medium,
|
|
31
|
+
[SigmaLevel.High]: OcsfSeverity.High,
|
|
32
|
+
[SigmaLevel.Critical]: OcsfSeverity.Critical,
|
|
33
|
+
};
|
|
34
|
+
/*
|
|
35
|
+
* Levels that rank onto a project's MOST severe alert/incident severity
|
|
36
|
+
* when no severity is set on the rule and none is named after the level;
|
|
37
|
+
* every other level ranks onto the least severe.
|
|
38
|
+
*/
|
|
39
|
+
export function isSevereSigmaLevel(level) {
|
|
40
|
+
return level === SigmaLevel.Critical || level === SigmaLevel.High;
|
|
41
|
+
}
|
|
42
|
+
/*
|
|
43
|
+
* Field modifiers (`field|modifier: value`) the parser accepts. Anything
|
|
44
|
+
* else is rejected at save time — listed here so the dashboard's rule
|
|
45
|
+
* guide cannot advertise a modifier the parser refuses, or miss one it
|
|
46
|
+
* takes.
|
|
47
|
+
*/
|
|
48
|
+
export const SIGMA_SUPPORTED_MODIFIERS = [
|
|
49
|
+
"contains",
|
|
50
|
+
"startswith",
|
|
51
|
+
"endswith",
|
|
52
|
+
"all",
|
|
53
|
+
"re",
|
|
54
|
+
"cased",
|
|
55
|
+
"gt",
|
|
56
|
+
"gte",
|
|
57
|
+
"lt",
|
|
58
|
+
"lte",
|
|
59
|
+
"cidr",
|
|
60
|
+
"exists",
|
|
61
|
+
"windash",
|
|
62
|
+
];
|
|
16
63
|
//# sourceMappingURL=SigmaRule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SigmaRule.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/SigmaRule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SigmaRule.js","sourceRoot":"","sources":["../../../../Types/SecurityEvent/SigmaRule.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,6CAA+B,CAAA;IAC/B,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,2BAAa,CAAA;IACb,mCAAqB,CAAA;AACvB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAe,UAAU,CAAC,MAAM,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAqC;IAC5E,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,aAAa;IACtD,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,GAAG;IAClC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM;IACxC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI;IACpC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,QAAQ;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAiB;IAClD,OAAO,KAAK,KAAK,UAAU,CAAC,QAAQ,IAAI,KAAK,KAAK,UAAU,CAAC,IAAI,CAAC;AACpE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA0B;IAC9D,UAAU;IACV,YAAY;IACZ,UAAU;IACV,KAAK;IACL,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,MAAM;IACN,QAAQ;IACR,SAAS;CACV,CAAC"}
|
|
@@ -86,6 +86,20 @@ export function ocsfSeverityForConfidence(confidence) {
|
|
|
86
86
|
*/
|
|
87
87
|
export const THREAT_INTEL_MINIMUM_CONFIDENCE_MIN = 0;
|
|
88
88
|
export const THREAT_INTEL_MINIMUM_CONFIDENCE_MAX = 100;
|
|
89
|
+
/*
|
|
90
|
+
* Save-time bounds and default for ThreatIntelFeed.pollIntervalInMinutes —
|
|
91
|
+
* shared by the server validator, the poller's fallback and the dashboard
|
|
92
|
+
* form, so the three cannot drift apart.
|
|
93
|
+
*/
|
|
94
|
+
export const THREAT_INTEL_POLL_INTERVAL_MIN_IN_MINUTES = 1;
|
|
95
|
+
export const THREAT_INTEL_POLL_INTERVAL_MAX_IN_MINUTES = 1440;
|
|
96
|
+
export const THREAT_INTEL_DEFAULT_POLL_INTERVAL_IN_MINUTES = 60;
|
|
97
|
+
// Cap on one match evaluation's scan, whatever lastEvaluatedAt says.
|
|
98
|
+
export const THREAT_INTEL_MATCH_MAX_LOOKBACK_IN_MINUTES = 24 * 60;
|
|
99
|
+
// First-ever match evaluation window for a feed.
|
|
100
|
+
export const THREAT_INTEL_FIRST_MATCH_WINDOW_IN_MINUTES = 15;
|
|
101
|
+
// One alert per distinct indicator value per cycle, at most.
|
|
102
|
+
export const THREAT_INTEL_MAX_INDICATORS_PER_EVALUATION = 100;
|
|
89
103
|
/*
|
|
90
104
|
* Indicators whose STIX object carries no valid_until stay active this
|
|
91
105
|
* long after valid_from. STIX says "valid until revoked"; unbounded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreatIntelConstants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