@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,724 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STRING_INSERT_FIELDS = exports.MAX_WINDOWS_FIELD_VALUE_LENGTH = exports.MAX_WINDOWS_EVENT_FIELDS = void 0;
|
|
4
|
+
exports.readOtlpAnyValue = readOtlpAnyValue;
|
|
5
|
+
exports.decodeXmlText = decodeXmlText;
|
|
6
|
+
exports.readWindowsEventRecord = readWindowsEventRecord;
|
|
7
|
+
const NormalizerHelpers_1 = require("../NormalizerHelpers");
|
|
8
|
+
const SecurityLogLine_1 = require("./SecurityLogLine");
|
|
9
|
+
// The most fields one event keeps.
|
|
10
|
+
exports.MAX_WINDOWS_EVENT_FIELDS = 200;
|
|
11
|
+
// The longest value of one field an event keeps.
|
|
12
|
+
exports.MAX_WINDOWS_FIELD_VALUE_LENGTH = 4096;
|
|
13
|
+
// How deep an OTLP value or a JSON shipper's object is followed.
|
|
14
|
+
const MAX_DEPTH = 8;
|
|
15
|
+
/*
|
|
16
|
+
* The fields Fluent Bit's winevtlog input sends by position only
|
|
17
|
+
* (StringInserts), named in the order Windows writes them, for the events
|
|
18
|
+
* that matter most and change least: a sign-in, a failed one, a process.
|
|
19
|
+
* Later versions of an event add fields at the end, never before.
|
|
20
|
+
*/
|
|
21
|
+
exports.STRING_INSERT_FIELDS = {
|
|
22
|
+
"microsoft-windows-security-auditing:4624": [
|
|
23
|
+
"SubjectUserSid",
|
|
24
|
+
"SubjectUserName",
|
|
25
|
+
"SubjectDomainName",
|
|
26
|
+
"SubjectLogonId",
|
|
27
|
+
"TargetUserSid",
|
|
28
|
+
"TargetUserName",
|
|
29
|
+
"TargetDomainName",
|
|
30
|
+
"TargetLogonId",
|
|
31
|
+
"LogonType",
|
|
32
|
+
"LogonProcessName",
|
|
33
|
+
"AuthenticationPackageName",
|
|
34
|
+
"WorkstationName",
|
|
35
|
+
"LogonGuid",
|
|
36
|
+
"TransmittedServices",
|
|
37
|
+
"LmPackageName",
|
|
38
|
+
"KeyLength",
|
|
39
|
+
"ProcessId",
|
|
40
|
+
"ProcessName",
|
|
41
|
+
"IpAddress",
|
|
42
|
+
"IpPort",
|
|
43
|
+
"ImpersonationLevel",
|
|
44
|
+
"RestrictedAdminMode",
|
|
45
|
+
"TargetOutboundUserName",
|
|
46
|
+
"TargetOutboundDomainName",
|
|
47
|
+
"VirtualAccount",
|
|
48
|
+
"TargetLinkedLogonId",
|
|
49
|
+
"ElevatedToken",
|
|
50
|
+
],
|
|
51
|
+
"microsoft-windows-security-auditing:4625": [
|
|
52
|
+
"SubjectUserSid",
|
|
53
|
+
"SubjectUserName",
|
|
54
|
+
"SubjectDomainName",
|
|
55
|
+
"SubjectLogonId",
|
|
56
|
+
"TargetUserSid",
|
|
57
|
+
"TargetUserName",
|
|
58
|
+
"TargetDomainName",
|
|
59
|
+
"Status",
|
|
60
|
+
"FailureReason",
|
|
61
|
+
"SubStatus",
|
|
62
|
+
"LogonType",
|
|
63
|
+
"LogonProcessName",
|
|
64
|
+
"AuthenticationPackageName",
|
|
65
|
+
"WorkstationName",
|
|
66
|
+
"TransmittedServices",
|
|
67
|
+
"LmPackageName",
|
|
68
|
+
"KeyLength",
|
|
69
|
+
"ProcessId",
|
|
70
|
+
"ProcessName",
|
|
71
|
+
"IpAddress",
|
|
72
|
+
"IpPort",
|
|
73
|
+
],
|
|
74
|
+
"microsoft-windows-security-auditing:4688": [
|
|
75
|
+
"SubjectUserSid",
|
|
76
|
+
"SubjectUserName",
|
|
77
|
+
"SubjectDomainName",
|
|
78
|
+
"SubjectLogonId",
|
|
79
|
+
"NewProcessId",
|
|
80
|
+
"NewProcessName",
|
|
81
|
+
"TokenElevationType",
|
|
82
|
+
"ProcessId",
|
|
83
|
+
"CommandLine",
|
|
84
|
+
"TargetUserSid",
|
|
85
|
+
"TargetUserName",
|
|
86
|
+
"TargetDomainName",
|
|
87
|
+
"TargetLogonId",
|
|
88
|
+
"ParentProcessName",
|
|
89
|
+
"MandatoryLabel",
|
|
90
|
+
],
|
|
91
|
+
};
|
|
92
|
+
function cap(value) {
|
|
93
|
+
return value.length > exports.MAX_WINDOWS_FIELD_VALUE_LENGTH
|
|
94
|
+
? value.slice(0, exports.MAX_WINDOWS_FIELD_VALUE_LENGTH)
|
|
95
|
+
: value;
|
|
96
|
+
}
|
|
97
|
+
function asObject(value) {
|
|
98
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
99
|
+
? value
|
|
100
|
+
: null;
|
|
101
|
+
}
|
|
102
|
+
// A scalar as text; "" for anything else.
|
|
103
|
+
function scalarText(value) {
|
|
104
|
+
if (typeof value === "string") {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
108
|
+
return String(value);
|
|
109
|
+
}
|
|
110
|
+
if (typeof value === "boolean") {
|
|
111
|
+
return value ? "true" : "false";
|
|
112
|
+
}
|
|
113
|
+
return "";
|
|
114
|
+
}
|
|
115
|
+
function firstText(object, keys) {
|
|
116
|
+
for (const key of keys) {
|
|
117
|
+
const text = scalarText(object[key]).trim();
|
|
118
|
+
if (text) {
|
|
119
|
+
return text;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return "";
|
|
123
|
+
}
|
|
124
|
+
// A whole number 1 to 65535 (an event id), else 0.
|
|
125
|
+
function readEventId(value) {
|
|
126
|
+
const text = scalarText(value).trim();
|
|
127
|
+
if (!text || text.length > 5) {
|
|
128
|
+
return 0;
|
|
129
|
+
}
|
|
130
|
+
for (let index = 0; index < text.length; index++) {
|
|
131
|
+
const code = text.charCodeAt(index);
|
|
132
|
+
if (code < 48 || code > 57) {
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const id = Number(text);
|
|
137
|
+
return id >= 1 && id <= 65535 ? id : 0;
|
|
138
|
+
}
|
|
139
|
+
/*
|
|
140
|
+
* An OTLP value as the plain value it carries: {"stringValue":"x"} is "x",
|
|
141
|
+
* a kvlistValue an object, an arrayValue a list. Followed MAX_DEPTH deep.
|
|
142
|
+
*/
|
|
143
|
+
function readOtlpAnyValue(value, depth = 0) {
|
|
144
|
+
const wrapper = asObject(value);
|
|
145
|
+
if (!wrapper || depth > MAX_DEPTH) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
for (const key of ["stringValue", "string_value"]) {
|
|
149
|
+
if (wrapper[key] !== undefined) {
|
|
150
|
+
return scalarText(wrapper[key]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
for (const key of [
|
|
154
|
+
"intValue",
|
|
155
|
+
"int_value",
|
|
156
|
+
"doubleValue",
|
|
157
|
+
"double_value",
|
|
158
|
+
"boolValue",
|
|
159
|
+
"bool_value",
|
|
160
|
+
]) {
|
|
161
|
+
if (wrapper[key] !== undefined) {
|
|
162
|
+
return scalarText(wrapper[key]);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const kvlist = asObject(wrapper["kvlistValue"]) || asObject(wrapper["kvlist_value"]);
|
|
166
|
+
if (kvlist) {
|
|
167
|
+
const result = {};
|
|
168
|
+
const values = kvlist["values"];
|
|
169
|
+
if (Array.isArray(values)) {
|
|
170
|
+
for (const entry of values.slice(0, exports.MAX_WINDOWS_EVENT_FIELDS * 2)) {
|
|
171
|
+
const pair = asObject(entry);
|
|
172
|
+
const key = pair ? scalarText(pair["key"]) : "";
|
|
173
|
+
if (!pair || key === "__proto__") {
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
result[key] = readOtlpAnyValue(pair["value"], depth + 1);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
const array = asObject(wrapper["arrayValue"]) || asObject(wrapper["array_value"]);
|
|
182
|
+
if (array) {
|
|
183
|
+
const values = array["values"];
|
|
184
|
+
return Array.isArray(values)
|
|
185
|
+
? values.slice(0, exports.MAX_WINDOWS_EVENT_FIELDS).map((item) => {
|
|
186
|
+
return readOtlpAnyValue(item, depth + 1);
|
|
187
|
+
})
|
|
188
|
+
: [];
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
function addField(data, name, value) {
|
|
193
|
+
const key = name.trim();
|
|
194
|
+
if (!key ||
|
|
195
|
+
key === "__proto__" ||
|
|
196
|
+
Object.keys(data).length >= exports.MAX_WINDOWS_EVENT_FIELDS ||
|
|
197
|
+
Object.prototype.hasOwnProperty.call(data, key)) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const text = scalarText(value);
|
|
201
|
+
data[key] = cap(text);
|
|
202
|
+
}
|
|
203
|
+
/*
|
|
204
|
+
* The collector's event_data: a flat map of named fields (param1, param2...
|
|
205
|
+
* for unnamed ones), or - before v0.15x - a "data" list of one-field maps.
|
|
206
|
+
*/
|
|
207
|
+
function readCollectorEventData(eventData, data) {
|
|
208
|
+
const object = asObject(eventData);
|
|
209
|
+
if (!object) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const list = object["data"];
|
|
213
|
+
if (Array.isArray(list)) {
|
|
214
|
+
let anonymous = 1;
|
|
215
|
+
for (const item of list.slice(0, exports.MAX_WINDOWS_EVENT_FIELDS)) {
|
|
216
|
+
const field = asObject(item);
|
|
217
|
+
if (field) {
|
|
218
|
+
for (const name of Object.keys(field)) {
|
|
219
|
+
if (name) {
|
|
220
|
+
addField(data, name, field[name]);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
addField(data, `param${anonymous}`, field[name]);
|
|
224
|
+
anonymous++;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
addField(data, `param${anonymous}`, item);
|
|
230
|
+
anonymous++;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
for (const name of Object.keys(object)) {
|
|
235
|
+
if (name === "data" || name === "binary" || name === "name") {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
addField(data, name, object[name]);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// UserData's fields, as the collector maps them ({ name, data: {...} }).
|
|
242
|
+
function readCollectorUserData(userData, data) {
|
|
243
|
+
var _a;
|
|
244
|
+
const fields = asObject((_a = asObject(userData)) === null || _a === void 0 ? void 0 : _a["data"]);
|
|
245
|
+
if (!fields) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
for (const name of Object.keys(fields)) {
|
|
249
|
+
addField(data, name, fields[name]);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function keywordsText(value) {
|
|
253
|
+
if (Array.isArray(value)) {
|
|
254
|
+
return value
|
|
255
|
+
.map((item) => {
|
|
256
|
+
return scalarText(item);
|
|
257
|
+
})
|
|
258
|
+
.filter((item) => {
|
|
259
|
+
return item.length > 0;
|
|
260
|
+
})
|
|
261
|
+
.join(", ");
|
|
262
|
+
}
|
|
263
|
+
return scalarText(value);
|
|
264
|
+
}
|
|
265
|
+
// The collector's map: { event_id: { id }, provider: { name }, ... }.
|
|
266
|
+
function fromCollectorMap(body) {
|
|
267
|
+
var _a, _b, _c, _d;
|
|
268
|
+
const eventIdValue = body["event_id"];
|
|
269
|
+
const eventId = readEventId((_b = (_a = asObject(eventIdValue)) === null || _a === void 0 ? void 0 : _a["id"]) !== null && _b !== void 0 ? _b : eventIdValue);
|
|
270
|
+
const providerValue = body["provider"];
|
|
271
|
+
const provider = scalarText((_c = asObject(providerValue)) === null || _c === void 0 ? void 0 : _c["name"]).trim() ||
|
|
272
|
+
scalarText(providerValue).trim();
|
|
273
|
+
if (!eventId || !provider) {
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
const data = {};
|
|
277
|
+
readCollectorEventData(body["event_data"], data);
|
|
278
|
+
readCollectorUserData(body["user_data"], data);
|
|
279
|
+
return {
|
|
280
|
+
eventId,
|
|
281
|
+
provider,
|
|
282
|
+
channel: scalarText(body["channel"]).trim(),
|
|
283
|
+
computer: scalarText(body["computer"]).trim(),
|
|
284
|
+
time: (0, NormalizerHelpers_1.parseEventTime)(scalarText(body["system_time"]) || null),
|
|
285
|
+
recordId: scalarText(body["record_id"]).trim(),
|
|
286
|
+
level: scalarText(body["level"]).trim(),
|
|
287
|
+
keywords: keywordsText(body["keywords"]),
|
|
288
|
+
message: scalarText(body["message"]),
|
|
289
|
+
userSid: scalarText((_d = asObject(body["security"])) === null || _d === void 0 ? void 0 : _d["user_id"]).trim(),
|
|
290
|
+
data,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
/*
|
|
294
|
+
* The top-level keys NXLog, Fluent Bit and other JSON shippers use for the
|
|
295
|
+
* event itself - never one of its fields - spelled exactly as they write
|
|
296
|
+
* them: NXLog's own ProcessID sits beside an event's ProcessId field.
|
|
297
|
+
*/
|
|
298
|
+
const SHIPPER_SYSTEM_KEYS = new Set([
|
|
299
|
+
// NXLog (im_msvistalog).
|
|
300
|
+
"EventTime",
|
|
301
|
+
"EventReceivedTime",
|
|
302
|
+
"Hostname",
|
|
303
|
+
"Keywords",
|
|
304
|
+
"EventType",
|
|
305
|
+
"SeverityValue",
|
|
306
|
+
"Severity",
|
|
307
|
+
"EventID",
|
|
308
|
+
"SourceName",
|
|
309
|
+
"ProviderGuid",
|
|
310
|
+
"Version",
|
|
311
|
+
"Task",
|
|
312
|
+
"OpcodeValue",
|
|
313
|
+
"Opcode",
|
|
314
|
+
"RecordNumber",
|
|
315
|
+
"ProcessID",
|
|
316
|
+
"ThreadID",
|
|
317
|
+
"Channel",
|
|
318
|
+
"Message",
|
|
319
|
+
"Category",
|
|
320
|
+
"AccountName",
|
|
321
|
+
"AccountType",
|
|
322
|
+
"Domain",
|
|
323
|
+
"UserID",
|
|
324
|
+
"SourceModuleName",
|
|
325
|
+
"SourceModuleType",
|
|
326
|
+
// Fluent Bit (winevtlog).
|
|
327
|
+
"ProviderName",
|
|
328
|
+
"Qualifiers",
|
|
329
|
+
"Level",
|
|
330
|
+
"TimeCreated",
|
|
331
|
+
"EventRecordID",
|
|
332
|
+
"ActivityID",
|
|
333
|
+
"RelatedActivityID",
|
|
334
|
+
"Computer",
|
|
335
|
+
"StringInserts",
|
|
336
|
+
// Other shippers.
|
|
337
|
+
"@timestamp",
|
|
338
|
+
"@metadata",
|
|
339
|
+
"timestamp",
|
|
340
|
+
"host",
|
|
341
|
+
"EventId",
|
|
342
|
+
"eventId",
|
|
343
|
+
"Provider",
|
|
344
|
+
"Provider_Name",
|
|
345
|
+
"providerName",
|
|
346
|
+
"ComputerName",
|
|
347
|
+
"LevelText",
|
|
348
|
+
"UserSID",
|
|
349
|
+
"EventData",
|
|
350
|
+
"UserData",
|
|
351
|
+
"event_data",
|
|
352
|
+
"user_data",
|
|
353
|
+
]);
|
|
354
|
+
// NXLog, Fluent Bit and other JSON with an EventID and a provider.
|
|
355
|
+
function fromShipperJson(body) {
|
|
356
|
+
var _a, _b, _c;
|
|
357
|
+
const eventId = readEventId((_b = (_a = body["EventID"]) !== null && _a !== void 0 ? _a : body["EventId"]) !== null && _b !== void 0 ? _b : body["eventId"]);
|
|
358
|
+
const provider = firstText(body, [
|
|
359
|
+
"ProviderName",
|
|
360
|
+
"SourceName",
|
|
361
|
+
"Provider_Name",
|
|
362
|
+
"providerName",
|
|
363
|
+
]) ||
|
|
364
|
+
scalarText((_c = asObject(body["Provider"])) === null || _c === void 0 ? void 0 : _c["Name"]).trim() ||
|
|
365
|
+
scalarText(body["Provider"]).trim();
|
|
366
|
+
if (!eventId || !provider) {
|
|
367
|
+
return null;
|
|
368
|
+
}
|
|
369
|
+
const data = {};
|
|
370
|
+
const eventData = asObject(body["EventData"]) || asObject(body["event_data"]);
|
|
371
|
+
const userData = asObject(body["UserData"]) || asObject(body["user_data"]);
|
|
372
|
+
if (eventData) {
|
|
373
|
+
readCollectorEventData(eventData, data);
|
|
374
|
+
}
|
|
375
|
+
if (userData) {
|
|
376
|
+
for (const name of Object.keys(userData)) {
|
|
377
|
+
const inner = asObject(userData[name]);
|
|
378
|
+
if (inner) {
|
|
379
|
+
for (const field of Object.keys(inner)) {
|
|
380
|
+
addField(data, field, inner[field]);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
addField(data, name, userData[name]);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
// Fluent Bit names the fields by position only.
|
|
389
|
+
const inserts = body["StringInserts"];
|
|
390
|
+
if (Array.isArray(inserts)) {
|
|
391
|
+
const names = exports.STRING_INSERT_FIELDS[`${provider.toLowerCase()}:${eventId}`] || [];
|
|
392
|
+
inserts
|
|
393
|
+
.slice(0, exports.MAX_WINDOWS_EVENT_FIELDS)
|
|
394
|
+
.forEach((value, index) => {
|
|
395
|
+
addField(data, names[index] || `param${index + 1}`, value);
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
// NXLog writes the event's fields at the top, beside its own keys.
|
|
399
|
+
for (const key of Object.keys(body)) {
|
|
400
|
+
if (SHIPPER_SYSTEM_KEYS.has(key)) {
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
const value = body[key];
|
|
404
|
+
if (value === null || typeof value === "object") {
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
addField(data, key, value);
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
eventId,
|
|
411
|
+
provider,
|
|
412
|
+
channel: firstText(body, ["Channel", "channel"]),
|
|
413
|
+
computer: firstText(body, ["Computer", "Hostname", "ComputerName"]),
|
|
414
|
+
time: (0, NormalizerHelpers_1.parseEventTime)(firstText(body, [
|
|
415
|
+
"TimeCreated",
|
|
416
|
+
"EventTime",
|
|
417
|
+
"@timestamp",
|
|
418
|
+
"timestamp",
|
|
419
|
+
]) || null),
|
|
420
|
+
recordId: firstText(body, ["EventRecordID", "RecordNumber"]),
|
|
421
|
+
level: firstText(body, ["Level", "Severity", "LevelText"]),
|
|
422
|
+
keywords: keywordsText(body["Keywords"]),
|
|
423
|
+
message: scalarText(body["Message"]),
|
|
424
|
+
userSid: firstText(body, ["UserID", "UserSID"]),
|
|
425
|
+
data,
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
// Winlogbeat: the event under "winlog", in Elastic Common Schema.
|
|
429
|
+
function fromWinlogbeat(body) {
|
|
430
|
+
var _a, _b;
|
|
431
|
+
const winlog = asObject(body["winlog"]);
|
|
432
|
+
if (!winlog) {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
const eventId = readEventId(winlog["event_id"]);
|
|
436
|
+
const provider = scalarText(winlog["provider_name"]).trim();
|
|
437
|
+
if (!eventId || !provider) {
|
|
438
|
+
return null;
|
|
439
|
+
}
|
|
440
|
+
const data = {};
|
|
441
|
+
const eventData = asObject(winlog["event_data"]);
|
|
442
|
+
const userData = asObject(winlog["user_data"]);
|
|
443
|
+
for (const fields of [eventData, userData]) {
|
|
444
|
+
if (!fields) {
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
for (const name of Object.keys(fields)) {
|
|
448
|
+
addField(data, name, fields[name]);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
return {
|
|
452
|
+
eventId,
|
|
453
|
+
provider,
|
|
454
|
+
channel: scalarText(winlog["channel"]).trim(),
|
|
455
|
+
computer: scalarText(winlog["computer_name"]).trim(),
|
|
456
|
+
time: (0, NormalizerHelpers_1.parseEventTime)(scalarText(body["@timestamp"]) || null),
|
|
457
|
+
recordId: scalarText(winlog["record_id"]).trim(),
|
|
458
|
+
level: scalarText((_a = asObject(body["log"])) === null || _a === void 0 ? void 0 : _a["level"]).trim(),
|
|
459
|
+
keywords: keywordsText(winlog["keywords"]),
|
|
460
|
+
message: scalarText(body["message"]),
|
|
461
|
+
userSid: scalarText((_b = asObject(winlog["user"])) === null || _b === void 0 ? void 0 : _b["identifier"]).trim(),
|
|
462
|
+
data,
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
const XML_ENTITIES = {
|
|
466
|
+
"&": "&",
|
|
467
|
+
"<": "<",
|
|
468
|
+
">": ">",
|
|
469
|
+
""": '"',
|
|
470
|
+
"'": "'",
|
|
471
|
+
};
|
|
472
|
+
// XML text as it was meant: the five named entities and numeric ones.
|
|
473
|
+
function decodeXmlText(text) {
|
|
474
|
+
if (text.indexOf("&") === -1) {
|
|
475
|
+
return text;
|
|
476
|
+
}
|
|
477
|
+
let output = "";
|
|
478
|
+
let index = 0;
|
|
479
|
+
while (index < text.length) {
|
|
480
|
+
const amp = text.indexOf("&", index);
|
|
481
|
+
if (amp === -1) {
|
|
482
|
+
output += text.slice(index);
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
output += text.slice(index, amp);
|
|
486
|
+
const semicolon = text.indexOf(";", amp);
|
|
487
|
+
if (semicolon === -1 || semicolon - amp > 10) {
|
|
488
|
+
output += "&";
|
|
489
|
+
index = amp + 1;
|
|
490
|
+
continue;
|
|
491
|
+
}
|
|
492
|
+
const entity = text.slice(amp, semicolon + 1);
|
|
493
|
+
const named = XML_ENTITIES[entity];
|
|
494
|
+
if (named !== undefined) {
|
|
495
|
+
output += named;
|
|
496
|
+
}
|
|
497
|
+
else if (entity.startsWith("&#")) {
|
|
498
|
+
const isHex = entity.charAt(2) === "x" || entity.charAt(2) === "X";
|
|
499
|
+
const code = parseInt(entity.slice(isHex ? 3 : 2, -1), isHex ? 16 : 10);
|
|
500
|
+
output +=
|
|
501
|
+
Number.isFinite(code) && code > 0 && code <= 0x10ffff
|
|
502
|
+
? String.fromCodePoint(code)
|
|
503
|
+
: entity;
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
output += entity;
|
|
507
|
+
}
|
|
508
|
+
index = semicolon + 1;
|
|
509
|
+
}
|
|
510
|
+
return output;
|
|
511
|
+
}
|
|
512
|
+
// The text between <tag ...> and </tag>, from `from`; null when absent.
|
|
513
|
+
function xmlElementText(xml, tag, from, until) {
|
|
514
|
+
const open = xml.indexOf(`<${tag}`, from);
|
|
515
|
+
if (open === -1 || open >= until) {
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
const afterName = xml.charAt(open + tag.length + 1);
|
|
519
|
+
if (afterName !== ">" && afterName !== " " && afterName !== "/") {
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
const close = xml.indexOf(">", open);
|
|
523
|
+
if (close === -1 || close >= until) {
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
if (xml.charAt(close - 1) === "/") {
|
|
527
|
+
return "";
|
|
528
|
+
}
|
|
529
|
+
const end = xml.indexOf(`</${tag}>`, close);
|
|
530
|
+
if (end === -1 || end > until) {
|
|
531
|
+
return null;
|
|
532
|
+
}
|
|
533
|
+
return decodeXmlText(xml.slice(close + 1, end));
|
|
534
|
+
}
|
|
535
|
+
// An attribute's value inside one tag's text: Name='x' or Name="x".
|
|
536
|
+
function xmlAttribute(tagText, name) {
|
|
537
|
+
for (const quote of ["'", '"']) {
|
|
538
|
+
const marker = `${name}=${quote}`;
|
|
539
|
+
const at = tagText.indexOf(marker);
|
|
540
|
+
if (at === -1) {
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
const before = at === 0 ? " " : tagText.charAt(at - 1);
|
|
544
|
+
if (before !== " " && before !== "\t" && before !== "\n") {
|
|
545
|
+
continue;
|
|
546
|
+
}
|
|
547
|
+
const start = at + marker.length;
|
|
548
|
+
const end = tagText.indexOf(quote, start);
|
|
549
|
+
return end === -1 ? "" : decodeXmlText(tagText.slice(start, end));
|
|
550
|
+
}
|
|
551
|
+
return "";
|
|
552
|
+
}
|
|
553
|
+
// The text of the opening tag <tag ...>, from `from`; "" when absent.
|
|
554
|
+
function xmlOpeningTag(xml, tag, from, until) {
|
|
555
|
+
const open = xml.indexOf(`<${tag}`, from);
|
|
556
|
+
if (open === -1 || open >= until) {
|
|
557
|
+
return "";
|
|
558
|
+
}
|
|
559
|
+
const close = xml.indexOf(">", open);
|
|
560
|
+
return close === -1 || close > until ? "" : xml.slice(open, close + 1);
|
|
561
|
+
}
|
|
562
|
+
/*
|
|
563
|
+
* The fields of <EventData>: each <Data Name='X'>value</Data>, in one
|
|
564
|
+
* forward pass; an unnamed <Data> is param1, param2... in order.
|
|
565
|
+
*/
|
|
566
|
+
function readXmlEventData(xml, start, end, data) {
|
|
567
|
+
let index = start;
|
|
568
|
+
let anonymous = 1;
|
|
569
|
+
while (index < end && Object.keys(data).length < exports.MAX_WINDOWS_EVENT_FIELDS) {
|
|
570
|
+
const open = xml.indexOf("<Data", index);
|
|
571
|
+
if (open === -1 || open >= end) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
const tagEnd = xml.indexOf(">", open);
|
|
575
|
+
if (tagEnd === -1 || tagEnd >= end) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
const tagText = xml.slice(open, tagEnd + 1);
|
|
579
|
+
const name = xmlAttribute(tagText, "Name");
|
|
580
|
+
let value = "";
|
|
581
|
+
let next = tagEnd + 1;
|
|
582
|
+
if (xml.charAt(tagEnd - 1) !== "/") {
|
|
583
|
+
const close = xml.indexOf("</Data>", tagEnd);
|
|
584
|
+
if (close === -1 || close > end) {
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
value = decodeXmlText(xml.slice(tagEnd + 1, close));
|
|
588
|
+
next = close + "</Data>".length;
|
|
589
|
+
}
|
|
590
|
+
if (name) {
|
|
591
|
+
addField(data, name, value);
|
|
592
|
+
}
|
|
593
|
+
else {
|
|
594
|
+
addField(data, `param${anonymous}`, value);
|
|
595
|
+
anonymous++;
|
|
596
|
+
}
|
|
597
|
+
index = next;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
/*
|
|
601
|
+
* The fields of <UserData>: the children of its one element, each
|
|
602
|
+
* <Name>value</Name> (the audit log cleared names its account this way).
|
|
603
|
+
*/
|
|
604
|
+
function readXmlUserData(xml, start, end, data) {
|
|
605
|
+
// Past the wrapper element's own opening tag.
|
|
606
|
+
const wrapperOpen = xml.indexOf("<", start);
|
|
607
|
+
if (wrapperOpen === -1 || wrapperOpen >= end) {
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
let index = xml.indexOf(">", wrapperOpen) + 1;
|
|
611
|
+
while (index > 0 &&
|
|
612
|
+
index < end &&
|
|
613
|
+
Object.keys(data).length < exports.MAX_WINDOWS_EVENT_FIELDS) {
|
|
614
|
+
const open = xml.indexOf("<", index);
|
|
615
|
+
if (open === -1 || open >= end || xml.charAt(open + 1) === "/") {
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
const tagEnd = xml.indexOf(">", open);
|
|
619
|
+
if (tagEnd === -1 || tagEnd >= end) {
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
let nameEnd = open + 1;
|
|
623
|
+
while (nameEnd < tagEnd &&
|
|
624
|
+
xml.charAt(nameEnd) !== " " &&
|
|
625
|
+
xml.charAt(nameEnd) !== "/") {
|
|
626
|
+
nameEnd++;
|
|
627
|
+
}
|
|
628
|
+
const name = xml.slice(open + 1, nameEnd);
|
|
629
|
+
if (xml.charAt(tagEnd - 1) === "/") {
|
|
630
|
+
addField(data, name, "");
|
|
631
|
+
index = tagEnd + 1;
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
const close = xml.indexOf(`</${name}>`, tagEnd);
|
|
635
|
+
if (close === -1 || close > end) {
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
addField(data, name, decodeXmlText(xml.slice(tagEnd + 1, close)));
|
|
639
|
+
index = close + name.length + 3;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
// The event's own XML: <Event><System>...</System><EventData>...</EventData></Event>.
|
|
643
|
+
function fromXml(xml) {
|
|
644
|
+
const systemStart = xml.indexOf("<System");
|
|
645
|
+
const systemEnd = xml.indexOf("</System>");
|
|
646
|
+
if (systemStart === -1 || systemEnd === -1 || systemEnd < systemStart) {
|
|
647
|
+
return null;
|
|
648
|
+
}
|
|
649
|
+
const providerTag = xmlOpeningTag(xml, "Provider", systemStart, systemEnd);
|
|
650
|
+
const provider = xmlAttribute(providerTag, "Name");
|
|
651
|
+
const eventId = readEventId((xmlElementText(xml, "EventID", systemStart, systemEnd) || "").trim());
|
|
652
|
+
if (!eventId || !provider) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
const timeTag = xmlOpeningTag(xml, "TimeCreated", systemStart, systemEnd);
|
|
656
|
+
const securityTag = xmlOpeningTag(xml, "Security", systemStart, systemEnd);
|
|
657
|
+
const data = {};
|
|
658
|
+
const eventDataStart = xml.indexOf("<EventData", systemEnd);
|
|
659
|
+
const eventDataEnd = xml.indexOf("</EventData>", systemEnd);
|
|
660
|
+
if (eventDataStart !== -1 && eventDataEnd > eventDataStart) {
|
|
661
|
+
readXmlEventData(xml, eventDataStart, eventDataEnd, data);
|
|
662
|
+
}
|
|
663
|
+
const userDataStart = xml.indexOf("<UserData>", systemEnd);
|
|
664
|
+
const userDataEnd = xml.indexOf("</UserData>", systemEnd);
|
|
665
|
+
if (userDataStart !== -1 && userDataEnd > userDataStart) {
|
|
666
|
+
readXmlUserData(xml, userDataStart + "<UserData>".length, userDataEnd, data);
|
|
667
|
+
}
|
|
668
|
+
const renderingStart = xml.indexOf("<RenderingInfo", systemEnd);
|
|
669
|
+
const message = renderingStart === -1
|
|
670
|
+
? ""
|
|
671
|
+
: xmlElementText(xml, "Message", renderingStart, xml.length) || "";
|
|
672
|
+
return {
|
|
673
|
+
eventId,
|
|
674
|
+
provider,
|
|
675
|
+
channel: (xmlElementText(xml, "Channel", systemStart, systemEnd) || "").trim(),
|
|
676
|
+
computer: (xmlElementText(xml, "Computer", systemStart, systemEnd) || "").trim(),
|
|
677
|
+
time: (0, NormalizerHelpers_1.parseEventTime)(xmlAttribute(timeTag, "SystemTime") || null),
|
|
678
|
+
recordId: (xmlElementText(xml, "EventRecordID", systemStart, systemEnd) || "").trim(),
|
|
679
|
+
level: (xmlElementText(xml, "Level", systemStart, systemEnd) || "").trim(),
|
|
680
|
+
keywords: (xmlElementText(xml, "Keywords", systemStart, systemEnd) || "").trim(),
|
|
681
|
+
message,
|
|
682
|
+
userSid: xmlAttribute(securityTag, "UserID"),
|
|
683
|
+
data,
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
/*
|
|
687
|
+
* The Windows event a log line holds, or null for any other line. The
|
|
688
|
+
* line's attributes can name the record's computer when the body does not
|
|
689
|
+
* (the collector's host.name).
|
|
690
|
+
*/
|
|
691
|
+
function readWindowsEventRecord(body) {
|
|
692
|
+
const text = (body || "").trim();
|
|
693
|
+
if (!text || text.length > SecurityLogLine_1.MAX_JSON_LINE_LENGTH) {
|
|
694
|
+
return null;
|
|
695
|
+
}
|
|
696
|
+
if (text.startsWith("<Event")) {
|
|
697
|
+
return fromXml(text);
|
|
698
|
+
}
|
|
699
|
+
if (!text.startsWith("{")) {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
let parsed;
|
|
703
|
+
try {
|
|
704
|
+
parsed = JSON.parse(text);
|
|
705
|
+
}
|
|
706
|
+
catch (_a) {
|
|
707
|
+
return null;
|
|
708
|
+
}
|
|
709
|
+
const object = asObject(parsed);
|
|
710
|
+
if (!object) {
|
|
711
|
+
return null;
|
|
712
|
+
}
|
|
713
|
+
if (object["kvlistValue"] || object["kvlist_value"]) {
|
|
714
|
+
const map = asObject(readOtlpAnyValue(object));
|
|
715
|
+
return map ? fromCollectorMap(map) : null;
|
|
716
|
+
}
|
|
717
|
+
if (object["event_id"] !== undefined && object["provider"] !== undefined) {
|
|
718
|
+
return fromCollectorMap(object);
|
|
719
|
+
}
|
|
720
|
+
if (object["winlog"]) {
|
|
721
|
+
return fromWinlogbeat(object);
|
|
722
|
+
}
|
|
723
|
+
return fromShipperJson(object);
|
|
724
|
+
}
|