@oneuptime/common 14.0.98 → 14.0.99
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/CloudAccount.d.mts +8 -0
- package/Models/DatabaseModels/CloudAccount.d.ts +8 -0
- package/Models/DatabaseModels/CloudAccount.js +167 -0
- package/Models/DatabaseModels/CloudAccountFeed.d.mts +27 -0
- package/Models/DatabaseModels/CloudAccountFeed.d.ts +27 -0
- package/Models/DatabaseModels/CloudAccountFeed.js +557 -0
- package/Models/DatabaseModels/CloudAccountFeed.mjs +3 -0
- package/Models/DatabaseModels/DataSecurityCheckSetting.d.mts +17 -0
- package/Models/DatabaseModels/DataSecurityCheckSetting.d.ts +17 -0
- package/Models/DatabaseModels/DataSecurityCheckSetting.js +304 -0
- package/Models/DatabaseModels/DataSecurityCheckSetting.mjs +2 -0
- package/Models/DatabaseModels/DataSecurityCustomDataType.d.mts +25 -0
- package/Models/DatabaseModels/DataSecurityCustomDataType.d.ts +25 -0
- package/Models/DatabaseModels/DataSecurityCustomDataType.js +431 -0
- package/Models/DatabaseModels/DataSecurityCustomDataType.mjs +2 -0
- package/Models/DatabaseModels/DataSecurityFlow.d.mts +26 -0
- package/Models/DatabaseModels/DataSecurityFlow.d.ts +26 -0
- package/Models/DatabaseModels/DataSecurityFlow.js +456 -0
- package/Models/DatabaseModels/DataSecurityFlow.mjs +2 -0
- package/Models/DatabaseModels/DataSecurityIssue.d.mts +49 -0
- package/Models/DatabaseModels/DataSecurityIssue.d.ts +49 -0
- package/Models/DatabaseModels/DataSecurityIssue.js +797 -0
- package/Models/DatabaseModels/DataSecurityIssue.mjs +2 -0
- package/Models/DatabaseModels/DataSecurityIssueFeed.d.mts +43 -0
- package/Models/DatabaseModels/DataSecurityIssueFeed.d.ts +43 -0
- package/Models/DatabaseModels/DataSecurityIssueFeed.js +382 -0
- package/Models/DatabaseModels/DataSecurityIssueFeed.mjs +3 -0
- package/Models/DatabaseModels/DataSecurityResidencyRule.d.mts +18 -0
- package/Models/DatabaseModels/DataSecurityResidencyRule.d.ts +18 -0
- package/Models/DatabaseModels/DataSecurityResidencyRule.js +331 -0
- package/Models/DatabaseModels/DataSecurityResidencyRule.mjs +2 -0
- package/Models/DatabaseModels/DataSecurityScan.d.mts +29 -0
- package/Models/DatabaseModels/DataSecurityScan.d.ts +29 -0
- package/Models/DatabaseModels/DataSecurityScan.js +520 -0
- package/Models/DatabaseModels/DataSecurityScan.mjs +2 -0
- package/Models/DatabaseModels/DataSecuritySetting.d.mts +35 -0
- package/Models/DatabaseModels/DataSecuritySetting.d.ts +35 -0
- package/Models/DatabaseModels/DataSecuritySetting.js +631 -0
- package/Models/DatabaseModels/DataSecuritySetting.mjs +2 -0
- package/Models/DatabaseModels/DataStore.d.mts +83 -0
- package/Models/DatabaseModels/DataStore.d.ts +83 -0
- package/Models/DatabaseModels/DataStore.js +1343 -0
- package/Models/DatabaseModels/DataStore.mjs +2 -0
- package/Models/DatabaseModels/DataStoreAccess.d.mts +22 -0
- package/Models/DatabaseModels/DataStoreAccess.d.ts +22 -0
- package/Models/DatabaseModels/DataStoreAccess.js +407 -0
- package/Models/DatabaseModels/DataStoreAccess.mjs +2 -0
- package/Models/DatabaseModels/DataStoreFeed.d.mts +36 -0
- package/Models/DatabaseModels/DataStoreFeed.d.ts +36 -0
- package/Models/DatabaseModels/DataStoreFeed.js +613 -0
- package/Models/DatabaseModels/DataStoreFeed.mjs +3 -0
- package/Models/DatabaseModels/DataStoreFinding.d.mts +38 -0
- package/Models/DatabaseModels/DataStoreFinding.d.ts +38 -0
- package/Models/DatabaseModels/DataStoreFinding.js +683 -0
- package/Models/DatabaseModels/DataStoreFinding.mjs +2 -0
- package/Models/DatabaseModels/DataStoreLabelRule.d.mts +21 -0
- package/Models/DatabaseModels/DataStoreLabelRule.d.ts +21 -0
- package/Models/DatabaseModels/DataStoreLabelRule.js +623 -0
- package/Models/DatabaseModels/DataStoreLabelRule.mjs +2 -0
- package/Models/DatabaseModels/DataStoreOwnerRule.d.mts +24 -0
- package/Models/DatabaseModels/DataStoreOwnerRule.d.ts +24 -0
- package/Models/DatabaseModels/DataStoreOwnerRule.js +714 -0
- package/Models/DatabaseModels/DataStoreOwnerRule.mjs +2 -0
- package/Models/DatabaseModels/DataStoreOwnerTeam.d.mts +19 -0
- package/Models/DatabaseModels/DataStoreOwnerTeam.d.ts +19 -0
- package/Models/DatabaseModels/DataStoreOwnerTeam.js +477 -0
- package/Models/DatabaseModels/DataStoreOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/DataStoreOwnerUser.d.mts +18 -0
- package/Models/DatabaseModels/DataStoreOwnerUser.d.ts +18 -0
- package/Models/DatabaseModels/DataStoreOwnerUser.js +476 -0
- package/Models/DatabaseModels/DataStoreOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
- package/Models/DatabaseModels/GlobalConfig.js +110 -0
- package/Models/DatabaseModels/Index.js +35 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +43 -0
- package/Models/DatabaseModels/ResourceAiAgent.js +3 -1
- package/Models/DatabaseModels/SecurityEntityCriticality.js +7 -6
- package/Models/DatabaseModels/SecurityEntityRisk.js +2 -2
- package/Models/DatabaseModels/TelemetryException.d.mts +5 -0
- package/Models/DatabaseModels/TelemetryException.d.ts +5 -0
- package/Models/DatabaseModels/TelemetryException.js +170 -8
- package/Types/AI/AIChatPageContext.d.mts +4 -1
- package/Types/AI/AIChatPageContext.d.ts +4 -1
- package/Types/AI/AIChatPageContext.js +7 -0
- package/Types/AI/AIChatTypes.d.mts +6 -1
- package/Types/AI/AIChatTypes.d.ts +6 -1
- package/Types/AI/AIChatTypes.js +9 -0
- package/Types/AI/AiAffectedResources.js +5 -3
- package/Types/AI/CodeFixTaskContext.d.mts +21 -0
- package/Types/AI/CodeFixTaskContext.d.ts +21 -0
- package/Types/AI/CodeFixTaskContext.js +61 -4
- package/Types/AI/CodeFixTaskContext.mjs +2 -0
- package/Types/AI/CodeTask.d.mts +2 -0
- package/Types/AI/CodeTask.d.ts +2 -0
- package/Types/AI/CodeTask.js +4 -0
- package/Types/AI/ResourceAiAccessApi.d.mts +1 -0
- package/Types/AI/ResourceAiAccessApi.d.ts +1 -0
- package/Types/AI/ResourceAiAccessPermissions.js +6 -0
- package/Types/AutoRemediation/AiRemediationCommandPlan.d.mts +19 -0
- package/Types/AutoRemediation/AiRemediationCommandPlan.d.ts +19 -0
- package/Types/AutoRemediation/AiRemediationCommandPlan.js +85 -10
- package/Types/AutoRemediation/AiRemediationCommandPlan.mjs +4 -0
- package/Types/AutoRemediation/RemediationTryAgain.d.mts +17 -0
- package/Types/AutoRemediation/RemediationTryAgain.d.ts +17 -0
- package/Types/AutoRemediation/RemediationTryAgain.js +104 -0
- package/Types/AutoRemediation/RemediationTryAgain.mjs +6 -0
- package/Types/CloudConnection/CloudAiAgentCost.d.mts +19 -0
- package/Types/CloudConnection/CloudAiAgentCost.d.ts +19 -0
- package/Types/CloudConnection/CloudAiAgentCost.js +95 -0
- package/Types/CloudConnection/CloudAiAgentCost.mjs +15 -0
- package/Types/CloudConnection/CloudAiAgentSetupCommands.d.mts +70 -0
- package/Types/CloudConnection/CloudAiAgentSetupCommands.d.ts +70 -0
- package/Types/CloudConnection/CloudAiAgentSetupCommands.js +1107 -0
- package/Types/CloudConnection/CloudAiAgentSetupCommands.mjs +37 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.mts +8 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.ts +8 -0
- package/Types/CloudConnection/CloudConnectionCatalog.js +75 -1
- package/Types/CloudConnection/CloudConnectionCatalog.mjs +6 -0
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +48 -4
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +48 -4
- package/Types/CloudConnection/CloudConnectionSetupCommands.js +410 -16
- package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +21 -0
- package/Types/CodeRepository/CodeHost.d.mts +2 -1
- package/Types/CodeRepository/CodeHost.d.ts +2 -1
- package/Types/CodeRepository/CodeHost.js +12 -5
- package/Types/CodeRepository/ProductionReview.d.mts +7 -0
- package/Types/CodeRepository/ProductionReview.d.ts +7 -0
- package/Types/CodeRepository/ProductionReview.js +67 -1
- package/Types/CodeRepository/ProductionReview.mjs +1 -0
- package/Types/DataSecurity/ComplianceFramework.d.mts +21 -0
- package/Types/DataSecurity/ComplianceFramework.d.ts +21 -0
- package/Types/DataSecurity/ComplianceFramework.js +97 -0
- package/Types/DataSecurity/ComplianceFramework.mjs +5 -0
- package/Types/DataSecurity/ComplianceRequirementCatalog.d.mts +41 -0
- package/Types/DataSecurity/ComplianceRequirementCatalog.d.ts +41 -0
- package/Types/DataSecurity/ComplianceRequirementCatalog.js +199 -0
- package/Types/DataSecurity/ComplianceRequirementCatalog.mjs +7 -0
- package/Types/DataSecurity/DataCategory.d.mts +15 -0
- package/Types/DataSecurity/DataCategory.d.ts +15 -0
- package/Types/DataSecurity/DataCategory.js +61 -0
- package/Types/DataSecurity/DataCategory.mjs +7 -0
- package/Types/DataSecurity/DataConfidence.d.mts +11 -0
- package/Types/DataSecurity/DataConfidence.d.ts +11 -0
- package/Types/DataSecurity/DataConfidence.js +49 -0
- package/Types/DataSecurity/DataConfidence.mjs +7 -0
- package/Types/DataSecurity/DataSecurityApiTypes.d.mts +106 -0
- package/Types/DataSecurity/DataSecurityApiTypes.d.ts +106 -0
- package/Types/DataSecurity/DataSecurityApiTypes.js +53 -0
- package/Types/DataSecurity/DataSecurityApiTypes.mjs +3 -0
- package/Types/DataSecurity/DataSecurityCheckCatalog.d.mts +93 -0
- package/Types/DataSecurity/DataSecurityCheckCatalog.d.ts +93 -0
- package/Types/DataSecurity/DataSecurityCheckCatalog.js +1183 -0
- package/Types/DataSecurity/DataSecurityCheckCatalog.mjs +10 -0
- package/Types/DataSecurity/DataSecurityIssueStatus.d.mts +10 -0
- package/Types/DataSecurity/DataSecurityIssueStatus.d.ts +10 -0
- package/Types/DataSecurity/DataSecurityIssueStatus.js +38 -0
- package/Types/DataSecurity/DataSecurityIssueStatus.mjs +5 -0
- package/Types/DataSecurity/DataSecurityResidency.d.mts +21 -0
- package/Types/DataSecurity/DataSecurityResidency.d.ts +21 -0
- package/Types/DataSecurity/DataSecurityResidency.js +92 -0
- package/Types/DataSecurity/DataSecurityResidency.mjs +5 -0
- package/Types/DataSecurity/DataSecurityResponseAction.d.mts +14 -0
- package/Types/DataSecurity/DataSecurityResponseAction.d.ts +14 -0
- package/Types/DataSecurity/DataSecurityResponseAction.js +115 -0
- package/Types/DataSecurity/DataSecurityResponseAction.mjs +11 -0
- package/Types/DataSecurity/DataSecurityRisk.d.mts +38 -0
- package/Types/DataSecurity/DataSecurityRisk.d.ts +38 -0
- package/Types/DataSecurity/DataSecurityRisk.js +138 -0
- package/Types/DataSecurity/DataSecurityRisk.mjs +7 -0
- package/Types/DataSecurity/DataSensitivity.d.mts +13 -0
- package/Types/DataSecurity/DataSensitivity.d.ts +13 -0
- package/Types/DataSecurity/DataSensitivity.js +68 -0
- package/Types/DataSecurity/DataSensitivity.mjs +8 -0
- package/Types/DataSecurity/DataStoreAccess.d.mts +27 -0
- package/Types/DataSecurity/DataStoreAccess.d.ts +27 -0
- package/Types/DataSecurity/DataStoreAccess.js +35 -0
- package/Types/DataSecurity/DataStoreAccess.mjs +4 -0
- package/Types/DataSecurity/DataStoreEnvironment.d.mts +11 -0
- package/Types/DataSecurity/DataStoreEnvironment.d.ts +11 -0
- package/Types/DataSecurity/DataStoreEnvironment.js +80 -0
- package/Types/DataSecurity/DataStoreEnvironment.mjs +5 -0
- package/Types/DataSecurity/DataStoreKey.d.mts +18 -0
- package/Types/DataSecurity/DataStoreKey.d.ts +18 -0
- package/Types/DataSecurity/DataStoreKey.js +49 -0
- package/Types/DataSecurity/DataStoreKey.mjs +7 -0
- package/Types/DataSecurity/DataStoreKind.d.mts +67 -0
- package/Types/DataSecurity/DataStoreKind.d.ts +67 -0
- package/Types/DataSecurity/DataStoreKind.js +230 -0
- package/Types/DataSecurity/DataStoreKind.mjs +10 -0
- package/Types/DataSecurity/DataStorePosture.d.mts +40 -0
- package/Types/DataSecurity/DataStorePosture.d.ts +40 -0
- package/Types/DataSecurity/DataStorePosture.js +100 -0
- package/Types/DataSecurity/DataStorePosture.mjs +7 -0
- package/Types/DataSecurity/DataTypeCatalog.d.mts +17 -0
- package/Types/DataSecurity/DataTypeCatalog.d.ts +17 -0
- package/Types/DataSecurity/DataTypeCatalog.js +434 -0
- package/Types/DataSecurity/DataTypeCatalog.mjs +4 -0
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +6 -0
- package/Types/Monitor/CephAlertTemplates.d.mts +2 -1
- package/Types/Monitor/CephAlertTemplates.d.ts +2 -1
- package/Types/Monitor/CephAlertTemplates.js +49 -0
- package/Types/Monitor/CephAlertTemplates.mjs +1 -0
- package/Types/Monitor/DockerAlertTemplates.d.mts +2 -1
- package/Types/Monitor/DockerAlertTemplates.d.ts +2 -1
- package/Types/Monitor/DockerAlertTemplates.js +109 -37
- package/Types/Monitor/DockerAlertTemplates.mjs +1 -0
- package/Types/Monitor/DockerMetricCatalog.d.mts +1 -0
- package/Types/Monitor/DockerMetricCatalog.d.ts +1 -0
- package/Types/Monitor/DockerMetricCatalog.js +26 -52
- package/Types/Monitor/DockerSwarmAlertTemplates.d.mts +1 -0
- package/Types/Monitor/DockerSwarmAlertTemplates.d.ts +1 -0
- package/Types/Monitor/DockerSwarmAlertTemplates.js +65 -8
- package/Types/Monitor/DockerSwarmAlertTemplates.mjs +1 -0
- package/Types/Monitor/DockerSwarmMetricCatalog.js +7 -4
- package/Types/Monitor/HostAlertTemplates.d.mts +2 -1
- package/Types/Monitor/HostAlertTemplates.d.ts +2 -1
- package/Types/Monitor/HostAlertTemplates.js +48 -0
- package/Types/Monitor/HostAlertTemplates.mjs +1 -0
- package/Types/Monitor/IotAlertTemplates.d.mts +1 -0
- package/Types/Monitor/IotAlertTemplates.d.ts +1 -0
- package/Types/Monitor/IotAlertTemplates.js +11 -0
- package/Types/Monitor/IotAlertTemplates.mjs +1 -0
- package/Types/Monitor/KubernetesAlertTemplates.d.mts +49 -1
- package/Types/Monitor/KubernetesAlertTemplates.d.ts +49 -1
- package/Types/Monitor/KubernetesAlertTemplates.js +392 -75
- package/Types/Monitor/KubernetesAlertTemplates.mjs +2 -0
- package/Types/Monitor/KubernetesMetricCatalog.js +12 -2
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.mts +4 -4
- package/Types/Monitor/MetricMonitor/MetricMonitorResponse.d.ts +4 -4
- package/Types/Monitor/MonitorCriteriaInstance.js +107 -10
- package/Types/Monitor/MonitorStep.js +50 -3
- package/Types/Monitor/MonitorStepDockerSwarmMonitor.d.mts +33 -11
- package/Types/Monitor/MonitorStepDockerSwarmMonitor.d.ts +33 -11
- package/Types/Monitor/MonitorStepDockerSwarmMonitor.js +65 -0
- package/Types/Monitor/MonitorStepKubernetesMonitor.d.mts +6 -0
- package/Types/Monitor/MonitorStepKubernetesMonitor.d.ts +6 -0
- package/Types/Monitor/MonitorStepKubernetesMonitor.js +38 -1
- package/Types/Monitor/MonitorStepKubernetesMonitor.mjs +2 -0
- package/Types/Monitor/MonitorType.d.mts +1 -0
- package/Types/Monitor/MonitorType.d.ts +1 -0
- package/Types/Monitor/MonitorType.js +18 -0
- package/Types/Monitor/PodmanAlertTemplates.d.mts +12 -1
- package/Types/Monitor/PodmanAlertTemplates.d.ts +12 -1
- package/Types/Monitor/PodmanAlertTemplates.js +161 -33
- package/Types/Monitor/PodmanAlertTemplates.mjs +2 -0
- package/Types/Monitor/PodmanMetricCatalog.d.mts +1 -0
- package/Types/Monitor/PodmanMetricCatalog.d.ts +1 -0
- package/Types/Monitor/PodmanMetricCatalog.js +26 -52
- package/Types/Monitor/ProxmoxAlertTemplates.d.mts +1 -0
- package/Types/Monitor/ProxmoxAlertTemplates.d.ts +1 -0
- package/Types/Monitor/ProxmoxAlertTemplates.js +49 -0
- package/Types/Monitor/ProxmoxAlertTemplates.mjs +1 -0
- package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.mts +19 -0
- package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.d.ts +19 -0
- package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.js +50 -2
- package/Types/Monitor/Recommendation/RecommendationCriteriaBuilder.mjs +2 -0
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +2 -0
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +2 -0
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +31 -2
- package/Types/Monitor/StorageArrayAlertTemplates.d.mts +2 -1
- package/Types/Monitor/StorageArrayAlertTemplates.d.ts +2 -1
- package/Types/Monitor/StorageArrayAlertTemplates.js +69 -0
- package/Types/Monitor/StorageArrayAlertTemplates.mjs +1 -0
- package/Types/Monitor/VMwareAlertTemplates.d.mts +2 -1
- package/Types/Monitor/VMwareAlertTemplates.d.ts +2 -1
- package/Types/Monitor/VMwareAlertTemplates.js +50 -0
- package/Types/Monitor/VMwareAlertTemplates.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +44 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +44 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.js +171 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +14 -0
- package/Types/Permission.d.mts +51 -0
- package/Types/Permission.d.ts +51 -0
- package/Types/Permission.js +542 -0
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +8 -0
- package/Types/ProviderLogo/ProviderLogo.d.mts +2 -0
- package/Types/ProviderLogo/ProviderLogo.d.ts +2 -0
- package/Types/ProviderLogo/ProviderLogo.js +4 -0
- package/Types/ResourceAiAgent/AiResourceType.d.mts +7 -1
- package/Types/ResourceAiAgent/AiResourceType.d.ts +7 -1
- package/Types/ResourceAiAgent/AiResourceType.js +76 -2
- package/Types/ResourceAiAgent/AiResourceType.mjs +3 -0
- package/Types/ResourceAiAgent/CloudAiAgentNames.d.mts +19 -0
- package/Types/ResourceAiAgent/CloudAiAgentNames.d.ts +19 -0
- package/Types/ResourceAiAgent/CloudAiAgentNames.js +75 -0
- package/Types/ResourceAiAgent/CloudAiAgentNames.mjs +16 -0
- package/Types/ResourceAiAgent/ResourceAiAccess.d.mts +12 -1
- package/Types/ResourceAiAgent/ResourceAiAccess.d.ts +12 -1
- package/Types/ResourceAiAgent/ResourceAiAccess.js +28 -1
- package/Types/ResourceAiAgent/ResourceAiAccess.mjs +6 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.js +13 -0
- package/Types/Rules/RuleCriteriaSubject.d.mts +2 -1
- package/Types/Rules/RuleCriteriaSubject.d.ts +2 -1
- package/Types/Rules/RuleCriteriaSubject.js +3 -0
- package/Types/Rules/RuleRun.d.mts +2 -0
- package/Types/Rules/RuleRun.d.ts +2 -0
- package/Types/Rules/RuleRun.js +4 -0
- package/Types/SecurityCase/SecurityDetectionSource.d.mts +2 -1
- package/Types/SecurityCase/SecurityDetectionSource.d.ts +2 -1
- package/Types/SecurityCase/SecurityDetectionSource.js +5 -2
- package/Types/SecurityCase/SecurityEntity.d.mts +5 -0
- package/Types/SecurityCase/SecurityEntity.d.ts +5 -0
- package/Types/SecurityCase/SecurityEntity.js +39 -1
- package/Types/SecurityCase/SecurityEntity.mjs +4 -0
- package/Types/SecurityCase/SecurityEntityRisk.js +14 -6
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +124 -1
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.mjs +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.d.mts +3 -1
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.d.ts +3 -1
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorProvider.js +4 -0
- package/Types/SecurityEvent/DataSecuritySignal.d.mts +33 -0
- package/Types/SecurityEvent/DataSecuritySignal.d.ts +33 -0
- package/Types/SecurityEvent/DataSecuritySignal.js +114 -0
- package/Types/SecurityEvent/DataSecuritySignal.mjs +14 -0
- package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +7 -1
- package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +7 -1
- package/Types/SecurityEvent/DetectionRuleDataKind.js +74 -0
- package/Types/SecurityEvent/DetectionRuleLibrary.d.mts +2 -1
- package/Types/SecurityEvent/DetectionRuleLibrary.d.ts +2 -1
- package/Types/SecurityEvent/DetectionRuleLibrary.js +730 -0
- package/Types/SecurityEvent/OcsfEventClass.js +31 -2
- package/Types/SecurityEvent/SecurityLogFormat.d.mts +15 -0
- package/Types/SecurityEvent/SecurityLogFormat.d.ts +15 -0
- package/Types/SecurityEvent/SecurityLogFormat.js +123 -10
- package/Types/SecurityEvent/SecurityLogFormat.mjs +4 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +3 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +3 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.js +37 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +3 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +3 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.js +9 -0
- package/Types/SecurityPlaybook/SecurityProtectedEntity.js +8 -1
- package/Types/Telemetry/ExceptionAIDigest.d.mts +31 -0
- package/Types/Telemetry/ExceptionAIDigest.d.ts +31 -0
- package/Types/Telemetry/ExceptionAIDigest.js +131 -0
- package/Types/Telemetry/ExceptionAIDigest.mjs +13 -0
- package/Types/Telemetry/ExceptionAIExplanation.d.mts +37 -0
- package/Types/Telemetry/ExceptionAIExplanation.d.ts +37 -0
- package/Types/Telemetry/ExceptionAIExplanation.js +110 -0
- package/Types/Telemetry/ExceptionAIExplanation.mjs +12 -0
- package/Types/Telemetry/TraceSpanType.d.mts +1 -1
- package/Types/Telemetry/TraceSpanType.d.ts +1 -1
- package/Types/Telemetry/TraceSpanType.js +33 -8
- package/Types/Telemetry/TraceSpanType.mjs +1 -1
- package/Types/UpdateCheck/SecurityAdvisory.d.mts +39 -0
- package/Types/UpdateCheck/SecurityAdvisory.d.ts +39 -0
- package/Types/UpdateCheck/SecurityAdvisory.js +221 -0
- package/Types/UpdateCheck/SecurityAdvisory.mjs +7 -0
- package/Types/UpdateCheck/UpdateCheckFailure.d.mts +9 -0
- package/Types/UpdateCheck/UpdateCheckFailure.d.ts +9 -0
- package/Types/UpdateCheck/UpdateCheckFailure.js +32 -0
- package/Types/UpdateCheck/UpdateCheckFailure.mjs +3 -0
- package/Types/UpdateCheck/UpdateStatus.d.mts +44 -0
- package/Types/UpdateCheck/UpdateStatus.d.ts +44 -0
- package/Types/UpdateCheck/UpdateStatus.js +195 -0
- package/Types/UpdateCheck/UpdateStatus.mjs +3 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.mts +1 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.ts +1 -0
- package/Utils/AiRemediation/CloudChangeDryRunPlan.d.mts +17 -0
- package/Utils/AiRemediation/CloudChangeDryRunPlan.d.ts +17 -0
- package/Utils/AiRemediation/CloudChangeDryRunPlan.js +122 -0
- package/Utils/AiRemediation/CloudChangeDryRunPlan.mjs +7 -0
- package/Utils/AiRemediation/Resource/CloudCommandPolicy.d.mts +4 -0
- package/Utils/AiRemediation/Resource/CloudCommandPolicy.d.ts +4 -0
- package/Utils/AiRemediation/Resource/CloudCommandPolicy.js +177 -0
- package/Utils/AiRemediation/Resource/CloudCommandPolicy.mjs +4 -0
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.mts +144 -0
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.ts +144 -0
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.js +1964 -0
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.mjs +48 -0
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +4 -0
- package/Utils/DataSecurity/CustomDataTypeDetector.d.mts +23 -0
- package/Utils/DataSecurity/CustomDataTypeDetector.d.ts +23 -0
- package/Utils/DataSecurity/CustomDataTypeDetector.js +130 -0
- package/Utils/DataSecurity/CustomDataTypeDetector.mjs +8 -0
- package/Utils/DataSecurity/Detector.d.mts +26 -0
- package/Utils/DataSecurity/Detector.d.ts +26 -0
- package/Utils/DataSecurity/Detector.js +83 -0
- package/Utils/DataSecurity/Detector.mjs +8 -0
- package/Utils/DataSecurity/Detectors/ContactDetectors.d.mts +12 -0
- package/Utils/DataSecurity/Detectors/ContactDetectors.d.ts +12 -0
- package/Utils/DataSecurity/Detectors/ContactDetectors.js +915 -0
- package/Utils/DataSecurity/Detectors/ContactDetectors.mjs +12 -0
- package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.d.mts +3 -0
- package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.d.ts +3 -0
- package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.js +52 -0
- package/Utils/DataSecurity/Detectors/DocumentMarkingDetectors.mjs +3 -0
- package/Utils/DataSecurity/Detectors/FinancialDetectors.d.mts +8 -0
- package/Utils/DataSecurity/Detectors/FinancialDetectors.d.ts +8 -0
- package/Utils/DataSecurity/Detectors/FinancialDetectors.js +566 -0
- package/Utils/DataSecurity/Detectors/FinancialDetectors.mjs +8 -0
- package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.d.mts +3 -0
- package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.d.ts +3 -0
- package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.js +2415 -0
- package/Utils/DataSecurity/Detectors/GovernmentIdDetectors.mjs +3 -0
- package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.d.mts +3 -0
- package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.d.ts +3 -0
- package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.js +258 -0
- package/Utils/DataSecurity/Detectors/HealthIdentifierDetectors.mjs +3 -0
- package/Utils/DataSecurity/Detectors/HealthRecordDetectors.d.mts +3 -0
- package/Utils/DataSecurity/Detectors/HealthRecordDetectors.d.ts +3 -0
- package/Utils/DataSecurity/Detectors/HealthRecordDetectors.js +115 -0
- package/Utils/DataSecurity/Detectors/HealthRecordDetectors.mjs +3 -0
- package/Utils/DataSecurity/Detectors/Index.d.mts +4 -0
- package/Utils/DataSecurity/Detectors/Index.d.ts +4 -0
- package/Utils/DataSecurity/Detectors/Index.js +47 -0
- package/Utils/DataSecurity/Detectors/Index.mjs +4 -0
- package/Utils/DataSecurity/Detectors/SecretDetectors.d.mts +11 -0
- package/Utils/DataSecurity/Detectors/SecretDetectors.d.ts +11 -0
- package/Utils/DataSecurity/Detectors/SecretDetectors.js +1733 -0
- package/Utils/DataSecurity/Detectors/SecretDetectors.mjs +11 -0
- package/Utils/DataSecurity/FieldClassifier.d.mts +20 -0
- package/Utils/DataSecurity/FieldClassifier.d.ts +20 -0
- package/Utils/DataSecurity/FieldClassifier.js +247 -0
- package/Utils/DataSecurity/FieldClassifier.mjs +5 -0
- package/Utils/DataSecurity/FieldCollector.d.mts +23 -0
- package/Utils/DataSecurity/FieldCollector.d.ts +23 -0
- package/Utils/DataSecurity/FieldCollector.js +81 -0
- package/Utils/DataSecurity/FieldCollector.mjs +3 -0
- package/Utils/DataSecurity/FieldNameHints.d.mts +9 -0
- package/Utils/DataSecurity/FieldNameHints.d.ts +9 -0
- package/Utils/DataSecurity/FieldNameHints.js +184 -0
- package/Utils/DataSecurity/FieldNameHints.mjs +6 -0
- package/Utils/DataSecurity/FindingTally.d.mts +44 -0
- package/Utils/DataSecurity/FindingTally.d.ts +44 -0
- package/Utils/DataSecurity/FindingTally.js +138 -0
- package/Utils/DataSecurity/FindingTally.mjs +6 -0
- package/Utils/DataSecurity/Masking.d.mts +6 -0
- package/Utils/DataSecurity/Masking.d.ts +6 -0
- package/Utils/DataSecurity/Masking.js +159 -0
- package/Utils/DataSecurity/Masking.mjs +7 -0
- package/Utils/DataSecurity/PathPattern.d.mts +3 -0
- package/Utils/DataSecurity/PathPattern.d.ts +3 -0
- package/Utils/DataSecurity/PathPattern.js +55 -0
- package/Utils/DataSecurity/PathPattern.mjs +4 -0
- package/Utils/DataSecurity/Sha256.d.mts +1 -0
- package/Utils/DataSecurity/Sha256.d.ts +1 -0
- package/Utils/DataSecurity/Sha256.js +94 -0
- package/Utils/DataSecurity/Sha256.mjs +2 -0
- package/Utils/DataSecurity/TextScanner.d.mts +35 -0
- package/Utils/DataSecurity/TextScanner.d.ts +35 -0
- package/Utils/DataSecurity/TextScanner.js +303 -0
- package/Utils/DataSecurity/TextScanner.mjs +8 -0
- package/Utils/DataSecurity/Validators.d.mts +16 -0
- package/Utils/DataSecurity/Validators.d.ts +16 -0
- package/Utils/DataSecurity/Validators.js +339 -0
- package/Utils/DataSecurity/Validators.mjs +17 -0
- package/Utils/Exceptions/ExceptionIssueState.d.mts +18 -0
- package/Utils/Exceptions/ExceptionIssueState.d.ts +18 -0
- package/Utils/Exceptions/ExceptionIssueState.js +131 -0
- package/Utils/Exceptions/ExceptionIssueState.mjs +8 -0
- package/Utils/HostCollector/HostCollectorDefaultConfig.d.mts +2 -0
- package/Utils/HostCollector/HostCollectorDefaultConfig.d.ts +2 -0
- package/Utils/HostCollector/HostCollectorDefaultConfig.js +39 -1
- package/Utils/HostCollector/HostCollectorDefaultConfig.mjs +2 -0
- package/Utils/LabelRuleImportExport.js +17 -3
- package/Utils/Monitor/PlatformResourceIdentity.js +7 -4
- package/Utils/SecurityAdvisoryMatcher.d.mts +33 -0
- package/Utils/SecurityAdvisoryMatcher.d.ts +33 -0
- package/Utils/SecurityAdvisoryMatcher.js +291 -0
- package/Utils/SecurityAdvisoryMatcher.mjs +2 -0
- package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.mts +24 -0
- package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.d.ts +24 -0
- package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.js +380 -0
- package/Utils/SecurityEvent/Connectors/EntraIdNormalizer.mjs +15 -0
- package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.mts +29 -0
- package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.d.ts +29 -0
- package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.js +527 -0
- package/Utils/SecurityEvent/Connectors/GoogleWorkspaceNormalizer.mjs +13 -0
- package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.d.mts +21 -0
- package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.d.ts +21 -0
- package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.js +365 -0
- package/Utils/SecurityEvent/Connectors/Microsoft365AuditNormalizer.mjs +11 -0
- package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.d.mts +17 -0
- package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.d.ts +17 -0
- package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.js +344 -0
- package/Utils/SecurityEvent/LogParsers/AzureActivityLogParser.mjs +12 -0
- package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.d.mts +27 -0
- package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.d.ts +27 -0
- package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.js +326 -0
- package/Utils/SecurityEvent/LogParsers/GoogleCloudAuditLogParser.mjs +10 -0
- package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.d.mts +38 -0
- package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.d.ts +38 -0
- package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.js +629 -0
- package/Utils/SecurityEvent/LogParsers/SecurityDeviceLogParser.mjs +13 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +9 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +9 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +63 -3
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +4 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogParser.js +54 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.mts +26 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.d.ts +26 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.js +1046 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventLogParser.mjs +11 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.mts +19 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.d.ts +19 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.js +724 -0
- package/Utils/SecurityEvent/LogParsers/WindowsEventRecord.mjs +7 -0
- package/Utils/SecurityEvent/SecurityRecordReading.d.mts +32 -0
- package/Utils/SecurityEvent/SecurityRecordReading.d.ts +32 -0
- package/Utils/SecurityEvent/SecurityRecordReading.js +78 -0
- package/Utils/SecurityEvent/SecurityRecordReading.mjs +2 -0
- package/Utils/Sms/OnCallPageSms.d.mts +1 -0
- package/Utils/Sms/OnCallPageSms.d.ts +1 -0
- package/Utils/Sms/OnCallPageSms.js +16 -2
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.mts +44 -0
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.ts +44 -0
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.js +223 -0
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.mjs +8 -0
- package/Utils/Syslog/LeefParser.d.mts +28 -0
- package/Utils/Syslog/LeefParser.d.ts +28 -0
- package/Utils/Syslog/LeefParser.js +326 -0
- package/Utils/Syslog/LeefParser.mjs +10 -0
- package/Utils/VersionRange.d.mts +34 -0
- package/Utils/VersionRange.d.ts +34 -0
- package/Utils/VersionRange.js +422 -0
- package/Utils/VersionRange.mjs +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import commonJsModule from "./WindowsEventRecord.js";
|
|
2
|
+
export const MAX_WINDOWS_EVENT_FIELDS = commonJsModule.MAX_WINDOWS_EVENT_FIELDS;
|
|
3
|
+
export const MAX_WINDOWS_FIELD_VALUE_LENGTH = commonJsModule.MAX_WINDOWS_FIELD_VALUE_LENGTH;
|
|
4
|
+
export const STRING_INSERT_FIELDS = commonJsModule.STRING_INSERT_FIELDS;
|
|
5
|
+
export const decodeXmlText = commonJsModule.decodeXmlText;
|
|
6
|
+
export const readOtlpAnyValue = commonJsModule.readOtlpAnyValue;
|
|
7
|
+
export const readWindowsEventRecord = commonJsModule.readWindowsEventRecord;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSONObject } from "../../Types/JSON.mjs";
|
|
2
|
+
import NormalizedSecurityEvent from "../../Types/SecurityEvent/NormalizedSecurityEvent.mjs";
|
|
3
|
+
import OcsfSeverity from "../../Types/SecurityEvent/OcsfSeverity.mjs";
|
|
4
|
+
export interface SecurityRecordReading {
|
|
5
|
+
time: Date | null;
|
|
6
|
+
eventUid: string;
|
|
7
|
+
classUid: number;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
activityName: string;
|
|
10
|
+
statusName: string;
|
|
11
|
+
severity: OcsfSeverity;
|
|
12
|
+
message: string;
|
|
13
|
+
ruleId?: string | undefined;
|
|
14
|
+
ruleName?: string | undefined;
|
|
15
|
+
principalUser?: string | undefined;
|
|
16
|
+
principalHost?: string | undefined;
|
|
17
|
+
principalIp?: string | undefined;
|
|
18
|
+
targetUser?: string | undefined;
|
|
19
|
+
targetHost?: string | undefined;
|
|
20
|
+
targetIp?: string | undefined;
|
|
21
|
+
targetPort?: number | undefined;
|
|
22
|
+
targetResource?: string | undefined;
|
|
23
|
+
mitreTactics?: Array<string> | undefined;
|
|
24
|
+
mitreTechniques?: Array<string> | undefined;
|
|
25
|
+
attributes: JSONObject;
|
|
26
|
+
}
|
|
27
|
+
export declare function toNormalizedSecurityEvent(data: {
|
|
28
|
+
reading: SecurityRecordReading;
|
|
29
|
+
vendorName: string;
|
|
30
|
+
productName: string;
|
|
31
|
+
raw: JSONObject;
|
|
32
|
+
}): NormalizedSecurityEvent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSONObject } from "../../Types/JSON";
|
|
2
|
+
import NormalizedSecurityEvent from "../../Types/SecurityEvent/NormalizedSecurityEvent";
|
|
3
|
+
import OcsfSeverity from "../../Types/SecurityEvent/OcsfSeverity";
|
|
4
|
+
export interface SecurityRecordReading {
|
|
5
|
+
time: Date | null;
|
|
6
|
+
eventUid: string;
|
|
7
|
+
classUid: number;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
activityName: string;
|
|
10
|
+
statusName: string;
|
|
11
|
+
severity: OcsfSeverity;
|
|
12
|
+
message: string;
|
|
13
|
+
ruleId?: string | undefined;
|
|
14
|
+
ruleName?: string | undefined;
|
|
15
|
+
principalUser?: string | undefined;
|
|
16
|
+
principalHost?: string | undefined;
|
|
17
|
+
principalIp?: string | undefined;
|
|
18
|
+
targetUser?: string | undefined;
|
|
19
|
+
targetHost?: string | undefined;
|
|
20
|
+
targetIp?: string | undefined;
|
|
21
|
+
targetPort?: number | undefined;
|
|
22
|
+
targetResource?: string | undefined;
|
|
23
|
+
mitreTactics?: Array<string> | undefined;
|
|
24
|
+
mitreTechniques?: Array<string> | undefined;
|
|
25
|
+
attributes: JSONObject;
|
|
26
|
+
}
|
|
27
|
+
export declare function toNormalizedSecurityEvent(data: {
|
|
28
|
+
reading: SecurityRecordReading;
|
|
29
|
+
vendorName: string;
|
|
30
|
+
productName: string;
|
|
31
|
+
raw: JSONObject;
|
|
32
|
+
}): NormalizedSecurityEvent;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toNormalizedSecurityEvent = toNormalizedSecurityEvent;
|
|
4
|
+
const OcsfEventClass_1 = require("../../Types/SecurityEvent/OcsfEventClass");
|
|
5
|
+
const OcsfSeverity_1 = require("../../Types/SecurityEvent/OcsfSeverity");
|
|
6
|
+
const NormalizerHelpers_1 = require("./NormalizerHelpers");
|
|
7
|
+
// The longest message an event made from a record keeps.
|
|
8
|
+
const MAX_MESSAGE_LENGTH = 1000;
|
|
9
|
+
// An entity's value is never longer than this.
|
|
10
|
+
const MAX_ENTITY_LENGTH = 255;
|
|
11
|
+
function clean(value, limit) {
|
|
12
|
+
const text = (value || "").trim();
|
|
13
|
+
return text.length > limit ? `${text.slice(0, limit - 1)}…` : text;
|
|
14
|
+
}
|
|
15
|
+
/*
|
|
16
|
+
* A reading as the event a connection stores: stamped with the product
|
|
17
|
+
* that made it, its id (a hash of the record when the source gave none).
|
|
18
|
+
*/
|
|
19
|
+
function toNormalizedSecurityEvent(data) {
|
|
20
|
+
var _a;
|
|
21
|
+
const reading = data.reading;
|
|
22
|
+
const category = (0, OcsfEventClass_1.ocsfCategoryForClassUid)(reading.classUid);
|
|
23
|
+
const principalUser = clean(reading.principalUser, MAX_ENTITY_LENGTH);
|
|
24
|
+
const principalHost = clean(reading.principalHost, MAX_ENTITY_LENGTH);
|
|
25
|
+
const principalIp = clean(reading.principalIp, MAX_ENTITY_LENGTH);
|
|
26
|
+
const targetUser = clean(reading.targetUser, MAX_ENTITY_LENGTH);
|
|
27
|
+
const targetHost = clean(reading.targetHost, MAX_ENTITY_LENGTH);
|
|
28
|
+
const targetIp = clean(reading.targetIp, MAX_ENTITY_LENGTH);
|
|
29
|
+
return {
|
|
30
|
+
time: reading.time || new Date(),
|
|
31
|
+
eventUid: reading.eventUid || (0, NormalizerHelpers_1.contentHashEventUid)(data.raw),
|
|
32
|
+
categoryUid: category.categoryUid,
|
|
33
|
+
categoryName: category.categoryName,
|
|
34
|
+
classUid: reading.classUid,
|
|
35
|
+
// A record no OCSF class fits (class 0) keeps the name its source gives it.
|
|
36
|
+
className: (reading.classUid === 0
|
|
37
|
+
? clean(reading.className, MAX_ENTITY_LENGTH)
|
|
38
|
+
: "") ||
|
|
39
|
+
((_a = (0, OcsfEventClass_1.ocsfEventClassByUid)(reading.classUid)) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
40
|
+
"Base Event",
|
|
41
|
+
activityName: clean(reading.activityName, MAX_ENTITY_LENGTH),
|
|
42
|
+
severityId: OcsfSeverity_1.OcsfSeverityId[reading.severity],
|
|
43
|
+
severityName: reading.severity,
|
|
44
|
+
statusName: clean(reading.statusName, MAX_ENTITY_LENGTH),
|
|
45
|
+
message: clean(reading.message, MAX_MESSAGE_LENGTH),
|
|
46
|
+
vendorName: data.vendorName,
|
|
47
|
+
productName: data.productName,
|
|
48
|
+
ruleId: clean(reading.ruleId, MAX_ENTITY_LENGTH),
|
|
49
|
+
ruleName: clean(reading.ruleName, MAX_ENTITY_LENGTH),
|
|
50
|
+
mitreTactics: reading.mitreTactics || [],
|
|
51
|
+
mitreTechniques: reading.mitreTechniques || [],
|
|
52
|
+
principalUser,
|
|
53
|
+
principalHost,
|
|
54
|
+
principalIp,
|
|
55
|
+
principalProcess: "",
|
|
56
|
+
processName: "",
|
|
57
|
+
processPath: "",
|
|
58
|
+
processCommandLine: "",
|
|
59
|
+
parentProcessName: "",
|
|
60
|
+
parentProcessPath: "",
|
|
61
|
+
parentProcessCommandLine: "",
|
|
62
|
+
targetUser,
|
|
63
|
+
targetHost,
|
|
64
|
+
targetIp,
|
|
65
|
+
targetPort: reading.targetPort || 0,
|
|
66
|
+
// An Azure resource id or a Google resource name runs long.
|
|
67
|
+
targetResource: clean(reading.targetResource, MAX_MESSAGE_LENGTH),
|
|
68
|
+
observables: (0, NormalizerHelpers_1.buildObservables)([
|
|
69
|
+
principalUser,
|
|
70
|
+
targetUser,
|
|
71
|
+
principalHost,
|
|
72
|
+
targetHost,
|
|
73
|
+
principalIp,
|
|
74
|
+
targetIp,
|
|
75
|
+
]),
|
|
76
|
+
attributes: reading.attributes,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -34,6 +34,16 @@ const SmsSegments_1 = require("./SmsSegments");
|
|
|
34
34
|
* The person paged acknowledged it once already; worded as a first page,
|
|
35
35
|
* the text read like a second alarm about something new.
|
|
36
36
|
*
|
|
37
|
+
* A PAGE A PERSON ASKED FOR - from Slack or Microsoft Teams
|
|
38
|
+
* (OnCallPersonPage) - says who paged, and whom, after the product, where a
|
|
39
|
+
* page OneUptime starts goes straight on to what happened:
|
|
40
|
+
*
|
|
41
|
+
* OneUptime: Alice Kim paged Platform about Critical Incident INC-42 in
|
|
42
|
+
* Acme Prod: Checkout API is down. Ack or escalate: https://...
|
|
43
|
+
*
|
|
44
|
+
* The page is often about an incident declared an hour ago: worded as a
|
|
45
|
+
* first page, the text read like news of it, from nobody.
|
|
46
|
+
*
|
|
37
47
|
* THE FITTING RULE. The text takes the fewest parts it can, trying for one
|
|
38
48
|
* part, then two, and so on. For each number of parts:
|
|
39
49
|
*
|
|
@@ -46,7 +56,8 @@ const SmsSegments_1 = require("./SmsSegments");
|
|
|
46
56
|
*
|
|
47
57
|
* The product name, the severity, the number and the link are never cut:
|
|
48
58
|
* they say who sends it, how bad it is, which one it is and where to act -
|
|
49
|
-
* and nor is a page again's "is still not resolved", which says why
|
|
59
|
+
* and nor is a page again's "is still not resolved", which says why, or who
|
|
60
|
+
* paged a person's page.
|
|
50
61
|
*
|
|
51
62
|
* Every value is written in the characters an SMS carries cheaply
|
|
52
63
|
* (Gsm7Text): a curly quote or an emoji in a title no longer makes the page
|
|
@@ -169,7 +180,9 @@ const describeWhatHappened = (data) => {
|
|
|
169
180
|
exports.describeWhatHappened = describeWhatHappened;
|
|
170
181
|
// The text from its parts, with or without the project and with this much title.
|
|
171
182
|
const compose = (parts, options) => {
|
|
172
|
-
let head =
|
|
183
|
+
let head = parts.lead
|
|
184
|
+
? `${parts.productName}: ${parts.lead} about ${parts.what}`
|
|
185
|
+
: `${parts.productName}: ${parts.what}`;
|
|
173
186
|
if (parts.number) {
|
|
174
187
|
head += ` ${parts.number}`;
|
|
175
188
|
}
|
|
@@ -247,6 +260,7 @@ const buildOnCallPageSms = (input) => {
|
|
|
247
260
|
title: Array.from(toSmsValue(input.title)),
|
|
248
261
|
link: input.link.trim(),
|
|
249
262
|
isPageAgain: input.isPageAgain === true,
|
|
263
|
+
lead: toSmsValue(input.lead),
|
|
250
264
|
};
|
|
251
265
|
const wholeTitle = parts.title.join("");
|
|
252
266
|
const measure = (text) => {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { JSONObject } from "../../Types/JSON.mjs";
|
|
2
|
+
import { AutomaticFixPullRequestBlocker } from "../../Types/AI/AutomaticFixPullRequests.mjs";
|
|
3
|
+
import { FinishedFixOutcome } from "./CodeFixSuggestion.mjs";
|
|
4
|
+
import { SuggestionBlocker } from "./SuggestionBlocker.mjs";
|
|
5
|
+
import SuggestionOffer from "./SuggestionOffer.mjs";
|
|
6
|
+
export declare enum AutomaticCodeFixBlocker {
|
|
7
|
+
AiOff = "AiOff",
|
|
8
|
+
FixOff = "FixOff",
|
|
9
|
+
RulesUnreadable = "RulesUnreadable",
|
|
10
|
+
NoMatchingRule = "NoMatchingRule",
|
|
11
|
+
PullRequestOff = "PullRequestOff",
|
|
12
|
+
NoRepository = "NoRepository",
|
|
13
|
+
DailyLimit = "DailyLimit",
|
|
14
|
+
ChangedSince = "ChangedSince"
|
|
15
|
+
}
|
|
16
|
+
export declare const AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER: Readonly<Record<AutomaticFixPullRequestBlocker, AutomaticCodeFixBlocker>>;
|
|
17
|
+
export declare function parseAutomaticCodeFixBlocker(value: unknown): AutomaticCodeFixBlocker | null;
|
|
18
|
+
export interface InvestigationCodeFixSuggestion {
|
|
19
|
+
offer: SuggestionOffer;
|
|
20
|
+
fixOutcome: FinishedFixOutcome | null;
|
|
21
|
+
blocker: SuggestionBlocker | null;
|
|
22
|
+
aiRunId: string | null;
|
|
23
|
+
isAutomatic: boolean;
|
|
24
|
+
automaticBlocker: AutomaticCodeFixBlocker | null;
|
|
25
|
+
}
|
|
26
|
+
export declare const NO_INVESTIGATION_CODE_FIX_SUGGESTION: InvestigationCodeFixSuggestion;
|
|
27
|
+
export interface InvestigationCodeFixRun {
|
|
28
|
+
aiRunId: string;
|
|
29
|
+
isAutomatic: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface InvestigationCodeFixSuggestionInput {
|
|
32
|
+
isAiEnabled: boolean;
|
|
33
|
+
isCodeFixRecommended: boolean;
|
|
34
|
+
activeFix: InvestigationCodeFixRun | null;
|
|
35
|
+
finishedFix: (InvestigationCodeFixRun & {
|
|
36
|
+
outcome: FinishedFixOutcome | null;
|
|
37
|
+
}) | null;
|
|
38
|
+
hasConnectedRepository: boolean;
|
|
39
|
+
blocker: SuggestionBlocker | null;
|
|
40
|
+
automaticBlocker: AutomaticCodeFixBlocker | null;
|
|
41
|
+
}
|
|
42
|
+
export declare function getInvestigationCodeFixSuggestion(input: InvestigationCodeFixSuggestionInput): InvestigationCodeFixSuggestion;
|
|
43
|
+
export declare function investigationCodeFixSuggestionToJSON(suggestion: InvestigationCodeFixSuggestion): JSONObject;
|
|
44
|
+
export declare function parseInvestigationCodeFixSuggestion(value: unknown): InvestigationCodeFixSuggestion;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { JSONObject } from "../../Types/JSON";
|
|
2
|
+
import { AutomaticFixPullRequestBlocker } from "../../Types/AI/AutomaticFixPullRequests";
|
|
3
|
+
import { FinishedFixOutcome } from "./CodeFixSuggestion";
|
|
4
|
+
import { SuggestionBlocker } from "./SuggestionBlocker";
|
|
5
|
+
import SuggestionOffer from "./SuggestionOffer";
|
|
6
|
+
export declare enum AutomaticCodeFixBlocker {
|
|
7
|
+
AiOff = "AiOff",
|
|
8
|
+
FixOff = "FixOff",
|
|
9
|
+
RulesUnreadable = "RulesUnreadable",
|
|
10
|
+
NoMatchingRule = "NoMatchingRule",
|
|
11
|
+
PullRequestOff = "PullRequestOff",
|
|
12
|
+
NoRepository = "NoRepository",
|
|
13
|
+
DailyLimit = "DailyLimit",
|
|
14
|
+
ChangedSince = "ChangedSince"
|
|
15
|
+
}
|
|
16
|
+
export declare const AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER: Readonly<Record<AutomaticFixPullRequestBlocker, AutomaticCodeFixBlocker>>;
|
|
17
|
+
export declare function parseAutomaticCodeFixBlocker(value: unknown): AutomaticCodeFixBlocker | null;
|
|
18
|
+
export interface InvestigationCodeFixSuggestion {
|
|
19
|
+
offer: SuggestionOffer;
|
|
20
|
+
fixOutcome: FinishedFixOutcome | null;
|
|
21
|
+
blocker: SuggestionBlocker | null;
|
|
22
|
+
aiRunId: string | null;
|
|
23
|
+
isAutomatic: boolean;
|
|
24
|
+
automaticBlocker: AutomaticCodeFixBlocker | null;
|
|
25
|
+
}
|
|
26
|
+
export declare const NO_INVESTIGATION_CODE_FIX_SUGGESTION: InvestigationCodeFixSuggestion;
|
|
27
|
+
export interface InvestigationCodeFixRun {
|
|
28
|
+
aiRunId: string;
|
|
29
|
+
isAutomatic: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface InvestigationCodeFixSuggestionInput {
|
|
32
|
+
isAiEnabled: boolean;
|
|
33
|
+
isCodeFixRecommended: boolean;
|
|
34
|
+
activeFix: InvestigationCodeFixRun | null;
|
|
35
|
+
finishedFix: (InvestigationCodeFixRun & {
|
|
36
|
+
outcome: FinishedFixOutcome | null;
|
|
37
|
+
}) | null;
|
|
38
|
+
hasConnectedRepository: boolean;
|
|
39
|
+
blocker: SuggestionBlocker | null;
|
|
40
|
+
automaticBlocker: AutomaticCodeFixBlocker | null;
|
|
41
|
+
}
|
|
42
|
+
export declare function getInvestigationCodeFixSuggestion(input: InvestigationCodeFixSuggestionInput): InvestigationCodeFixSuggestion;
|
|
43
|
+
export declare function investigationCodeFixSuggestionToJSON(suggestion: InvestigationCodeFixSuggestion): JSONObject;
|
|
44
|
+
export declare function parseInvestigationCodeFixSuggestion(value: unknown): InvestigationCodeFixSuggestion;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION = exports.AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER = exports.AutomaticCodeFixBlocker = void 0;
|
|
40
|
+
exports.parseAutomaticCodeFixBlocker = parseAutomaticCodeFixBlocker;
|
|
41
|
+
exports.getInvestigationCodeFixSuggestion = getInvestigationCodeFixSuggestion;
|
|
42
|
+
exports.investigationCodeFixSuggestionToJSON = investigationCodeFixSuggestionToJSON;
|
|
43
|
+
exports.parseInvestigationCodeFixSuggestion = parseInvestigationCodeFixSuggestion;
|
|
44
|
+
const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
|
|
45
|
+
const AutomaticFixPullRequests_1 = require("../../Types/AI/AutomaticFixPullRequests");
|
|
46
|
+
const CodeFixSuggestion_1 = require("./CodeFixSuggestion");
|
|
47
|
+
const SuggestionBlocker_1 = require("./SuggestionBlocker");
|
|
48
|
+
const SuggestionOffer_1 = __importStar(require("./SuggestionOffer"));
|
|
49
|
+
/*
|
|
50
|
+
* THE FIX IN THE CODE AN INVESTIGATION RECOMMENDS, ON THE REMEDIATION STEP.
|
|
51
|
+
*
|
|
52
|
+
* An AI investigation of an incident or an alert that finds the cause in
|
|
53
|
+
* the code records that a code fix is recommended (AIRunCodeFixRecommendation
|
|
54
|
+
* .Recommended). Two things can come of it:
|
|
55
|
+
*
|
|
56
|
+
* - OneUptime AI opens the fix pull request on its own, when the
|
|
57
|
+
* investigation ends - while "Fix new incidents automatically" (or
|
|
58
|
+
* alerts) is on, the AI rules let it, a repository they allow is
|
|
59
|
+
* connected and the day's share is not used up
|
|
60
|
+
* (FixFromIncidentTaskTrigger.autoEnqueueFromRecommendedInvestigation);
|
|
61
|
+
* - a person opens it ("Open a fix pull request").
|
|
62
|
+
*
|
|
63
|
+
* The automatic one used to stop silently: it wrote a debug line and
|
|
64
|
+
* nothing else, so a project that had fixing on and no repository connected
|
|
65
|
+
* saw an investigation that blamed the code and nothing happening (block
|
|
66
|
+
* 43). This is what the Remediation step says about it now, in the order a
|
|
67
|
+
* person meets the answers (CodeFixSuggestion.getCodeFixOffer):
|
|
68
|
+
*
|
|
69
|
+
* - None: nothing to say - AI is off, or the investigation recommended no
|
|
70
|
+
* change in the code;
|
|
71
|
+
* - InProgress: the fix pull request is being written (aiRunId: its task
|
|
72
|
+
* in Code), and whether OneUptime AI or a person asked for it;
|
|
73
|
+
* - Done: it did its work - its pull request is open for review, it read
|
|
74
|
+
* the code and found nothing to change, or it waits for an answer in
|
|
75
|
+
* Code;
|
|
76
|
+
* - SetUp: no repository is connected, or Code's own gate stands in the
|
|
77
|
+
* way (the plan, AI credits or an LLM provider, the day's limit, a
|
|
78
|
+
* Runner online) - the one step to take;
|
|
79
|
+
* - Act: a person may open it now.
|
|
80
|
+
*
|
|
81
|
+
* And, beside SetUp and Act, why OneUptime AI did not open it on its own
|
|
82
|
+
* (AutomaticCodeFixBlocker), read with the project's settings of now.
|
|
83
|
+
*
|
|
84
|
+
* Pure: the server decides it (FixFromIncidentTaskTrigger
|
|
85
|
+
* .getSuggestionForSubject) and the Dashboard reads it off the wire.
|
|
86
|
+
*/
|
|
87
|
+
// Why OneUptime AI did not open the fix pull request on its own.
|
|
88
|
+
var AutomaticCodeFixBlocker;
|
|
89
|
+
(function (AutomaticCodeFixBlocker) {
|
|
90
|
+
// Enable AI is off for the project.
|
|
91
|
+
AutomaticCodeFixBlocker["AiOff"] = "AiOff";
|
|
92
|
+
// "Fix new incidents automatically" (or alerts) is off.
|
|
93
|
+
AutomaticCodeFixBlocker["FixOff"] = "FixOff";
|
|
94
|
+
// The AI rules could not be read.
|
|
95
|
+
AutomaticCodeFixBlocker["RulesUnreadable"] = "RulesUnreadable";
|
|
96
|
+
// AI rules are set up and none that fixes matches the record.
|
|
97
|
+
AutomaticCodeFixBlocker["NoMatchingRule"] = "NoMatchingRule";
|
|
98
|
+
// The AI rules that match have fix pull requests off.
|
|
99
|
+
AutomaticCodeFixBlocker["PullRequestOff"] = "PullRequestOff";
|
|
100
|
+
// No connected repository the AI rules allow.
|
|
101
|
+
AutomaticCodeFixBlocker["NoRepository"] = "NoRepository";
|
|
102
|
+
// OneUptime AI already opened its share of fix pull requests today.
|
|
103
|
+
AutomaticCodeFixBlocker["DailyLimit"] = "DailyLimit";
|
|
104
|
+
/*
|
|
105
|
+
* Nothing stops it now: it opens on its own only when an investigation
|
|
106
|
+
* ends, and what stopped it then (a setting, a repository) has changed
|
|
107
|
+
* since. A person opens it now.
|
|
108
|
+
*/
|
|
109
|
+
AutomaticCodeFixBlocker["ChangedSince"] = "ChangedSince";
|
|
110
|
+
})(AutomaticCodeFixBlocker || (exports.AutomaticCodeFixBlocker = AutomaticCodeFixBlocker = {}));
|
|
111
|
+
const ALL_AUTOMATIC_BLOCKERS = Object.values(AutomaticCodeFixBlocker);
|
|
112
|
+
// The fixing rule's blocker, as the Remediation step names it.
|
|
113
|
+
exports.AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER = {
|
|
114
|
+
[AutomaticFixPullRequests_1.AutomaticFixPullRequestBlocker.FixOff]: AutomaticCodeFixBlocker.FixOff,
|
|
115
|
+
[AutomaticFixPullRequests_1.AutomaticFixPullRequestBlocker.RulesUnreadable]: AutomaticCodeFixBlocker.RulesUnreadable,
|
|
116
|
+
[AutomaticFixPullRequests_1.AutomaticFixPullRequestBlocker.NoMatchingRule]: AutomaticCodeFixBlocker.NoMatchingRule,
|
|
117
|
+
[AutomaticFixPullRequests_1.AutomaticFixPullRequestBlocker.PullRequestOff]: AutomaticCodeFixBlocker.PullRequestOff,
|
|
118
|
+
};
|
|
119
|
+
function parseAutomaticCodeFixBlocker(value) {
|
|
120
|
+
return typeof value === "string" && ALL_AUTOMATIC_BLOCKERS.includes(value)
|
|
121
|
+
? value
|
|
122
|
+
: null;
|
|
123
|
+
}
|
|
124
|
+
exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION = {
|
|
125
|
+
offer: SuggestionOffer_1.default.None,
|
|
126
|
+
fixOutcome: null,
|
|
127
|
+
blocker: null,
|
|
128
|
+
aiRunId: null,
|
|
129
|
+
isAutomatic: false,
|
|
130
|
+
automaticBlocker: null,
|
|
131
|
+
};
|
|
132
|
+
function getInvestigationCodeFixSuggestion(input) {
|
|
133
|
+
var _a;
|
|
134
|
+
// A reply to the finished fix is under way: work in progress.
|
|
135
|
+
const isWorkingAgain = Boolean(input.finishedFix && input.finishedFix.outcome === null);
|
|
136
|
+
const offer = (0, CodeFixSuggestion_1.getCodeFixOffer)({
|
|
137
|
+
isAiEnabled: input.isAiEnabled,
|
|
138
|
+
applies: input.isCodeFixRecommended,
|
|
139
|
+
hasActiveFix: Boolean(input.activeFix) || isWorkingAgain,
|
|
140
|
+
hasFinishedFix: Boolean(input.finishedFix),
|
|
141
|
+
hasConnectedRepository: input.hasConnectedRepository,
|
|
142
|
+
isBlocked: Boolean(input.blocker),
|
|
143
|
+
// The investigation's report is on screen: worth the one setup step.
|
|
144
|
+
isBackedByEvidence: true,
|
|
145
|
+
});
|
|
146
|
+
if (offer === SuggestionOffer_1.default.None) {
|
|
147
|
+
return exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
148
|
+
}
|
|
149
|
+
if (offer === SuggestionOffer_1.default.InProgress || offer === SuggestionOffer_1.default.Done) {
|
|
150
|
+
const run = input.activeFix || input.finishedFix || null;
|
|
151
|
+
return {
|
|
152
|
+
offer,
|
|
153
|
+
fixOutcome: offer === SuggestionOffer_1.default.Done
|
|
154
|
+
? ((_a = input.finishedFix) === null || _a === void 0 ? void 0 : _a.outcome) || null
|
|
155
|
+
: null,
|
|
156
|
+
blocker: null,
|
|
157
|
+
aiRunId: (run === null || run === void 0 ? void 0 : run.aiRunId) || null,
|
|
158
|
+
isAutomatic: Boolean(run === null || run === void 0 ? void 0 : run.isAutomatic),
|
|
159
|
+
automaticBlocker: null,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
offer,
|
|
164
|
+
fixOutcome: null,
|
|
165
|
+
// A repository to connect comes first: Code's gate needs one to ask.
|
|
166
|
+
blocker: offer === SuggestionOffer_1.default.SetUp && input.hasConnectedRepository
|
|
167
|
+
? input.blocker
|
|
168
|
+
: null,
|
|
169
|
+
aiRunId: null,
|
|
170
|
+
isAutomatic: false,
|
|
171
|
+
automaticBlocker: input.automaticBlocker,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function investigationCodeFixSuggestionToJSON(suggestion) {
|
|
175
|
+
return {
|
|
176
|
+
offer: suggestion.offer,
|
|
177
|
+
fixOutcome: suggestion.fixOutcome,
|
|
178
|
+
blocker: suggestion.blocker
|
|
179
|
+
? (0, SuggestionBlocker_1.suggestionBlockerToJSON)(suggestion.blocker)
|
|
180
|
+
: null,
|
|
181
|
+
aiRunId: suggestion.aiRunId,
|
|
182
|
+
isAutomatic: suggestion.isAutomatic,
|
|
183
|
+
automaticBlocker: suggestion.automaticBlocker,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/*
|
|
187
|
+
* Reads the suggestion off the wire. Anything this build cannot draw - an
|
|
188
|
+
* offer it does not know, an InProgress or Done without its task - reads as
|
|
189
|
+
* None, so an unknown answer never draws an action or a dead link.
|
|
190
|
+
*/
|
|
191
|
+
function parseInvestigationCodeFixSuggestion(value) {
|
|
192
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
193
|
+
return exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
194
|
+
}
|
|
195
|
+
const record = value;
|
|
196
|
+
const offer = (0, SuggestionOffer_1.parseSuggestionOffer)(record["offer"]);
|
|
197
|
+
const rawRunId = record["aiRunId"];
|
|
198
|
+
const aiRunId = typeof rawRunId === "string" && ObjectID_1.default.isValidUUID(rawRunId)
|
|
199
|
+
? rawRunId
|
|
200
|
+
: null;
|
|
201
|
+
if (offer === SuggestionOffer_1.default.None) {
|
|
202
|
+
return exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
203
|
+
}
|
|
204
|
+
if ((offer === SuggestionOffer_1.default.InProgress || offer === SuggestionOffer_1.default.Done) &&
|
|
205
|
+
!aiRunId) {
|
|
206
|
+
return exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
207
|
+
}
|
|
208
|
+
const isFixOffer = offer === SuggestionOffer_1.default.InProgress || offer === SuggestionOffer_1.default.Done;
|
|
209
|
+
return {
|
|
210
|
+
offer,
|
|
211
|
+
fixOutcome: offer === SuggestionOffer_1.default.Done
|
|
212
|
+
? (0, CodeFixSuggestion_1.parseFinishedFixOutcome)(record["fixOutcome"])
|
|
213
|
+
: null,
|
|
214
|
+
blocker: offer === SuggestionOffer_1.default.SetUp
|
|
215
|
+
? (0, SuggestionBlocker_1.parseSuggestionBlocker)(record["blocker"])
|
|
216
|
+
: null,
|
|
217
|
+
aiRunId: isFixOffer ? aiRunId : null,
|
|
218
|
+
isAutomatic: isFixOffer && record["isAutomatic"] === true,
|
|
219
|
+
automaticBlocker: isFixOffer
|
|
220
|
+
? null
|
|
221
|
+
: parseAutomaticCodeFixBlocker(record["automaticBlocker"]),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import commonJsModule from "./InvestigationCodeFixSuggestion.js";
|
|
2
|
+
export const AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER = commonJsModule.AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER;
|
|
3
|
+
export const AutomaticCodeFixBlocker = commonJsModule.AutomaticCodeFixBlocker;
|
|
4
|
+
export const NO_INVESTIGATION_CODE_FIX_SUGGESTION = commonJsModule.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
5
|
+
export const getInvestigationCodeFixSuggestion = commonJsModule.getInvestigationCodeFixSuggestion;
|
|
6
|
+
export const investigationCodeFixSuggestionToJSON = commonJsModule.investigationCodeFixSuggestionToJSON;
|
|
7
|
+
export const parseAutomaticCodeFixBlocker = commonJsModule.parseAutomaticCodeFixBlocker;
|
|
8
|
+
export const parseInvestigationCodeFixSuggestion = commonJsModule.parseInvestigationCodeFixSuggestion;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Longest message that is parsed, as for CEF. */
|
|
2
|
+
export declare const MAX_LEEF_INPUT_LENGTH: number;
|
|
3
|
+
/** Most attributes one message may add. */
|
|
4
|
+
export declare const MAX_LEEF_ATTRIBUTES: number;
|
|
5
|
+
/** Longest attribute key that is kept. Longer ones are skipped. */
|
|
6
|
+
export declare const MAX_LEEF_KEY_LENGTH: number;
|
|
7
|
+
/** Longest value that is kept whole. Longer ones are truncated. */
|
|
8
|
+
export declare const MAX_LEEF_VALUE_LENGTH: number;
|
|
9
|
+
/** How far into a line "LEEF:" is looked for (past a syslog header). */
|
|
10
|
+
export declare const MAX_LEEF_PREFIX_LENGTH: number;
|
|
11
|
+
export interface ParsedLeef {
|
|
12
|
+
version: string;
|
|
13
|
+
vendor: string;
|
|
14
|
+
product: string;
|
|
15
|
+
productVersion: string;
|
|
16
|
+
eventId: string;
|
|
17
|
+
delimiter: string;
|
|
18
|
+
attributes: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export declare function findLeefStart(text: unknown): number;
|
|
21
|
+
export declare function readLeefDelimiter(field: string): string;
|
|
22
|
+
export declare function parseLeef(text: unknown): ParsedLeef | null;
|
|
23
|
+
declare const _default: {
|
|
24
|
+
findLeefStart: typeof findLeefStart;
|
|
25
|
+
parseLeef: typeof parseLeef;
|
|
26
|
+
readLeefDelimiter: typeof readLeefDelimiter;
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Longest message that is parsed, as for CEF. */
|
|
2
|
+
export declare const MAX_LEEF_INPUT_LENGTH: number;
|
|
3
|
+
/** Most attributes one message may add. */
|
|
4
|
+
export declare const MAX_LEEF_ATTRIBUTES: number;
|
|
5
|
+
/** Longest attribute key that is kept. Longer ones are skipped. */
|
|
6
|
+
export declare const MAX_LEEF_KEY_LENGTH: number;
|
|
7
|
+
/** Longest value that is kept whole. Longer ones are truncated. */
|
|
8
|
+
export declare const MAX_LEEF_VALUE_LENGTH: number;
|
|
9
|
+
/** How far into a line "LEEF:" is looked for (past a syslog header). */
|
|
10
|
+
export declare const MAX_LEEF_PREFIX_LENGTH: number;
|
|
11
|
+
export interface ParsedLeef {
|
|
12
|
+
version: string;
|
|
13
|
+
vendor: string;
|
|
14
|
+
product: string;
|
|
15
|
+
productVersion: string;
|
|
16
|
+
eventId: string;
|
|
17
|
+
delimiter: string;
|
|
18
|
+
attributes: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export declare function findLeefStart(text: unknown): number;
|
|
21
|
+
export declare function readLeefDelimiter(field: string): string;
|
|
22
|
+
export declare function parseLeef(text: unknown): ParsedLeef | null;
|
|
23
|
+
declare const _default: {
|
|
24
|
+
findLeefStart: typeof findLeefStart;
|
|
25
|
+
parseLeef: typeof parseLeef;
|
|
26
|
+
readLeefDelimiter: typeof readLeefDelimiter;
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|