From a9b4f2bf09fa8482f1b7f8fdd8cb4c2ec6e8ae8b Mon Sep 17 00:00:00 2001 From: 0xC0FFEEEE <119874251+0xC0FFEEEE@users.noreply.github.com> Date: Thu, 23 Nov 2023 15:26:13 +0000 Subject: [PATCH] Remove test code --- contentctl/output/new_content_yml_output.py | 22 --------------------- 1 file changed, 22 deletions(-) diff --git a/contentctl/output/new_content_yml_output.py b/contentctl/output/new_content_yml_output.py index b70f1edf..d8bc8e9e 100644 --- a/contentctl/output/new_content_yml_output.py +++ b/contentctl/output/new_content_yml_output.py @@ -14,28 +14,6 @@ def __init__(self, output_path:str): def writeObjectNewContent(self, object: dict, type: SecurityContentType) -> None: if type == SecurityContentType.detections: file_path = os.path.join(self.output_path, 'detections', self.convertNameToFileName(object['name'], object['tags']['product'])) - test_obj = {} - test_obj['name'] = object['name'] + ' Unit Test' - test_obj['tests'] = [ - { - 'name': object['name'], - 'file': self.convertNameToFileName(object['name'],object['tags']['product']), - 'pass_condition': '| stats count | where count > 0', - 'earliest_time': '-24h', - 'latest_time': 'now', - 'attack_data': [ - { - 'file_name': 'UPDATE', - 'data': 'UPDATE', - 'source': 'UPDATE', - 'sourcetype': 'UPDATE', - 'update_timestamp': True - } - ] - } - ] - file_path_test = os.path.join(self.output_path, 'tests', self.convertNameToTestFileName(object['name'], object['tags']['product'])) - YmlWriter.writeYmlFile(file_path_test, test_obj) #object.pop('source') YmlWriter.writeYmlFile(file_path, object) print("Successfully created detection " + file_path)