diff --git a/.circleci/config.yml b/.circleci/config.yml
index d166fb1f5d..7fde44e68c 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -24,23 +24,11 @@ apt-run: &apt-install
command: |
sudo apt update -qq
sudo apt install -y python-dev python3-dev jq -qq
- # install go for other testing tools
- # but first lets clean up the env
- if [ -f goinstall.sh ]; then
- rm goinstall.sh
- fi
- if [ -d ~/.go ]; then
- rm -rf ~/.go
- fi
- wget https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh
- sudo chown circleci goinstall.sh
- chmod +x goinstall.sh
- ./goinstall.sh
executors:
content-executor:
docker:
- - image: circleci/python:latest
+ - image: cimg/python:3.9.5-browsers
working_directory: ~/repo
jobs:
@@ -193,8 +181,6 @@ jobs:
name: install splunk packaging toolkit (slim)
command: |
cd ~/slim-latest
- sudo pip install --upgrade pip setuptools
- sudo pip install virtualenv
virtualenv --python=/usr/bin/python2.7 --clear venv
source venv/bin/activate
pip install semantic_version
diff --git a/bin/doc_gen.py b/bin/doc_gen.py
index 774fc30d92..a290184409 100644
--- a/bin/doc_gen.py
+++ b/bin/doc_gen.py
@@ -47,7 +47,6 @@ def generate_doc_stories(REPO_PATH, OUTPUT_DIR, TEMPLATE_PATH, attack, sorted_de
manifest_files = []
for root, dirs, files in walk(REPO_PATH + '/stories'):
for file in files:
- print(root)
if file.endswith(".yml") and root == './stories':
manifest_files.append((path.join(root, file)))
diff --git a/bin/reporting.py b/bin/reporting.py
index 371785f7c0..189f932470 100644
--- a/bin/reporting.py
+++ b/bin/reporting.py
@@ -30,6 +30,7 @@ def load_file(file_path):
def main(args):
+ print("generated reporting information for our detections")
# process all detections
REPO_PATH = os.path.join(os.path.dirname(__file__), '../')
@@ -42,13 +43,14 @@ def main(args):
detections_all = detections.copy()
- #lets exclude all deprecated detections from our reporting
+ #lets exclude all deprecated detections from our reporting and experimental
# detections_all.extend(load_objects("detections/deprecated/*.yml", REPO_PATH))
-
- detections_all.extend(load_objects("detections/experimental/*/*.yml", REPO_PATH))
+ # detections_all.extend(load_objects("detections/experimental/*/*.yml", REPO_PATH))
count_detections_all = len(detections_all)
+ print("detection count: {}".format(count_detections_all))
tests = load_objects("tests/*/*.yml", REPO_PATH)
+ print("test count: {}".format(len(tests)))
counter_tests=0
counter_detection=0
@@ -59,8 +61,9 @@ def main(args):
for test in tests:
counter_tests=counter_tests+1
+ detection_coverage = "{:.0%}".format(counter_detection/counter_tests)
- detection_coverage = "{:.0%}".format(counter_tests/counter_detection)
+ print("detection_coverage {}".format(detection_coverage))
TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'jinja2_templates')
OUTPUT_PATH = os.path.join(os.path.dirname(__file__), 'reporting')
@@ -70,12 +73,14 @@ def main(args):
output = template.render(detection_coverage=detection_coverage)
with open(output_path, 'w', encoding="utf-8") as f:
f.write(output)
+ print("writting detection coverage report: {}".format(output_path))
template = j2_env.get_template('detection_count.j2')
output_path = path.join(OUTPUT_PATH, 'detection_count.svg')
output = template.render(detection_count=count_detections_all)
with open(output_path, 'w', encoding="utf-8") as f:
f.write(output)
+ print("writting detection count report: {}".format(output_path))
if __name__ == "__main__":
diff --git a/bin/reporting/detection_count.svg b/bin/reporting/detection_count.svg
index b8211b491e..34dd27b7c5 100644
--- a/bin/reporting/detection_count.svg
+++ b/bin/reporting/detection_count.svg
@@ -13,6 +13,6 @@
detections
- 440
+ 368
\ No newline at end of file
diff --git a/bin/reporting/detection_coverage.svg b/bin/reporting/detection_coverage.svg
index ed37733b35..c516490f8f 100644
--- a/bin/reporting/detection_coverage.svg
+++ b/bin/reporting/detection_coverage.svg
@@ -13,6 +13,6 @@
coverage
- 100%
+ 99%
\ No newline at end of file