mirror of
				https://github.com/wazuh/wazuh-docker.git
				synced 2025-11-04 05:53:19 +00:00 
			
		
		
		
	add workaround for vulnerability detector data published field (#282)
Former-commit-id: e3883725b9
			
			
This commit is contained in:
		
				
					committed by
					
						
						Jesús Linares
					
				
			
			
				
	
			
			
			
						parent
						
							503200ea70
						
					
				
				
					commit
					3431411eaf
				
			@@ -40,6 +40,22 @@ filter {
 | 
			
		||||
        remove_field => [ "beat", "input_type", "tags", "count", "@version", "log", "offset", "type", "@src_ip", "host"]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
filter {
 | 
			
		||||
    # Workarounds for vulnerability-detector
 | 
			
		||||
    if "vulnerability-detector" in [rule][groups] {
 | 
			
		||||
        # Drop vulnerability-detector events from Manager
 | 
			
		||||
        if [agent][id] == "000"{
 | 
			
		||||
            drop { }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        # if exists, remove data.vulnerability.published field due to conflicts
 | 
			
		||||
        if [data][vulnerability][published] {
 | 
			
		||||
            mutate {
 | 
			
		||||
                remove_field => [ "[data][vulnerability][published]" ]
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
output {
 | 
			
		||||
    elasticsearch {
 | 
			
		||||
        hosts => ["elasticsearch:9200"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user