@oneuptime/common 14.0.97 → 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/CodeRepository.d.mts +3 -0
- package/Models/DatabaseModels/CodeRepository.d.ts +3 -0
- package/Models/DatabaseModels/CodeRepository.js +104 -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 +37 -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/SecurityCaseEvidence.d.mts +4 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.d.ts +4 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.js +64 -5
- package/Models/DatabaseModels/SecurityEntityCriticality.js +7 -6
- package/Models/DatabaseModels/SecurityEntityRisk.js +2 -2
- package/Models/DatabaseModels/SecurityHunt.d.mts +34 -0
- package/Models/DatabaseModels/SecurityHunt.d.ts +34 -0
- package/Models/DatabaseModels/SecurityHunt.js +608 -0
- package/Models/DatabaseModels/SecurityHunt.mjs +2 -0
- 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 +7 -1
- package/Types/AI/AIChatTypes.d.ts +7 -1
- package/Types/AI/AIChatTypes.js +9 -0
- package/Types/AI/AIRunEventType.d.mts +1 -0
- package/Types/AI/AIRunEventType.d.ts +1 -0
- package/Types/AI/AIRunEventType.js +8 -0
- package/Types/AI/AiAffectedResources.js +5 -3
- package/Types/AI/AiTokenCount.d.mts +22 -1
- package/Types/AI/AiTokenCount.d.ts +22 -1
- package/Types/AI/AiTokenCount.js +126 -57
- package/Types/AI/AiTokenCount.mjs +2 -0
- package/Types/AI/CodeFixTaskContext.d.mts +22 -0
- package/Types/AI/CodeFixTaskContext.d.ts +22 -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/CodeRepositorySetting.d.mts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.ts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.js +2 -0
- 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 +2 -0
- package/Types/Email/EmailTemplateType.d.ts +2 -0
- package/Types/Email/EmailTemplateType.js +8 -0
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -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/NotificationSetting/NotificationEmailRollupCategory.d.mts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.d.ts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +9 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.js +6 -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/SecurityCaseEventEvidence.d.mts +67 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.ts +67 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.js +271 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.mjs +13 -0
- package/Types/SecurityCase/SecurityCaseEvidenceKind.d.mts +2 -1
- package/Types/SecurityCase/SecurityCaseEvidenceKind.d.ts +2 -1
- package/Types/SecurityCase/SecurityCaseEvidenceKind.js +11 -1
- 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/SecurityHunt.d.mts +122 -0
- package/Types/SecurityEvent/SecurityHunt.d.ts +122 -0
- package/Types/SecurityEvent/SecurityHunt.js +391 -0
- package/Types/SecurityEvent/SecurityHunt.mjs +32 -0
- 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/Workflow/RunRecord.d.mts +3 -14
- package/Types/Workflow/RunRecord.d.ts +3 -14
- package/Types/Workflow/RunRecord.js +10 -51
- package/Types/Workspace/WorkspaceMessagePayload.d.mts +1 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.ts +1 -0
- package/Utils/AI/InvestigationLogStall.d.mts +38 -0
- package/Utils/AI/InvestigationLogStall.d.ts +38 -0
- package/Utils/AI/InvestigationLogStall.js +163 -0
- package/Utils/AI/InvestigationLogStall.mjs +11 -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/Project/RecordNumber.d.mts +43 -0
- package/Utils/Project/RecordNumber.d.ts +43 -0
- package/Utils/Project/RecordNumber.js +151 -0
- package/Utils/Project/RecordNumber.mjs +6 -0
- 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/SecurityCase/SecurityCaseMarkdown.d.mts +9 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.d.ts +9 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.js +20 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.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/SecurityEventSearch.d.mts +56 -0
- package/Utils/SecurityEvent/SecurityEventSearch.d.ts +56 -0
- package/Utils/SecurityEvent/SecurityEventSearch.js +422 -0
- package/Utils/SecurityEvent/SecurityEventSearch.mjs +21 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.d.mts +12 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.d.ts +12 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.js +51 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.mjs +3 -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/Suggestions/TracePerformanceFixSuggestion.d.mts +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.js +69 -1
- package/Utils/Suggestions/TracePerformanceFixSuggestion.mjs +4 -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,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE = exports.INVESTIGATION_LOG_TOOL_NAMES = exports.InvestigationLogStallReason = void 0;
|
|
4
|
+
exports.isInvestigationLogTool = isInvestigationLogTool;
|
|
5
|
+
exports.getInvestigationLogSearches = getInvestigationLogSearches;
|
|
6
|
+
exports.decideInvestigationLogStall = decideInvestigationLogStall;
|
|
7
|
+
exports.getInvestigationLogWindow = getInvestigationLogWindow;
|
|
8
|
+
exports.investigationLogStallToJSON = investigationLogStallToJSON;
|
|
9
|
+
exports.parseInvestigationLogStall = parseInvestigationLogStall;
|
|
10
|
+
exports.describeInvestigationLogStall = describeInvestigationLogStall;
|
|
11
|
+
/*
|
|
12
|
+
* AN INVESTIGATION THAT COULD NOT TELL THE CAUSE FOR LACK OF LOGS (the
|
|
13
|
+
* follow-up of #5242 that #5273 listed): it says so, and offers a way
|
|
14
|
+
* forward.
|
|
15
|
+
*
|
|
16
|
+
* Whether the logs stood in the way is decided from what the server knows,
|
|
17
|
+
* never from what the model wrote (every lane's rule: no LLM decides what is
|
|
18
|
+
* a problem):
|
|
19
|
+
*
|
|
20
|
+
* - the investigation could not tell the cause - a positive inconclusive
|
|
21
|
+
* verdict (AIConfidenceSignal.shouldEnqueueInstrumentationTask: the
|
|
22
|
+
* evidence floor, or the constrained classification), never a failed
|
|
23
|
+
* classification;
|
|
24
|
+
* - none of its log searches found a line - its own server-minted
|
|
25
|
+
* citations of search_logs and log_histogram, rows and all;
|
|
26
|
+
* - and either no log reached OneUptime for the project from the hour
|
|
27
|
+
* before the incident or alert started until the investigation ran
|
|
28
|
+
* (NoLogs: there was nothing to read), or some did and its searches still
|
|
29
|
+
* found nothing (NoMatchingLogs: nothing about this one).
|
|
30
|
+
*
|
|
31
|
+
* An investigation that found a log line, or found the cause, or never
|
|
32
|
+
* searched the logs of a project that has them, is not stalled for lack of
|
|
33
|
+
* logs and says nothing of the kind.
|
|
34
|
+
*
|
|
35
|
+
* Pure: the server decides with it, the Dashboard reads what the run
|
|
36
|
+
* recorded with it, and the tests and docs suites hold both to it.
|
|
37
|
+
*/
|
|
38
|
+
var InvestigationLogStallReason;
|
|
39
|
+
(function (InvestigationLogStallReason) {
|
|
40
|
+
// No log reached OneUptime around the record: nothing to read.
|
|
41
|
+
InvestigationLogStallReason["NoLogs"] = "NoLogs";
|
|
42
|
+
// Logs reached OneUptime, and none of the investigation's searches found a line.
|
|
43
|
+
InvestigationLogStallReason["NoMatchingLogs"] = "NoMatchingLogs";
|
|
44
|
+
})(InvestigationLogStallReason || (exports.InvestigationLogStallReason = InvestigationLogStallReason = {}));
|
|
45
|
+
// The toolbox's log reads: a citation of either is a search of the logs.
|
|
46
|
+
exports.INVESTIGATION_LOG_TOOL_NAMES = [
|
|
47
|
+
"search_logs",
|
|
48
|
+
"log_histogram",
|
|
49
|
+
];
|
|
50
|
+
/*
|
|
51
|
+
* How far before the record started the logs are looked for: an hour, the
|
|
52
|
+
* window an investigation reads first.
|
|
53
|
+
*/
|
|
54
|
+
exports.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE = 60;
|
|
55
|
+
function isInvestigationLogTool(toolName) {
|
|
56
|
+
return exports.INVESTIGATION_LOG_TOOL_NAMES.includes((toolName || "").trim());
|
|
57
|
+
}
|
|
58
|
+
// What the investigation's log searches found, from its citations.
|
|
59
|
+
function getInvestigationLogSearches(citations) {
|
|
60
|
+
let searchCount = 0;
|
|
61
|
+
let searchesWithLines = 0;
|
|
62
|
+
for (const citation of citations) {
|
|
63
|
+
if (!citation || !isInvestigationLogTool(citation.toolName)) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
searchCount++;
|
|
67
|
+
if (typeof citation.rowCount === "number" &&
|
|
68
|
+
Number.isFinite(citation.rowCount) &&
|
|
69
|
+
citation.rowCount > 0) {
|
|
70
|
+
searchesWithLines++;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return { searchCount, searchesWithLines };
|
|
74
|
+
}
|
|
75
|
+
/*
|
|
76
|
+
* Whether, and why, the logs stood in the investigation's way. `hasLogs` is
|
|
77
|
+
* whether any log reached OneUptime in the window, or null when that could
|
|
78
|
+
* not be read - then only the investigation's own searches speak: searched
|
|
79
|
+
* and found nothing is NoMatchingLogs, never searched is nothing to say.
|
|
80
|
+
*/
|
|
81
|
+
function decideInvestigationLogStall(input) {
|
|
82
|
+
if (!input.isInconclusive || input.searches.searchesWithLines > 0) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
if (input.hasLogs === false) {
|
|
86
|
+
return InvestigationLogStallReason.NoLogs;
|
|
87
|
+
}
|
|
88
|
+
return input.searches.searchCount > 0
|
|
89
|
+
? InvestigationLogStallReason.NoMatchingLogs
|
|
90
|
+
: null;
|
|
91
|
+
}
|
|
92
|
+
// The window an investigation's logs are looked for in.
|
|
93
|
+
function getInvestigationLogWindow(data) {
|
|
94
|
+
const startedAt = data.subjectStartedAt &&
|
|
95
|
+
Number.isFinite(data.subjectStartedAt.getTime()) &&
|
|
96
|
+
data.subjectStartedAt.getTime() <= data.now.getTime()
|
|
97
|
+
? data.subjectStartedAt
|
|
98
|
+
: data.now;
|
|
99
|
+
return {
|
|
100
|
+
startTime: new Date(startedAt.getTime() - exports.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE * 60 * 1000),
|
|
101
|
+
endTime: data.now,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function investigationLogStallToJSON(stall) {
|
|
105
|
+
return {
|
|
106
|
+
reason: stall.reason,
|
|
107
|
+
logSearchCount: stall.logSearchCount,
|
|
108
|
+
windowStart: stall.windowStart,
|
|
109
|
+
windowEnd: stall.windowEnd,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function readTimestamp(value) {
|
|
113
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return Number.isFinite(Date.parse(value)) ? value : null;
|
|
117
|
+
}
|
|
118
|
+
/*
|
|
119
|
+
* Reads what a run recorded (the InvestigationStalled event's
|
|
120
|
+
* resultSummary.logStall). Anything that does not hold together - an
|
|
121
|
+
* unknown reason, a count that is no count, a window that is no window -
|
|
122
|
+
* reads as no stall, so the card never says what the run did not record.
|
|
123
|
+
*/
|
|
124
|
+
function parseInvestigationLogStall(value) {
|
|
125
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const record = value;
|
|
129
|
+
const reason = record["reason"];
|
|
130
|
+
if (reason !== InvestigationLogStallReason.NoLogs &&
|
|
131
|
+
reason !== InvestigationLogStallReason.NoMatchingLogs) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
const count = record["logSearchCount"];
|
|
135
|
+
if (typeof count !== "number" ||
|
|
136
|
+
!Number.isInteger(count) ||
|
|
137
|
+
count < 0 ||
|
|
138
|
+
(reason === InvestigationLogStallReason.NoMatchingLogs && count === 0)) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
const windowStart = readTimestamp(record["windowStart"]);
|
|
142
|
+
const windowEnd = readTimestamp(record["windowEnd"]);
|
|
143
|
+
if (!windowStart || !windowEnd) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
reason: reason,
|
|
148
|
+
logSearchCount: count,
|
|
149
|
+
windowStart,
|
|
150
|
+
windowEnd,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/*
|
|
154
|
+
* The line the run's own record says it in, in English (the AIRunEvent's
|
|
155
|
+
* message): what an API reader or a support engineer reads. The card words
|
|
156
|
+
* it in the reader's language from the structured fields.
|
|
157
|
+
*/
|
|
158
|
+
function describeInvestigationLogStall(stall, subjectType) {
|
|
159
|
+
if (stall.reason === InvestigationLogStallReason.NoLogs) {
|
|
160
|
+
return `No logs reached OneUptime from the hour before this ${subjectType} started, so OneUptime AI had none to read.`;
|
|
161
|
+
}
|
|
162
|
+
return `OneUptime AI searched the logs ${stall.logSearchCount === 1 ? "once" : `${stall.logSearchCount} times`} and found nothing about this ${subjectType}.`;
|
|
163
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import commonJsModule from "./InvestigationLogStall.js";
|
|
2
|
+
export const INVESTIGATION_LOG_TOOL_NAMES = commonJsModule.INVESTIGATION_LOG_TOOL_NAMES;
|
|
3
|
+
export const INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE = commonJsModule.INVESTIGATION_LOG_WINDOW_MINUTES_BEFORE;
|
|
4
|
+
export const InvestigationLogStallReason = commonJsModule.InvestigationLogStallReason;
|
|
5
|
+
export const decideInvestigationLogStall = commonJsModule.decideInvestigationLogStall;
|
|
6
|
+
export const describeInvestigationLogStall = commonJsModule.describeInvestigationLogStall;
|
|
7
|
+
export const getInvestigationLogSearches = commonJsModule.getInvestigationLogSearches;
|
|
8
|
+
export const getInvestigationLogWindow = commonJsModule.getInvestigationLogWindow;
|
|
9
|
+
export const investigationLogStallToJSON = commonJsModule.investigationLogStallToJSON;
|
|
10
|
+
export const isInvestigationLogTool = commonJsModule.isInvestigationLogTool;
|
|
11
|
+
export const parseInvestigationLogStall = commonJsModule.parseInvestigationLogStall;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AiRemediationCommand, AiRemediationCommandDryRun, AiRemediationCommandPlan, AiRemediationDryRunStatus } from "../../Types/AutoRemediation/AiRemediationCommandPlan.mjs";
|
|
2
|
+
import { ResourceCommandTier } from "../../Types/ResourceAiAgent/ResourceAiAccess.mjs";
|
|
3
|
+
export declare const CLOUD_DRY_RUN_STALE_AFTER_MS: number;
|
|
4
|
+
export declare function getCloudDryRunCommandText(data: {
|
|
5
|
+
resourceType: unknown;
|
|
6
|
+
command: string;
|
|
7
|
+
}): string | null;
|
|
8
|
+
export declare function readCloudDryRunChange(data: {
|
|
9
|
+
resourceType: unknown;
|
|
10
|
+
command: string;
|
|
11
|
+
}): {
|
|
12
|
+
command: string;
|
|
13
|
+
tier: ResourceCommandTier;
|
|
14
|
+
} | null;
|
|
15
|
+
export declare function getCloudChangesToDryRun(plan: AiRemediationCommandPlan | null): Array<AiRemediationCommand>;
|
|
16
|
+
export declare function getEffectiveDryRunStatus(dryRun: AiRemediationCommandDryRun, now: Date): AiRemediationDryRunStatus;
|
|
17
|
+
export declare function isCloudDryRunInFlight(plan: AiRemediationCommandPlan | null, now: Date): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AiRemediationCommand, AiRemediationCommandDryRun, AiRemediationCommandPlan, AiRemediationDryRunStatus } from "../../Types/AutoRemediation/AiRemediationCommandPlan";
|
|
2
|
+
import { ResourceCommandTier } from "../../Types/ResourceAiAgent/ResourceAiAccess";
|
|
3
|
+
export declare const CLOUD_DRY_RUN_STALE_AFTER_MS: number;
|
|
4
|
+
export declare function getCloudDryRunCommandText(data: {
|
|
5
|
+
resourceType: unknown;
|
|
6
|
+
command: string;
|
|
7
|
+
}): string | null;
|
|
8
|
+
export declare function readCloudDryRunChange(data: {
|
|
9
|
+
resourceType: unknown;
|
|
10
|
+
command: string;
|
|
11
|
+
}): {
|
|
12
|
+
command: string;
|
|
13
|
+
tier: ResourceCommandTier;
|
|
14
|
+
} | null;
|
|
15
|
+
export declare function getCloudChangesToDryRun(plan: AiRemediationCommandPlan | null): Array<AiRemediationCommand>;
|
|
16
|
+
export declare function getEffectiveDryRunStatus(dryRun: AiRemediationCommandDryRun, now: Date): AiRemediationDryRunStatus;
|
|
17
|
+
export declare function isCloudDryRunInFlight(plan: AiRemediationCommandPlan | null, now: Date): boolean;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CLOUD_DRY_RUN_STALE_AFTER_MS = void 0;
|
|
7
|
+
exports.getCloudDryRunCommandText = getCloudDryRunCommandText;
|
|
8
|
+
exports.readCloudDryRunChange = readCloudDryRunChange;
|
|
9
|
+
exports.getCloudChangesToDryRun = getCloudChangesToDryRun;
|
|
10
|
+
exports.getEffectiveDryRunStatus = getEffectiveDryRunStatus;
|
|
11
|
+
exports.isCloudDryRunInFlight = isCloudDryRunInFlight;
|
|
12
|
+
const AiRemediationCommandPlan_1 = require("../../Types/AutoRemediation/AiRemediationCommandPlan");
|
|
13
|
+
const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
|
|
14
|
+
const AiResourceType_1 = require("../../Types/ResourceAiAgent/AiResourceType");
|
|
15
|
+
const ResourceAiAccess_1 = require("../../Types/ResourceAiAgent/ResourceAiAccess");
|
|
16
|
+
const RunbookStepType_1 = __importDefault(require("../../Types/Runbook/RunbookStepType"));
|
|
17
|
+
const CloudOperationCatalog_1 = require("./Resource/CloudOperationCatalog");
|
|
18
|
+
const ResourceCommandPolicyCore_1 = require("./Resource/ResourceCommandPolicyCore");
|
|
19
|
+
/*
|
|
20
|
+
* What the dry runs of a fix's cloud changes read off its plan - pure, so
|
|
21
|
+
* the server that runs them (Server/Utils/AutoRemediation/CloudChangeDryRun)
|
|
22
|
+
* and the Remediation card that shows them read a plan the same way.
|
|
23
|
+
*
|
|
24
|
+
* A dry run checks a cloud change the way the account's Cloud AI agent
|
|
25
|
+
* would make it, without making it (`cloud dry-run <change>`,
|
|
26
|
+
* CloudOperationCatalog). It is asked for the changes a plan proposes for
|
|
27
|
+
* approval: ResourceCommand steps on a cloud account that change something
|
|
28
|
+
* and have not run.
|
|
29
|
+
*/
|
|
30
|
+
/*
|
|
31
|
+
* A dry run still Running this long after it was asked for will not answer
|
|
32
|
+
* (the server that asked went away): it reads as Failed, and may be asked
|
|
33
|
+
* again.
|
|
34
|
+
*/
|
|
35
|
+
exports.CLOUD_DRY_RUN_STALE_AFTER_MS = 5 * 60000;
|
|
36
|
+
/*
|
|
37
|
+
* The dry run of a cloud change - `cloud dry-run <change>`, the change's
|
|
38
|
+
* canonical argv after "dry-run" - or null when the command is no change of
|
|
39
|
+
* this cloud the catalog reads (a read, whoami, a dry run already, or not a
|
|
40
|
+
* cloud command at all).
|
|
41
|
+
*/
|
|
42
|
+
function getCloudDryRunCommandText(data) {
|
|
43
|
+
const provider = (0, CloudOperationCatalog_1.getCloudCatalogProvider)(data.resourceType);
|
|
44
|
+
const argv = (0, ResourceCommandPolicyCore_1.tokenizeResourceCommand)(data.command).argv;
|
|
45
|
+
if (!provider || !argv) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const parse = (0, CloudOperationCatalog_1.parseCloudCommand)(provider, argv);
|
|
49
|
+
if (!parse.ok ||
|
|
50
|
+
parse.command.dryRunOf ||
|
|
51
|
+
!(0, CloudOperationCatalog_1.isCloudChangeOperation)(parse.command.operation)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return (0, ResourceCommandPolicyCore_1.renderResourceDisplayCommand)([
|
|
55
|
+
CloudOperationCatalog_1.CLOUD_PROGRAM,
|
|
56
|
+
CloudOperationCatalog_1.CLOUD_DRY_RUN_OPERATION_NAME,
|
|
57
|
+
...parse.command.canonicalArgs,
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
/*
|
|
61
|
+
* The change a cloud dry run checks, as its own command and tier, or null
|
|
62
|
+
* when the command is no dry run.
|
|
63
|
+
*/
|
|
64
|
+
function readCloudDryRunChange(data) {
|
|
65
|
+
const provider = (0, CloudOperationCatalog_1.getCloudCatalogProvider)(data.resourceType);
|
|
66
|
+
const argv = (0, ResourceCommandPolicyCore_1.tokenizeResourceCommand)(data.command).argv;
|
|
67
|
+
if (!provider || !argv) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const parse = (0, CloudOperationCatalog_1.parseCloudCommand)(provider, argv);
|
|
71
|
+
if (!parse.ok || !parse.command.dryRunOf) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
command: (0, ResourceCommandPolicyCore_1.renderResourceDisplayCommand)([
|
|
76
|
+
CloudOperationCatalog_1.CLOUD_PROGRAM,
|
|
77
|
+
...parse.command.dryRunOf.canonicalArgs,
|
|
78
|
+
]),
|
|
79
|
+
tier: parse.command.dryRunOf.kindSpec.tier,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// The steps of a plan a dry run checks: cloud changes that have not run.
|
|
83
|
+
function getCloudChangesToDryRun(plan) {
|
|
84
|
+
if (!plan) {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
return plan.commands
|
|
88
|
+
.filter((command) => {
|
|
89
|
+
return (command.stepType === RunbookStepType_1.default.ResourceCommand &&
|
|
90
|
+
(0, AiResourceType_1.isCloudAiResourceType)(command.resourceType) &&
|
|
91
|
+
ObjectID_1.default.isValidUUID(command.resourceId || "") &&
|
|
92
|
+
command.resourceCommandTier !== ResourceAiAccess_1.ResourceCommandTier.Read &&
|
|
93
|
+
command.execution === undefined &&
|
|
94
|
+
getCloudDryRunCommandText({
|
|
95
|
+
resourceType: command.resourceType,
|
|
96
|
+
command: command.command,
|
|
97
|
+
}) !== null);
|
|
98
|
+
})
|
|
99
|
+
.slice(0, AiRemediationCommandPlan_1.MAX_PLAN_COMMANDS);
|
|
100
|
+
}
|
|
101
|
+
/*
|
|
102
|
+
* A dry run's status as it reads now: Running past CLOUD_DRY_RUN_STALE_
|
|
103
|
+
* AFTER_MS is Failed (it will not answer).
|
|
104
|
+
*/
|
|
105
|
+
function getEffectiveDryRunStatus(dryRun, now) {
|
|
106
|
+
if (dryRun.status !== AiRemediationCommandPlan_1.AiRemediationDryRunStatus.Running) {
|
|
107
|
+
return dryRun.status;
|
|
108
|
+
}
|
|
109
|
+
const askedAt = new Date(dryRun.checkedAt).getTime();
|
|
110
|
+
return Number.isFinite(askedAt) &&
|
|
111
|
+
now.getTime() - askedAt > exports.CLOUD_DRY_RUN_STALE_AFTER_MS
|
|
112
|
+
? AiRemediationCommandPlan_1.AiRemediationDryRunStatus.Failed
|
|
113
|
+
: AiRemediationCommandPlan_1.AiRemediationDryRunStatus.Running;
|
|
114
|
+
}
|
|
115
|
+
// Whether a dry run of one of the plan's changes is on its way now.
|
|
116
|
+
function isCloudDryRunInFlight(plan, now) {
|
|
117
|
+
return getCloudChangesToDryRun(plan).some((command) => {
|
|
118
|
+
return (command.dryRun !== undefined &&
|
|
119
|
+
getEffectiveDryRunStatus(command.dryRun, now) ===
|
|
120
|
+
AiRemediationCommandPlan_1.AiRemediationDryRunStatus.Running);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import commonJsModule from "./CloudChangeDryRunPlan.js";
|
|
2
|
+
export const CLOUD_DRY_RUN_STALE_AFTER_MS = commonJsModule.CLOUD_DRY_RUN_STALE_AFTER_MS;
|
|
3
|
+
export const getCloudChangesToDryRun = commonJsModule.getCloudChangesToDryRun;
|
|
4
|
+
export const getCloudDryRunCommandText = commonJsModule.getCloudDryRunCommandText;
|
|
5
|
+
export const getEffectiveDryRunStatus = commonJsModule.getEffectiveDryRunStatus;
|
|
6
|
+
export const isCloudDryRunInFlight = commonJsModule.isCloudDryRunInFlight;
|
|
7
|
+
export const readCloudDryRunChange = commonJsModule.readCloudDryRunChange;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The cloud command policy: tiers the closed catalog of cloud operations
|
|
4
|
+
* (never a free-form aws, az or gcloud command) a Cloud AI agent and the
|
|
5
|
+
* server's live reads run on an AWS account, an Azure subscription or a
|
|
6
|
+
* Google Cloud project.
|
|
7
|
+
*
|
|
8
|
+
* A command is `cloud <operation> [RESOURCE] [--flag value]...`, read by the
|
|
9
|
+
* catalog's grammar (CloudOperationCatalog.parseCloudCommand) for the cloud
|
|
10
|
+
* the resource type names — the same parse the agent's executor and the
|
|
11
|
+
* server's live reads use to decide what to run, so the policy and the
|
|
12
|
+
* runners can never read one argv two ways. Whatever the grammar does not
|
|
13
|
+
* read as exactly one catalog operation on one resource is Denied, with a
|
|
14
|
+
* reason that names what IS available.
|
|
15
|
+
*
|
|
16
|
+
* Tiers come from the catalog, per kind of resource: every read is Read,
|
|
17
|
+
* and so is a dry run of a change (`cloud dry-run <change> ...`), which
|
|
18
|
+
* changes nothing;
|
|
19
|
+
* restart-service on an ECS service, start-instance and scale-out are
|
|
20
|
+
* SafeWrite; the rest are RiskyWrite, and fail-over-database, stop-instance
|
|
21
|
+
* and redrive-queue always ask a person (requiresHuman). A change's target
|
|
22
|
+
* is the resource's id (lowercased for Azure), the form the agent's
|
|
23
|
+
* protectedTargets and ONEUPTIME_AI_WRITE_TARGETS globs are matched
|
|
24
|
+
* against.
|
|
25
|
+
*
|
|
26
|
+
* One policy object per cloud, so the dispatcher's per-type lookup hands
|
|
27
|
+
* each cloud's resource type the grammar and the guides of its own cloud.
|
|
28
|
+
*
|
|
29
|
+
* Part of the import-closed resource policy directory that the resource AI
|
|
30
|
+
* agent carries a byte-identical copy of: relative imports of that set only.
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.GcpCloudCommandPolicy = exports.AzureCloudCommandPolicy = exports.AwsCloudCommandPolicy = void 0;
|
|
34
|
+
const ResourceAiAccess_1 = require("../../../Types/ResourceAiAgent/ResourceAiAccess");
|
|
35
|
+
const ResourceCommandPolicyCore_1 = require("./ResourceCommandPolicyCore");
|
|
36
|
+
const CloudOperationCatalog_1 = require("./CloudOperationCatalog");
|
|
37
|
+
/*
|
|
38
|
+
* A Denied result that cannot throw: deniedResult reads the argv, and an
|
|
39
|
+
* argv that throws when read (it made the parse throw) is described without
|
|
40
|
+
* it.
|
|
41
|
+
*/
|
|
42
|
+
function refused(argv, reason) {
|
|
43
|
+
try {
|
|
44
|
+
return (0, ResourceCommandPolicyCore_1.deniedResult)(argv, reason);
|
|
45
|
+
}
|
|
46
|
+
catch (_a) {
|
|
47
|
+
return {
|
|
48
|
+
tier: ResourceAiAccess_1.ResourceCommandTier.Denied,
|
|
49
|
+
reason,
|
|
50
|
+
program: CloudOperationCatalog_1.CLOUD_PROGRAM,
|
|
51
|
+
args: [],
|
|
52
|
+
verb: "",
|
|
53
|
+
displayCommand: CloudOperationCatalog_1.CLOUD_PROGRAM,
|
|
54
|
+
targets: [],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// "an ECS service", "this AWS account": what the command acts on, in words.
|
|
59
|
+
function describeSubject(command) {
|
|
60
|
+
if (!command.resource) {
|
|
61
|
+
return `this ${CloudOperationCatalog_1.CLOUD_CATALOG_PROVIDER_NAMES[command.provider]} account`;
|
|
62
|
+
}
|
|
63
|
+
const kind = (0, CloudOperationCatalog_1.getCloudResourceKind)(command.provider, command.resource.kind);
|
|
64
|
+
return kind ? `one ${kind.displayName}` : "one resource";
|
|
65
|
+
}
|
|
66
|
+
function describeTier(command) {
|
|
67
|
+
const spec = command.kindSpec;
|
|
68
|
+
const name = `cloud ${command.operation.name}`;
|
|
69
|
+
// A dry run reads; what it reads about is the change it checks.
|
|
70
|
+
if (command.dryRunOf) {
|
|
71
|
+
return `${name} ${command.dryRunOf.operation.name} changes nothing: the Cloud AI agent checks that change on ${describeSubject(command.dryRunOf)} as it would make it and reads the value it would replace, then stops before ${command.dryRunOf.kindSpec.apiCall}`;
|
|
72
|
+
}
|
|
73
|
+
switch (spec.tier) {
|
|
74
|
+
case ResourceAiAccess_1.ResourceCommandTier.Read:
|
|
75
|
+
return `${name} is a live read that changes nothing: it ${command.operation.summary} (${spec.apiCall})`;
|
|
76
|
+
case ResourceAiAccess_1.ResourceCommandTier.SafeWrite:
|
|
77
|
+
return `${name} changes ${describeSubject(command)} only, with ${spec.apiCall}: it ${command.operation.summary}`;
|
|
78
|
+
default:
|
|
79
|
+
return `${name} changes ${describeSubject(command)} only, with ${spec.apiCall}${spec.requiresHuman ? ", and a person always approves it" : ""}: it ${command.operation.summary}`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function evaluateCloudArgv(provider, argv) {
|
|
83
|
+
const parse = (0, CloudOperationCatalog_1.parseCloudCommand)(provider, argv);
|
|
84
|
+
if (!parse.ok) {
|
|
85
|
+
return refused(argv, parse.errorMessage);
|
|
86
|
+
}
|
|
87
|
+
const command = parse.command;
|
|
88
|
+
const tier = command.kindSpec.tier;
|
|
89
|
+
if (tier !== ResourceAiAccess_1.ResourceCommandTier.Read &&
|
|
90
|
+
tier !== ResourceAiAccess_1.ResourceCommandTier.SafeWrite &&
|
|
91
|
+
tier !== ResourceAiAccess_1.ResourceCommandTier.RiskyWrite) {
|
|
92
|
+
return refused(argv, `cloud ${command.operation.name} is not allowed`);
|
|
93
|
+
}
|
|
94
|
+
const isWrite = tier !== ResourceAiAccess_1.ResourceCommandTier.Read;
|
|
95
|
+
// A change always names its one resource; fail closed if it somehow did not.
|
|
96
|
+
if (isWrite && !command.resource) {
|
|
97
|
+
return refused(argv, `cloud ${command.operation.name} must name the one resource it changes`);
|
|
98
|
+
}
|
|
99
|
+
const result = {
|
|
100
|
+
tier,
|
|
101
|
+
reason: describeTier(command),
|
|
102
|
+
program: CloudOperationCatalog_1.CLOUD_PROGRAM,
|
|
103
|
+
args: command.canonicalArgs.slice(),
|
|
104
|
+
verb: command.operation.name,
|
|
105
|
+
displayCommand: (0, ResourceCommandPolicyCore_1.renderResourceDisplayCommand)([
|
|
106
|
+
CloudOperationCatalog_1.CLOUD_PROGRAM,
|
|
107
|
+
...command.canonicalArgs,
|
|
108
|
+
]),
|
|
109
|
+
targets: isWrite && command.resource
|
|
110
|
+
? [(0, CloudOperationCatalog_1.getCloudWriteTarget)(command.resource)]
|
|
111
|
+
: [],
|
|
112
|
+
};
|
|
113
|
+
if (isWrite && command.kindSpec.requiresHuman) {
|
|
114
|
+
result.requiresHuman = true;
|
|
115
|
+
}
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
/*
|
|
119
|
+
* Resource ids an allowlist entry's `*` is tried as (two of each kind a
|
|
120
|
+
* change works on), so `cloud restart-service *` can be seen to be a valid
|
|
121
|
+
* entry — and a broad one, as it changes whichever service it names.
|
|
122
|
+
*/
|
|
123
|
+
const ALLOWLIST_STAND_INS = {
|
|
124
|
+
aws: [1, 2].flatMap((n) => {
|
|
125
|
+
return [
|
|
126
|
+
`arn:aws:ecs:us-east-1:123456789012:service/stand-in/service-${n}`,
|
|
127
|
+
`arn:aws:ec2:us-east-1:123456789012:instance/i-0000000000000000${n}`,
|
|
128
|
+
`arn:aws:rds:us-east-1:123456789012:db:stand-in-${n}`,
|
|
129
|
+
`arn:aws:rds:us-east-1:123456789012:cluster:stand-in-${n}`,
|
|
130
|
+
`arn:aws:autoscaling:us-east-1:123456789012:autoScalingGroup:00000000-0000-0000-0000-00000000000${n}:autoScalingGroupName/stand-in-${n}`,
|
|
131
|
+
`arn:aws:lambda:us-east-1:123456789012:function:stand-in-${n}`,
|
|
132
|
+
`arn:aws:lambda:us-east-1:123456789012:function:stand-in:alias-${n}`,
|
|
133
|
+
`arn:aws:sqs:us-east-1:123456789012:stand-in-${n}`,
|
|
134
|
+
];
|
|
135
|
+
}),
|
|
136
|
+
azure: [1, 2].flatMap((n) => {
|
|
137
|
+
const group = `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/stand-in/providers`;
|
|
138
|
+
return [
|
|
139
|
+
`${group}/Microsoft.Web/sites/site-${n}`,
|
|
140
|
+
`${group}/Microsoft.Web/serverfarms/plan-${n}`,
|
|
141
|
+
`${group}/Microsoft.App/containerApps/app-${n}`,
|
|
142
|
+
`${group}/Microsoft.Compute/virtualMachines/vm-${n}`,
|
|
143
|
+
`${group}/Microsoft.Compute/virtualMachineScaleSets/vmss-${n}`,
|
|
144
|
+
`${group}/Microsoft.DBforPostgreSQL/flexibleServers/pg-${n}`,
|
|
145
|
+
`${group}/Microsoft.DBforMySQL/flexibleServers/mysql-${n}`,
|
|
146
|
+
`${group}/Microsoft.Sql/servers/sql/failoverGroups/group-${n}`,
|
|
147
|
+
];
|
|
148
|
+
}),
|
|
149
|
+
gcp: [1, 2].flatMap((n) => {
|
|
150
|
+
return [
|
|
151
|
+
`//compute.googleapis.com/projects/stand-in/zones/us-central1-a/instances/vm-${n}`,
|
|
152
|
+
`//compute.googleapis.com/projects/stand-in/zones/us-central1-a/instanceGroupManagers/group-${n}`,
|
|
153
|
+
`//run.googleapis.com/projects/stand-in/locations/us-central1/services/service-${n}`,
|
|
154
|
+
`//cloudsql.googleapis.com/projects/stand-in/instances/sql-${n}`,
|
|
155
|
+
];
|
|
156
|
+
}),
|
|
157
|
+
};
|
|
158
|
+
function buildCloudCommandPolicy(provider) {
|
|
159
|
+
return {
|
|
160
|
+
name: `cloud-${provider}`,
|
|
161
|
+
programs: [CloudOperationCatalog_1.CLOUD_PROGRAM],
|
|
162
|
+
readCommandGuide: (0, CloudOperationCatalog_1.getCloudReadCommandGuide)(provider),
|
|
163
|
+
writeCommandGuide: (0, CloudOperationCatalog_1.getCloudWriteCommandGuide)(provider),
|
|
164
|
+
allowlistStandIns: ALLOWLIST_STAND_INS[provider],
|
|
165
|
+
evaluateArgv(argv) {
|
|
166
|
+
try {
|
|
167
|
+
return evaluateCloudArgv(provider, argv);
|
|
168
|
+
}
|
|
169
|
+
catch (_a) {
|
|
170
|
+
return refused(argv, "the cloud command policy could not read this command");
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
exports.AwsCloudCommandPolicy = buildCloudCommandPolicy("aws");
|
|
176
|
+
exports.AzureCloudCommandPolicy = buildCloudCommandPolicy("azure");
|
|
177
|
+
exports.GcpCloudCommandPolicy = buildCloudCommandPolicy("gcp");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import commonJsModule from "./CloudCommandPolicy.js";
|
|
2
|
+
export const AwsCloudCommandPolicy = commonJsModule.AwsCloudCommandPolicy;
|
|
3
|
+
export const AzureCloudCommandPolicy = commonJsModule.AzureCloudCommandPolicy;
|
|
4
|
+
export const GcpCloudCommandPolicy = commonJsModule.GcpCloudCommandPolicy;
|