@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,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEVERITY_ORDER = exports.MAX_VULNERABILITIES_PER_ADVISORY = exports.MAX_VERSION_TEXT_LENGTH = exports.MAX_SUMMARY_LENGTH = exports.SecurityAdvisorySeverity = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* A security advisory OneUptime published on GitHub for OneUptime/oneuptime,
|
|
6
|
+
* as this installation keeps it (GlobalConfig.securityAdvisories): only what
|
|
7
|
+
* the Admin Dashboard's notice, the footer and the email show, and what is
|
|
8
|
+
* needed to tell whether the running version is affected. The daily update
|
|
9
|
+
* check (Workers/Jobs/InstanceUpdate) reads GitHub's answer into this shape,
|
|
10
|
+
* so nothing GitHub sends is stored or shown as it came.
|
|
11
|
+
*
|
|
12
|
+
* Every value is checked and capped on the way in and again on the way out
|
|
13
|
+
* (fromJSON), since the stored JSON is read back by the API that the
|
|
14
|
+
* frontends render: an advisory's link is only ever an https://github.com
|
|
15
|
+
* address, its identifiers have GitHub's shape, and its text is plain and
|
|
16
|
+
* short.
|
|
17
|
+
*/
|
|
18
|
+
var SecurityAdvisorySeverity;
|
|
19
|
+
(function (SecurityAdvisorySeverity) {
|
|
20
|
+
SecurityAdvisorySeverity["Critical"] = "critical";
|
|
21
|
+
SecurityAdvisorySeverity["High"] = "high";
|
|
22
|
+
SecurityAdvisorySeverity["Medium"] = "medium";
|
|
23
|
+
SecurityAdvisorySeverity["Low"] = "low";
|
|
24
|
+
// GitHub left the severity out.
|
|
25
|
+
SecurityAdvisorySeverity["Unknown"] = "unknown";
|
|
26
|
+
})(SecurityAdvisorySeverity || (exports.SecurityAdvisorySeverity = SecurityAdvisorySeverity = {}));
|
|
27
|
+
// GitHub's advisory identifier: GHSA and three groups of four.
|
|
28
|
+
const GHSA_ID = /^GHSA(-[0-9a-z]{4}){3}$/i;
|
|
29
|
+
const CVE_ID = /^CVE-\d{4}-\d{4,10}$/i;
|
|
30
|
+
// Where an advisory may link: GitHub's own pages, over HTTPS.
|
|
31
|
+
const GITHUB_ADVISORY_URL_PREFIX = "https://github.com/";
|
|
32
|
+
exports.MAX_SUMMARY_LENGTH = 300;
|
|
33
|
+
exports.MAX_VERSION_TEXT_LENGTH = 256;
|
|
34
|
+
exports.MAX_VULNERABILITIES_PER_ADVISORY = 20;
|
|
35
|
+
// Longer than GitHub's longest repository URL; anything longer is not a link to keep.
|
|
36
|
+
const MAX_URL_LENGTH = 512;
|
|
37
|
+
// Severity, most severe first: how notices and emails order advisories.
|
|
38
|
+
exports.SEVERITY_ORDER = [
|
|
39
|
+
SecurityAdvisorySeverity.Critical,
|
|
40
|
+
SecurityAdvisorySeverity.High,
|
|
41
|
+
SecurityAdvisorySeverity.Medium,
|
|
42
|
+
SecurityAdvisorySeverity.Low,
|
|
43
|
+
SecurityAdvisorySeverity.Unknown,
|
|
44
|
+
];
|
|
45
|
+
class SecurityAdvisoryUtil {
|
|
46
|
+
static parseSeverity(value) {
|
|
47
|
+
if (typeof value !== "string") {
|
|
48
|
+
return SecurityAdvisorySeverity.Unknown;
|
|
49
|
+
}
|
|
50
|
+
const lowered = value.trim().toLowerCase();
|
|
51
|
+
// GitHub's own API spelled "medium" as "moderate" in places.
|
|
52
|
+
if (lowered === "moderate") {
|
|
53
|
+
return SecurityAdvisorySeverity.Medium;
|
|
54
|
+
}
|
|
55
|
+
return Object.values(SecurityAdvisorySeverity).includes(lowered)
|
|
56
|
+
? lowered
|
|
57
|
+
: SecurityAdvisorySeverity.Unknown;
|
|
58
|
+
}
|
|
59
|
+
// 0 for critical, rising to Unknown: sorts the most severe first.
|
|
60
|
+
static severityRank(severity) {
|
|
61
|
+
const rank = exports.SEVERITY_ORDER.indexOf(severity);
|
|
62
|
+
return rank === -1 ? exports.SEVERITY_ORDER.length : rank;
|
|
63
|
+
}
|
|
64
|
+
static isGhsaId(value) {
|
|
65
|
+
return (typeof value === "string" && value.length <= 32 && GHSA_ID.test(value));
|
|
66
|
+
}
|
|
67
|
+
// As GitHub writes it: "GHSA-" then lower-case groups ("GHSA-9q6r-9h5m-572w").
|
|
68
|
+
static normalizeGhsaId(value) {
|
|
69
|
+
return `GHSA${value.substring(4).toLowerCase()}`;
|
|
70
|
+
}
|
|
71
|
+
static parseCveId(value) {
|
|
72
|
+
if (typeof value !== "string" || value.length > 32) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
const trimmed = value.trim();
|
|
76
|
+
return CVE_ID.test(trimmed) ? trimmed.toUpperCase() : null;
|
|
77
|
+
}
|
|
78
|
+
// An https://github.com/ address, or null for anything else.
|
|
79
|
+
static parseUrl(value) {
|
|
80
|
+
if (typeof value !== "string" || value.length > MAX_URL_LENGTH) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const trimmed = value.trim();
|
|
84
|
+
if (!trimmed.startsWith(GITHUB_ADVISORY_URL_PREFIX)) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
const url = new globalThis.URL(trimmed);
|
|
89
|
+
if (url.protocol !== "https:" || url.hostname !== "github.com") {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return url.toString();
|
|
93
|
+
}
|
|
94
|
+
catch (_a) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// An ISO date string, or null for anything that is not a date.
|
|
99
|
+
static parseDate(value) {
|
|
100
|
+
if (typeof value !== "string" || value.length > 64) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
const date = new Date(value);
|
|
104
|
+
return Number.isNaN(date.getTime()) ? null : date.toISOString();
|
|
105
|
+
}
|
|
106
|
+
/*
|
|
107
|
+
* Plain text on one line, capped: an advisory's summary. Control characters
|
|
108
|
+
* and runs of whitespace become one space.
|
|
109
|
+
*/
|
|
110
|
+
static parseText(value, maxLength) {
|
|
111
|
+
if (typeof value !== "string") {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
let text = "";
|
|
115
|
+
let lastWasSpace = false;
|
|
116
|
+
// A loop, not a regular expression: the value is not capped yet.
|
|
117
|
+
for (const character of value.substring(0, maxLength * 4)) {
|
|
118
|
+
const code = character.codePointAt(0) || 0;
|
|
119
|
+
const isSpace = code <= 0x20 ||
|
|
120
|
+
(code >= 0x7f && code <= 0x9f) ||
|
|
121
|
+
code === 0x2028 ||
|
|
122
|
+
code === 0x2029;
|
|
123
|
+
if (isSpace) {
|
|
124
|
+
if (!lastWasSpace && text.length > 0) {
|
|
125
|
+
text += " ";
|
|
126
|
+
}
|
|
127
|
+
lastWasSpace = true;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
text += character;
|
|
131
|
+
lastWasSpace = false;
|
|
132
|
+
}
|
|
133
|
+
text = text.trim();
|
|
134
|
+
if (!text) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
if (text.length > maxLength) {
|
|
138
|
+
return `${text.substring(0, maxLength - 1).trimEnd()}…`;
|
|
139
|
+
}
|
|
140
|
+
return text;
|
|
141
|
+
}
|
|
142
|
+
static parseVersionText(value) {
|
|
143
|
+
if (typeof value !== "string" || value.length > exports.MAX_VERSION_TEXT_LENGTH) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return this.parseText(value, exports.MAX_VERSION_TEXT_LENGTH);
|
|
147
|
+
}
|
|
148
|
+
/*
|
|
149
|
+
* An advisory as it is stored (toJSON's shape), or null when it is not
|
|
150
|
+
* one. Used to read the stored list back, never trusting it.
|
|
151
|
+
*/
|
|
152
|
+
static fromJSON(value) {
|
|
153
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const json = value;
|
|
157
|
+
if (!this.isGhsaId(json["ghsaId"])) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
const vulnerabilities = Array.isArray(json["vulnerabilities"])
|
|
161
|
+
? json["vulnerabilities"]
|
|
162
|
+
.slice(0, exports.MAX_VULNERABILITIES_PER_ADVISORY)
|
|
163
|
+
.map((item) => {
|
|
164
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
const vulnerability = item;
|
|
168
|
+
return {
|
|
169
|
+
vulnerableVersionRange: this.parseVersionText(vulnerability["vulnerableVersionRange"]),
|
|
170
|
+
patchedVersions: this.parseVersionText(vulnerability["patchedVersions"]),
|
|
171
|
+
};
|
|
172
|
+
})
|
|
173
|
+
.filter((item) => {
|
|
174
|
+
return item !== null;
|
|
175
|
+
})
|
|
176
|
+
: [];
|
|
177
|
+
return {
|
|
178
|
+
ghsaId: this.normalizeGhsaId(json["ghsaId"]),
|
|
179
|
+
cveId: this.parseCveId(json["cveId"]),
|
|
180
|
+
summary: this.parseText(json["summary"], exports.MAX_SUMMARY_LENGTH) ||
|
|
181
|
+
json["ghsaId"],
|
|
182
|
+
severity: this.parseSeverity(json["severity"]),
|
|
183
|
+
url: this.parseUrl(json["url"]),
|
|
184
|
+
publishedAt: this.parseDate(json["publishedAt"]),
|
|
185
|
+
vulnerabilities: vulnerabilities,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
// Every advisory of a stored list that is one; anything else is dropped.
|
|
189
|
+
static fromJSONArray(value) {
|
|
190
|
+
if (!Array.isArray(value)) {
|
|
191
|
+
return [];
|
|
192
|
+
}
|
|
193
|
+
const advisories = [];
|
|
194
|
+
const seen = new Set();
|
|
195
|
+
for (const item of value) {
|
|
196
|
+
const advisory = this.fromJSON(item);
|
|
197
|
+
if (advisory && !seen.has(advisory.ghsaId)) {
|
|
198
|
+
seen.add(advisory.ghsaId);
|
|
199
|
+
advisories.push(advisory);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return advisories;
|
|
203
|
+
}
|
|
204
|
+
static toJSON(advisory) {
|
|
205
|
+
return {
|
|
206
|
+
ghsaId: advisory.ghsaId,
|
|
207
|
+
cveId: advisory.cveId,
|
|
208
|
+
summary: advisory.summary,
|
|
209
|
+
severity: advisory.severity,
|
|
210
|
+
url: advisory.url,
|
|
211
|
+
publishedAt: advisory.publishedAt,
|
|
212
|
+
vulnerabilities: advisory.vulnerabilities.map((vulnerability) => {
|
|
213
|
+
return {
|
|
214
|
+
vulnerableVersionRange: vulnerability.vulnerableVersionRange,
|
|
215
|
+
patchedVersions: vulnerability.patchedVersions,
|
|
216
|
+
};
|
|
217
|
+
}),
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.default = SecurityAdvisoryUtil;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import commonJsModule from "./SecurityAdvisory.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const MAX_SUMMARY_LENGTH = commonJsModule.MAX_SUMMARY_LENGTH;
|
|
4
|
+
export const MAX_VERSION_TEXT_LENGTH = commonJsModule.MAX_VERSION_TEXT_LENGTH;
|
|
5
|
+
export const MAX_VULNERABILITIES_PER_ADVISORY = commonJsModule.MAX_VULNERABILITIES_PER_ADVISORY;
|
|
6
|
+
export const SEVERITY_ORDER = commonJsModule.SEVERITY_ORDER;
|
|
7
|
+
export const SecurityAdvisorySeverity = commonJsModule.SecurityAdvisorySeverity;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare enum UpdateCheckFailure {
|
|
2
|
+
RateLimited = "rate-limited",
|
|
3
|
+
Unreachable = "unreachable",
|
|
4
|
+
TimedOut = "timed-out",
|
|
5
|
+
HttpError = "http-error",
|
|
6
|
+
MalformedResponse = "malformed-response"
|
|
7
|
+
}
|
|
8
|
+
export declare const parseUpdateCheckFailure: (value: unknown) => UpdateCheckFailure | null;
|
|
9
|
+
export default UpdateCheckFailure;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare enum UpdateCheckFailure {
|
|
2
|
+
RateLimited = "rate-limited",
|
|
3
|
+
Unreachable = "unreachable",
|
|
4
|
+
TimedOut = "timed-out",
|
|
5
|
+
HttpError = "http-error",
|
|
6
|
+
MalformedResponse = "malformed-response"
|
|
7
|
+
}
|
|
8
|
+
export declare const parseUpdateCheckFailure: (value: unknown) => UpdateCheckFailure | null;
|
|
9
|
+
export default UpdateCheckFailure;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseUpdateCheckFailure = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Why the last daily update check could not reach GitHub, as the Admin
|
|
6
|
+
* Dashboard says it (GlobalConfig.updateCheckLastFailure). A short code, never
|
|
7
|
+
* text GitHub or the network wrote, so the notice words it in the reader's
|
|
8
|
+
* language and nothing from outside is shown as it came.
|
|
9
|
+
*/
|
|
10
|
+
var UpdateCheckFailure;
|
|
11
|
+
(function (UpdateCheckFailure) {
|
|
12
|
+
/*
|
|
13
|
+
* GitHub refused the request for its limit: 60 requests an hour from one
|
|
14
|
+
* address without a token (403 with x-ratelimit-remaining 0, or 429).
|
|
15
|
+
*/
|
|
16
|
+
UpdateCheckFailure["RateLimited"] = "rate-limited";
|
|
17
|
+
// No answer at all: no route out, DNS, a refused connection, a firewall.
|
|
18
|
+
UpdateCheckFailure["Unreachable"] = "unreachable";
|
|
19
|
+
// No answer within the time the check waits.
|
|
20
|
+
UpdateCheckFailure["TimedOut"] = "timed-out";
|
|
21
|
+
// An HTTP error other than the rate limit: a 404 from a mirror, a 5xx.
|
|
22
|
+
UpdateCheckFailure["HttpError"] = "http-error";
|
|
23
|
+
// An answer, but not the shape GitHub sends.
|
|
24
|
+
UpdateCheckFailure["MalformedResponse"] = "malformed-response";
|
|
25
|
+
})(UpdateCheckFailure || (UpdateCheckFailure = {}));
|
|
26
|
+
const parseUpdateCheckFailure = (value) => {
|
|
27
|
+
return Object.values(UpdateCheckFailure).includes(value)
|
|
28
|
+
? value
|
|
29
|
+
: null;
|
|
30
|
+
};
|
|
31
|
+
exports.parseUpdateCheckFailure = parseUpdateCheckFailure;
|
|
32
|
+
exports.default = UpdateCheckFailure;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON.mjs";
|
|
2
|
+
import { SecurityAdvisorySeverity } from "./SecurityAdvisory.mjs";
|
|
3
|
+
import UpdateCheckFailure from "./UpdateCheckFailure.mjs";
|
|
4
|
+
export declare enum UpdateState {
|
|
5
|
+
SecurityUpdate = "security-update",
|
|
6
|
+
SecurityAdvisory = "security-advisory",
|
|
7
|
+
UpdateAvailable = "update-available",
|
|
8
|
+
UpToDate = "up-to-date",
|
|
9
|
+
Unknown = "unknown"
|
|
10
|
+
}
|
|
11
|
+
export interface AffectingAdvisory {
|
|
12
|
+
ghsaId: string;
|
|
13
|
+
cveId: string | null;
|
|
14
|
+
summary: string;
|
|
15
|
+
severity: SecurityAdvisorySeverity;
|
|
16
|
+
url: string | null;
|
|
17
|
+
publishedAt: string | null;
|
|
18
|
+
affectedVersions: string | null;
|
|
19
|
+
fixedIn: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface UpdateStatus {
|
|
22
|
+
state: UpdateState;
|
|
23
|
+
currentVersion: string;
|
|
24
|
+
isVersionComparable: boolean;
|
|
25
|
+
isUpdateCheckDisabled: boolean;
|
|
26
|
+
latestVersion: string | null;
|
|
27
|
+
latestVersionPublishedAt: string | null;
|
|
28
|
+
isUpdateAvailable: boolean;
|
|
29
|
+
isMajorUpgrade: boolean;
|
|
30
|
+
recommendedVersion: string | null;
|
|
31
|
+
advisories: Array<AffectingAdvisory>;
|
|
32
|
+
latestVersionCheckedAt: string | null;
|
|
33
|
+
advisoriesCheckedAt: string | null;
|
|
34
|
+
lastCheckAttemptedAt: string | null;
|
|
35
|
+
lastCheckFailure: UpdateCheckFailure | null;
|
|
36
|
+
}
|
|
37
|
+
export default class UpdateStatusUtil {
|
|
38
|
+
static isSecurityState(state: UpdateState): boolean;
|
|
39
|
+
static isShownInFooter(status: UpdateStatus | null): boolean;
|
|
40
|
+
static parseState(value: unknown): UpdateState;
|
|
41
|
+
static fromJSON(value: unknown): UpdateStatus | null;
|
|
42
|
+
static toJSON(status: UpdateStatus): JSONObject;
|
|
43
|
+
private static parseAffectingAdvisory;
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON";
|
|
2
|
+
import { SecurityAdvisorySeverity } from "./SecurityAdvisory";
|
|
3
|
+
import UpdateCheckFailure from "./UpdateCheckFailure";
|
|
4
|
+
export declare enum UpdateState {
|
|
5
|
+
SecurityUpdate = "security-update",
|
|
6
|
+
SecurityAdvisory = "security-advisory",
|
|
7
|
+
UpdateAvailable = "update-available",
|
|
8
|
+
UpToDate = "up-to-date",
|
|
9
|
+
Unknown = "unknown"
|
|
10
|
+
}
|
|
11
|
+
export interface AffectingAdvisory {
|
|
12
|
+
ghsaId: string;
|
|
13
|
+
cveId: string | null;
|
|
14
|
+
summary: string;
|
|
15
|
+
severity: SecurityAdvisorySeverity;
|
|
16
|
+
url: string | null;
|
|
17
|
+
publishedAt: string | null;
|
|
18
|
+
affectedVersions: string | null;
|
|
19
|
+
fixedIn: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface UpdateStatus {
|
|
22
|
+
state: UpdateState;
|
|
23
|
+
currentVersion: string;
|
|
24
|
+
isVersionComparable: boolean;
|
|
25
|
+
isUpdateCheckDisabled: boolean;
|
|
26
|
+
latestVersion: string | null;
|
|
27
|
+
latestVersionPublishedAt: string | null;
|
|
28
|
+
isUpdateAvailable: boolean;
|
|
29
|
+
isMajorUpgrade: boolean;
|
|
30
|
+
recommendedVersion: string | null;
|
|
31
|
+
advisories: Array<AffectingAdvisory>;
|
|
32
|
+
latestVersionCheckedAt: string | null;
|
|
33
|
+
advisoriesCheckedAt: string | null;
|
|
34
|
+
lastCheckAttemptedAt: string | null;
|
|
35
|
+
lastCheckFailure: UpdateCheckFailure | null;
|
|
36
|
+
}
|
|
37
|
+
export default class UpdateStatusUtil {
|
|
38
|
+
static isSecurityState(state: UpdateState): boolean;
|
|
39
|
+
static isShownInFooter(status: UpdateStatus | null): boolean;
|
|
40
|
+
static parseState(value: unknown): UpdateState;
|
|
41
|
+
static fromJSON(value: unknown): UpdateStatus | null;
|
|
42
|
+
static toJSON(status: UpdateStatus): JSONObject;
|
|
43
|
+
private static parseAffectingAdvisory;
|
|
44
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
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.UpdateState = void 0;
|
|
40
|
+
const VersionUtil_1 = __importDefault(require("../../Utils/VersionUtil"));
|
|
41
|
+
const SecurityAdvisory_1 = __importStar(require("./SecurityAdvisory"));
|
|
42
|
+
const UpdateCheckFailure_1 = require("./UpdateCheckFailure");
|
|
43
|
+
/*
|
|
44
|
+
* Whether this installation should be upgraded, and why: the answer of
|
|
45
|
+
* GET /global-config/update-status (master admins only), which the
|
|
46
|
+
* Dashboard's and the Admin Dashboard's footers and the Admin Dashboard's
|
|
47
|
+
* security notice draw. The server works it out from what the daily update
|
|
48
|
+
* check stored and the version it runs (SecurityAdvisoryMatcher.
|
|
49
|
+
* buildUpdateStatus), so it follows an upgrade the moment the new version
|
|
50
|
+
* starts, and no browser ever calls GitHub.
|
|
51
|
+
*/
|
|
52
|
+
var UpdateState;
|
|
53
|
+
(function (UpdateState) {
|
|
54
|
+
/*
|
|
55
|
+
* A published security advisory affects the version this installation
|
|
56
|
+
* runs, and a release fixes it.
|
|
57
|
+
*/
|
|
58
|
+
UpdateState["SecurityUpdate"] = "security-update";
|
|
59
|
+
/*
|
|
60
|
+
* A published security advisory affects the version this installation
|
|
61
|
+
* runs, and no release fixes it yet.
|
|
62
|
+
*/
|
|
63
|
+
UpdateState["SecurityAdvisory"] = "security-advisory";
|
|
64
|
+
// A newer release is out, and no advisory affects this version.
|
|
65
|
+
UpdateState["UpdateAvailable"] = "update-available";
|
|
66
|
+
// The latest release, as of the last check, and no advisory affects it.
|
|
67
|
+
UpdateState["UpToDate"] = "up-to-date";
|
|
68
|
+
/*
|
|
69
|
+
* Nothing to say: the check is off, has not answered yet, the build
|
|
70
|
+
* reports no version, or this is OneUptime Cloud.
|
|
71
|
+
*/
|
|
72
|
+
UpdateState["Unknown"] = "unknown";
|
|
73
|
+
})(UpdateState || (exports.UpdateState = UpdateState = {}));
|
|
74
|
+
const MAX_ADVISORIES_SHOWN = 100;
|
|
75
|
+
const toStringOrNull = (value, maxLength) => {
|
|
76
|
+
return typeof value === "string" && value && value.length <= maxLength
|
|
77
|
+
? value
|
|
78
|
+
: null;
|
|
79
|
+
};
|
|
80
|
+
class UpdateStatusUtil {
|
|
81
|
+
static isSecurityState(state) {
|
|
82
|
+
return (state === UpdateState.SecurityUpdate ||
|
|
83
|
+
state === UpdateState.SecurityAdvisory);
|
|
84
|
+
}
|
|
85
|
+
/*
|
|
86
|
+
* Whether the footers show anything for this state: an update, or an
|
|
87
|
+
* advisory. Up to date and unknown show nothing, so the footer stays as
|
|
88
|
+
* it always was.
|
|
89
|
+
*/
|
|
90
|
+
static isShownInFooter(status) {
|
|
91
|
+
if (!status) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
return (this.isSecurityState(status.state) ||
|
|
95
|
+
status.state === UpdateState.UpdateAvailable);
|
|
96
|
+
}
|
|
97
|
+
static parseState(value) {
|
|
98
|
+
return Object.values(UpdateState).includes(value)
|
|
99
|
+
? value
|
|
100
|
+
: UpdateState.Unknown;
|
|
101
|
+
}
|
|
102
|
+
/*
|
|
103
|
+
* The response as a browser reads it: every field checked, anything
|
|
104
|
+
* missing or of the wrong kind read as "nothing to say". An advisory link
|
|
105
|
+
* is only ever kept when it is on github.com.
|
|
106
|
+
*/
|
|
107
|
+
static fromJSON(value) {
|
|
108
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const json = value;
|
|
112
|
+
const advisories = Array.isArray(json["advisories"])
|
|
113
|
+
? json["advisories"]
|
|
114
|
+
.slice(0, MAX_ADVISORIES_SHOWN)
|
|
115
|
+
.map((item) => {
|
|
116
|
+
return this.parseAffectingAdvisory(item);
|
|
117
|
+
})
|
|
118
|
+
.filter((item) => {
|
|
119
|
+
return item !== null;
|
|
120
|
+
})
|
|
121
|
+
: [];
|
|
122
|
+
let state = this.parseState(json["state"]);
|
|
123
|
+
// A security state with no advisory to show is not one.
|
|
124
|
+
if (this.isSecurityState(state) && advisories.length === 0) {
|
|
125
|
+
state = UpdateState.Unknown;
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
state: state,
|
|
129
|
+
currentVersion: toStringOrNull(json["currentVersion"], 100) || "",
|
|
130
|
+
isVersionComparable: json["isVersionComparable"] === true,
|
|
131
|
+
isUpdateCheckDisabled: json["isUpdateCheckDisabled"] === true,
|
|
132
|
+
latestVersion: VersionUtil_1.default.canonicalize(json["latestVersion"]),
|
|
133
|
+
latestVersionPublishedAt: SecurityAdvisory_1.default.parseDate(json["latestVersionPublishedAt"]),
|
|
134
|
+
isUpdateAvailable: json["isUpdateAvailable"] === true,
|
|
135
|
+
isMajorUpgrade: json["isMajorUpgrade"] === true,
|
|
136
|
+
recommendedVersion: VersionUtil_1.default.canonicalize(json["recommendedVersion"]),
|
|
137
|
+
advisories: advisories,
|
|
138
|
+
latestVersionCheckedAt: SecurityAdvisory_1.default.parseDate(json["latestVersionCheckedAt"]),
|
|
139
|
+
advisoriesCheckedAt: SecurityAdvisory_1.default.parseDate(json["advisoriesCheckedAt"]),
|
|
140
|
+
lastCheckAttemptedAt: SecurityAdvisory_1.default.parseDate(json["lastCheckAttemptedAt"]),
|
|
141
|
+
lastCheckFailure: (0, UpdateCheckFailure_1.parseUpdateCheckFailure)(json["lastCheckFailure"]),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static toJSON(status) {
|
|
145
|
+
return {
|
|
146
|
+
state: status.state,
|
|
147
|
+
currentVersion: status.currentVersion,
|
|
148
|
+
isVersionComparable: status.isVersionComparable,
|
|
149
|
+
isUpdateCheckDisabled: status.isUpdateCheckDisabled,
|
|
150
|
+
latestVersion: status.latestVersion,
|
|
151
|
+
latestVersionPublishedAt: status.latestVersionPublishedAt,
|
|
152
|
+
isUpdateAvailable: status.isUpdateAvailable,
|
|
153
|
+
isMajorUpgrade: status.isMajorUpgrade,
|
|
154
|
+
recommendedVersion: status.recommendedVersion,
|
|
155
|
+
advisories: status.advisories.map((advisory) => {
|
|
156
|
+
return {
|
|
157
|
+
ghsaId: advisory.ghsaId,
|
|
158
|
+
cveId: advisory.cveId,
|
|
159
|
+
summary: advisory.summary,
|
|
160
|
+
severity: advisory.severity,
|
|
161
|
+
url: advisory.url,
|
|
162
|
+
publishedAt: advisory.publishedAt,
|
|
163
|
+
affectedVersions: advisory.affectedVersions,
|
|
164
|
+
fixedIn: advisory.fixedIn,
|
|
165
|
+
};
|
|
166
|
+
}),
|
|
167
|
+
latestVersionCheckedAt: status.latestVersionCheckedAt,
|
|
168
|
+
advisoriesCheckedAt: status.advisoriesCheckedAt,
|
|
169
|
+
lastCheckAttemptedAt: status.lastCheckAttemptedAt,
|
|
170
|
+
lastCheckFailure: status.lastCheckFailure,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
static parseAffectingAdvisory(value) {
|
|
174
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
const json = value;
|
|
178
|
+
if (!SecurityAdvisory_1.default.isGhsaId(json["ghsaId"])) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
const ghsaId = SecurityAdvisory_1.default.normalizeGhsaId(json["ghsaId"]);
|
|
182
|
+
return {
|
|
183
|
+
ghsaId: ghsaId,
|
|
184
|
+
cveId: SecurityAdvisory_1.default.parseCveId(json["cveId"]),
|
|
185
|
+
summary: SecurityAdvisory_1.default.parseText(json["summary"], SecurityAdvisory_1.MAX_SUMMARY_LENGTH) ||
|
|
186
|
+
ghsaId,
|
|
187
|
+
severity: SecurityAdvisory_1.default.parseSeverity(json["severity"]),
|
|
188
|
+
url: SecurityAdvisory_1.default.parseUrl(json["url"]),
|
|
189
|
+
publishedAt: SecurityAdvisory_1.default.parseDate(json["publishedAt"]),
|
|
190
|
+
affectedVersions: SecurityAdvisory_1.default.parseVersionText(json["affectedVersions"]),
|
|
191
|
+
fixedIn: VersionUtil_1.default.canonicalize(json["fixedIn"]),
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.default = UpdateStatusUtil;
|
|
@@ -25,6 +25,7 @@ export interface WorkspaceTextAreaBlock extends WorkspaceMessageBlock {
|
|
|
25
25
|
initialValue?: string | undefined;
|
|
26
26
|
description?: string | undefined;
|
|
27
27
|
optional?: boolean | undefined;
|
|
28
|
+
maxLength?: number | undefined;
|
|
28
29
|
}
|
|
29
30
|
export interface WorkspaceTextBoxBlock extends WorkspaceMessageBlock {
|
|
30
31
|
_type: "WorkspaceTextBoxBlock";
|
|
@@ -25,6 +25,7 @@ export interface WorkspaceTextAreaBlock extends WorkspaceMessageBlock {
|
|
|
25
25
|
initialValue?: string | undefined;
|
|
26
26
|
description?: string | undefined;
|
|
27
27
|
optional?: boolean | undefined;
|
|
28
|
+
maxLength?: number | undefined;
|
|
28
29
|
}
|
|
29
30
|
export interface WorkspaceTextBoxBlock extends WorkspaceMessageBlock {
|
|
30
31
|
_type: "WorkspaceTextBoxBlock";
|
|
@@ -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;
|