WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Write the modified data to the contentctl.yml file
490
+
with open("security_content/contentctl.yml", "w") as file:
491
+
yaml.dump(data,file,sort_keys=False)
492
+
493
+
# Filter out the detections based on the collected sourcetypes
494
+
base_dir = "security_content/detections"
495
+
detection_files = ""
496
+
497
+
for root, dirs, files in os.walk(base_dir):
498
+
for file in files:
499
+
file_path = os.path.join(root, file)
500
+
501
+
try:
502
+
with open(file_path, "r") as file:
503
+
file_content = yaml.safe_load(file)
504
+
if "deprecated" not in file_path and (file_content["tests"][0]["attack_data"][0]["sourcetype"] in sourcetypes or file_content["tests"][0]["attack_data"][0]["source"] in sourcetypes):
0 commit comments