From 9e924d4f2fad6c5a793442e45915959ae4a99904 Mon Sep 17 00:00:00 2001 From: Alex Ruiz Date: Fri, 15 Nov 2024 13:11:29 +0100 Subject: [PATCH] Add missing information of the agent --- ecs/states-fim/event-generator/event_generator.py | 3 +++ .../event-generator/event_generator.py | 4 ++++ .../event-generator/event_generator.py | 4 ++++ .../event-generator/event_generator.py | 4 ++++ .../event-generator/event_generator.py | 4 ++++ ecs/states-inventory-ports/event-generator/event_generator.py | 4 ++++ .../event-generator/event_generator.py | 4 ++++ .../event-generator/event_generator.py | 4 ++++ ecs/states-vulnerabilities/event-generator/event_generator.py | 4 ++++ 9 files changed, 35 insertions(+) diff --git a/ecs/states-fim/event-generator/event_generator.py b/ecs/states-fim/event-generator/event_generator.py index ecd2fb08ebace..9c733c286bd43 100644 --- a/ecs/states-fim/event-generator/event_generator.py +++ b/ecs/states-fim/event-generator/event_generator.py @@ -35,6 +35,9 @@ def generate_random_date(): def generate_random_agent(): agent = { 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-hardware/event-generator/event_generator.py b/ecs/states-inventory-hardware/event-generator/event_generator.py index 2a016f727b9a1..779272592da66 100644 --- a/ecs/states-inventory-hardware/event-generator/event_generator.py +++ b/ecs/states-inventory-hardware/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-hotfixes/event-generator/event_generator.py b/ecs/states-inventory-hotfixes/event-generator/event_generator.py index ea2695841eb3b..88cfdd0c76d82 100644 --- a/ecs/states-inventory-hotfixes/event-generator/event_generator.py +++ b/ecs/states-inventory-hotfixes/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-networks/event-generator/event_generator.py b/ecs/states-inventory-networks/event-generator/event_generator.py index 5021ac526d8a5..c9ec2c2fd363f 100644 --- a/ecs/states-inventory-networks/event-generator/event_generator.py +++ b/ecs/states-inventory-networks/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-packages/event-generator/event_generator.py b/ecs/states-inventory-packages/event-generator/event_generator.py index 5713449f96a35..fda9227d7c826 100644 --- a/ecs/states-inventory-packages/event-generator/event_generator.py +++ b/ecs/states-inventory-packages/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-ports/event-generator/event_generator.py b/ecs/states-inventory-ports/event-generator/event_generator.py index 02032da4465b5..bede09340b104 100644 --- a/ecs/states-inventory-ports/event-generator/event_generator.py +++ b/ecs/states-inventory-ports/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-processes/event-generator/event_generator.py b/ecs/states-inventory-processes/event-generator/event_generator.py index f29c83f8f92cc..3395616d104c9 100644 --- a/ecs/states-inventory-processes/event-generator/event_generator.py +++ b/ecs/states-inventory-processes/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-inventory-system/event-generator/event_generator.py b/ecs/states-inventory-system/event-generator/event_generator.py index 53aeb860a6577..0eeae886ec8f4 100644 --- a/ecs/states-inventory-system/event-generator/event_generator.py +++ b/ecs/states-inventory-system/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() } diff --git a/ecs/states-vulnerabilities/event-generator/event_generator.py b/ecs/states-vulnerabilities/event-generator/event_generator.py index e38460f96db6d..de80c8bf49e92 100644 --- a/ecs/states-vulnerabilities/event-generator/event_generator.py +++ b/ecs/states-vulnerabilities/event-generator/event_generator.py @@ -34,6 +34,10 @@ def generate_random_date(): def generate_random_agent(): agent = { + 'id': f'agent{random.randint(0, 99)}', + 'name': f'Agent{random.randint(0, 99)}', + 'type': random.choice(['filebeat', 'windows', 'linux', 'macos']), + 'version': f'v{random.randint(0, 9)}-stable', 'groups': [f'group{random.randint(0, 99)}', f'group{random.randint(0, 99)}'], 'host': generate_random_host() }