From a91762555ee1f0fe21cf65ac00ad9b037938a61e Mon Sep 17 00:00:00 2001 From: P4T12ICK Date: Wed, 14 Jul 2021 11:45:33 +0200 Subject: [PATCH 1/3] bug fix detection testing --- .../ci/detection_testing_batch/modules/testing_service.py | 7 ++++++- detections/endpoint/anomalous_usage_of_7zip.yml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py b/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py index 9b6fa4e552..cdb2502b3e 100644 --- a/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py +++ b/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py @@ -51,7 +51,12 @@ def test_detections(ssh_key_name, private_key, splunk_ip, splunk_password, test_ def test_detection(ssh_key_name, private_key, splunk_ip, splunk_password, test_file, test_index, uuid_test, uuid_var): - test_file_obj = load_file("security_content/" + test_file[2:]) + try: + test_file_obj = load_file("security_content/" + test_file[2:]) + except Exception as e: + print('Error: ' + str(e)) + return + if not test_file_obj: return #print(test_file_obj) diff --git a/detections/endpoint/anomalous_usage_of_7zip.yml b/detections/endpoint/anomalous_usage_of_7zip.yml index 4de347be93..38a56f4a0c 100644 --- a/detections/endpoint/anomalous_usage_of_7zip.yml +++ b/detections/endpoint/anomalous_usage_of_7zip.yml @@ -54,3 +54,5 @@ tags: - Processes.process_id - Processes.parent_process_id security_domain: endpoint + + \ No newline at end of file From 1cc9a037dd6ed9c9fa239c862300587ec278a8ce Mon Sep 17 00:00:00 2001 From: P4T12ICK Date: Wed, 14 Jul 2021 11:47:38 +0200 Subject: [PATCH 2/3] bug fix detection testing --- .circleci/config.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dacae4d2e..2555023cf2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -496,14 +496,24 @@ workflows: filters: tags: only: /.*/ - + - detection-testing: + # build always + requires: + - validate-content + - build-sources + - build-package + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ - run-appinspect: # build always requires: - validate-content - build-sources - build-package - + - detection-testing filters: tags: only: /^v.*/ @@ -514,7 +524,7 @@ workflows: - validate-content - build-sources - build-package - + - detection-testing - run-appinspect filters: tags: @@ -527,7 +537,7 @@ workflows: - validate-content - build-sources - build-package - + - detection-testing - run-appinspect - create-report filters: @@ -541,7 +551,7 @@ workflows: - validate-content - build-sources - build-package - + - detection-testing - run-appinspect - create-report - update-sources-github @@ -556,7 +566,7 @@ workflows: - validate-content - build-sources - build-package - + - detection-testing - run-appinspect - create-report - update-sources-github @@ -571,7 +581,8 @@ workflows: requires: - validate-content - build-sources - - build-package + - build-package + - detection-testing - run-appinspect - create-report - update-sources-github From cae682c137c7807693a86a6c46314d74e1ac1981 Mon Sep 17 00:00:00 2001 From: P4T12ICK Date: Wed, 14 Jul 2021 11:55:15 +0200 Subject: [PATCH 3/3] bug fix detection testing --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2555023cf2..2309db1e1e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -505,8 +505,6 @@ workflows: filters: tags: only: /^v.*/ - branches: - ignore: /.*/ - run-appinspect: # build always requires: