Skip to content

Commit ddd63e6

Browse files
authored
Merge branch 'main' into init-bare
2 parents fccc2df + c62eeb9 commit ddd63e6

File tree

12 files changed

+15
-367
lines changed

12 files changed

+15
-367
lines changed

contentctl/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def update_config(config:Union[test,test_servers], **key_value_updates:dict[str,
126126
def content_to_dict(director:DirectorOutputDto)->dict[str,list[dict[str,Any]]]:
127127
output_dict:dict[str,list[dict[str,Any]]] = {}
128128
for contentType in ['detections','stories','baselines','investigations',
129-
'playbooks','macros','lookups','deployments','ssa_detections']:
129+
'playbooks','macros','lookups','deployments',]:
130130

131131
output_dict[contentType] = []
132132
t:list[SecurityContentObject] = getattr(director,contentType)

contentctl/input/director.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from contentctl.objects.deployment import Deployment
1919
from contentctl.objects.macro import Macro
2020
from contentctl.objects.lookup import Lookup
21-
from contentctl.objects.ssa_detection import SSADetection
2221
from contentctl.objects.atomic import AtomicTest
2322
from contentctl.objects.security_content_object import SecurityContentObject
2423
from contentctl.objects.data_source import DataSource
@@ -33,10 +32,7 @@
3332
from contentctl.objects.enums import DetectionStatus
3433
from contentctl.helper.utils import Utils
3534

36-
from contentctl.objects.enums import SecurityContentType
3735

38-
from contentctl.objects.enums import DetectionStatus
39-
from contentctl.helper.utils import Utils
4036

4137

4238
@dataclass
@@ -60,10 +56,7 @@ class DirectorOutputDto:
6056

6157
def addContentToDictMappings(self, content: SecurityContentObject):
6258
content_name = content.name
63-
if isinstance(content, SSADetection):
64-
# Since SSA detections may have the same name as ESCU detection,
65-
# for this function we prepend 'SSA ' to the name.
66-
content_name = f"SSA {content_name}"
59+
6760

6861
if content_name in self.name_to_content_map:
6962
raise ValueError(
@@ -149,7 +142,7 @@ def createSecurityContent(self, contentType: SecurityContentType) -> None:
149142
os.path.join(self.input_dto.path, str(contentType.name))
150143
)
151144
security_content_files = [
152-
f for f in files if not f.name.startswith("ssa___")
145+
f for f in files
153146
]
154147
else:
155148
raise (Exception(f"Cannot createSecurityContent for unknown product."))

contentctl/objects/abstract_security_content_objects/detection_abstract.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,13 @@ def validate_presence_of_filter_macro(cls, value:str, info:ValidationInfo)->str:
8383
8484
8585
Args:
86-
value (Union[str, dict[str,Any]]): The search. It can either be a string (and should be
87-
SPL or a dict, in which case it is Sigma-formatted.
86+
value (str): The SPL search. It must be an SPL-formatted string.
8887
info (ValidationInfo): The validation info can contain a number of different objects.
8988
Today it only contains the director.
9089
9190
Returns:
92-
Union[str, dict[str,Any]]: The search, either in sigma or SPL format.
93-
"""
94-
91+
str: The search, as an SPL formatted string.
92+
"""
9593

9694
# Otherwise, the search is SPL.
9795

contentctl/objects/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ def getPackageFilePath(self, include_version:bool=False)->pathlib.Path:
234234
return self.getBuildDir() / f"{self.app.appid}-{self.app.version}.tar.gz"
235235
else:
236236
return self.getBuildDir() / f"{self.app.appid}-latest.tar.gz"
237-
238-
def getSSAPath(self)->pathlib.Path:
239-
return self.getBuildDir() / "ssa"
240237

241238
def getAPIPath(self)->pathlib.Path:
242239
return self.getBuildDir() / "api"

contentctl/objects/enums.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class SecurityContentType(enum.Enum):
5454
deployments = 7
5555
investigations = 8
5656
unit_tests = 9
57-
ssa_detections = 10
5857
data_sources = 11
5958

6059
# Bringing these changes back in line will take some time after
@@ -69,7 +68,6 @@ class SecurityContentType(enum.Enum):
6968

7069
class SecurityContentProduct(enum.Enum):
7170
SPLUNK_APP = 1
72-
SSA = 2
7371
API = 3
7472
CUSTOM = 4
7573

contentctl/objects/ssa_detection.py

Lines changed: 0 additions & 157 deletions
This file was deleted.

contentctl/objects/ssa_detection_tags.py

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)