contentctl 4.2.5__py3-none-any.whl → 4.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,6 @@ from contentctl.objects.enums import SecurityContentProduct, SecurityContentType
8
8
  from contentctl.input.director import Director, DirectorOutputDto
9
9
  from contentctl.output.conf_output import ConfOutput
10
10
  from contentctl.output.conf_writer import ConfWriter
11
- from contentctl.output.ba_yml_output import BAYmlOutput
12
11
  from contentctl.output.api_json_output import ApiJsonOutput
13
12
  from contentctl.output.data_source_writer import DataSourceWriter
14
13
  from contentctl.objects.lookup import Lookup
@@ -86,17 +85,4 @@ class Build:
86
85
 
87
86
  print(f"Build of '{input_dto.config.app.title}' API successful to {input_dto.config.getAPIPath()}")
88
87
 
89
- if input_dto.config.build_ssa:
90
-
91
- srs_path = input_dto.config.getSSAPath() / 'srs'
92
- complex_path = input_dto.config.getSSAPath() / 'complex'
93
- shutil.rmtree(srs_path, ignore_errors=True)
94
- shutil.rmtree(complex_path, ignore_errors=True)
95
- srs_path.mkdir(parents=True)
96
- complex_path.mkdir(parents=True)
97
- ba_yml_output = BAYmlOutput()
98
- ba_yml_output.writeObjects(input_dto.director_output_dto.ssa_detections, str(input_dto.config.getSSAPath()))
99
-
100
- print(f"Build of 'SSA' successful to {input_dto.config.getSSAPath()}")
101
-
102
88
  return input_dto.director_output_dto
@@ -30,7 +30,6 @@ class Validate:
30
30
  [],
31
31
  [],
32
32
  [],
33
- [],
34
33
  )
35
34
 
36
35
  director = Director(director_output_dto)
@@ -28,13 +28,11 @@ from contentctl.enrichments.attack_enrichment import AttackEnrichment
28
28
  from contentctl.enrichments.cve_enrichment import CveEnrichment
29
29
 
30
30
  from contentctl.objects.config import validate
31
- from contentctl.input.ssa_detection_builder import SSADetectionBuilder
32
31
  from contentctl.objects.enums import SecurityContentType
33
32
 
34
33
  from contentctl.objects.enums import DetectionStatus
35
34
  from contentctl.helper.utils import Utils
36
35
 
37
- from contentctl.input.ssa_detection_builder import SSADetectionBuilder
38
36
  from contentctl.objects.enums import SecurityContentType
39
37
 
40
38
  from contentctl.objects.enums import DetectionStatus
@@ -56,7 +54,6 @@ class DirectorOutputDto:
56
54
  macros: list[Macro]
57
55
  lookups: list[Lookup]
58
56
  deployments: list[Deployment]
59
- ssa_detections: list[SSADetection]
60
57
  data_sources: list[DataSource]
61
58
  name_to_content_map: dict[str, SecurityContentObject] = field(default_factory=dict)
62
59
  uuid_to_content_map: dict[UUID, SecurityContentObject] = field(default_factory=dict)
@@ -98,8 +95,6 @@ class DirectorOutputDto:
98
95
  self.stories.append(content)
99
96
  elif isinstance(content, Detection):
100
97
  self.detections.append(content)
101
- elif isinstance(content, SSADetection):
102
- self.ssa_detections.append(content)
103
98
  elif isinstance(content, DataSource):
104
99
  self.data_sources.append(content)
105
100
  else:
@@ -112,11 +107,9 @@ class DirectorOutputDto:
112
107
  class Director():
113
108
  input_dto: validate
114
109
  output_dto: DirectorOutputDto
115
- ssa_detection_builder: SSADetectionBuilder
116
110
 
117
111
  def __init__(self, output_dto: DirectorOutputDto) -> None:
118
112
  self.output_dto = output_dto
119
- self.ssa_detection_builder = SSADetectionBuilder()
120
113
 
121
114
  def execute(self, input_dto: validate) -> None:
122
115
  self.input_dto = input_dto
@@ -129,7 +122,6 @@ class Director():
129
122
  self.createSecurityContent(SecurityContentType.data_sources)
130
123
  self.createSecurityContent(SecurityContentType.playbooks)
131
124
  self.createSecurityContent(SecurityContentType.detections)
132
- self.createSecurityContent(SecurityContentType.ssa_detections)
133
125
 
134
126
 
135
127
  from contentctl.objects.abstract_security_content_objects.detection_abstract import MISSING_SOURCES
@@ -142,12 +134,7 @@ class Director():
142
134
  print("No missing data_sources!")
143
135
 
144
136
  def createSecurityContent(self, contentType: SecurityContentType) -> None:
145
- if contentType == SecurityContentType.ssa_detections:
146
- files = Utils.get_all_yml_files_from_directory(
147
- os.path.join(self.input_dto.path, "ssa_detections")
148
- )
149
- security_content_files = [f for f in files if f.name.startswith("ssa___")]
150
- elif contentType in [
137
+ if contentType in [
151
138
  SecurityContentType.deployments,
152
139
  SecurityContentType.lookups,
153
140
  SecurityContentType.macros,
@@ -179,43 +166,37 @@ class Director():
179
166
  modelDict = YmlReader.load_file(file)
180
167
 
181
168
  if contentType == SecurityContentType.lookups:
182
- lookup = Lookup.model_validate(modelDict,context={"output_dto":self.output_dto, "config":self.input_dto})
169
+ lookup = Lookup.model_validate(modelDict, context={"output_dto":self.output_dto, "config":self.input_dto})
183
170
  self.output_dto.addContentToDictMappings(lookup)
184
171
 
185
172
  elif contentType == SecurityContentType.macros:
186
- macro = Macro.model_validate(modelDict,context={"output_dto":self.output_dto})
173
+ macro = Macro.model_validate(modelDict, context={"output_dto":self.output_dto})
187
174
  self.output_dto.addContentToDictMappings(macro)
188
175
 
189
176
  elif contentType == SecurityContentType.deployments:
190
- deployment = Deployment.model_validate(modelDict,context={"output_dto":self.output_dto})
177
+ deployment = Deployment.model_validate(modelDict, context={"output_dto":self.output_dto})
191
178
  self.output_dto.addContentToDictMappings(deployment)
192
179
 
193
180
  elif contentType == SecurityContentType.playbooks:
194
- playbook = Playbook.model_validate(modelDict,context={"output_dto":self.output_dto})
181
+ playbook = Playbook.model_validate(modelDict, context={"output_dto":self.output_dto})
195
182
  self.output_dto.addContentToDictMappings(playbook)
196
183
 
197
184
  elif contentType == SecurityContentType.baselines:
198
- baseline = Baseline.model_validate(modelDict,context={"output_dto":self.output_dto})
185
+ baseline = Baseline.model_validate(modelDict, context={"output_dto":self.output_dto})
199
186
  self.output_dto.addContentToDictMappings(baseline)
200
187
 
201
188
  elif contentType == SecurityContentType.investigations:
202
- investigation = Investigation.model_validate(modelDict,context={"output_dto":self.output_dto})
189
+ investigation = Investigation.model_validate(modelDict, context={"output_dto":self.output_dto})
203
190
  self.output_dto.addContentToDictMappings(investigation)
204
191
 
205
192
  elif contentType == SecurityContentType.stories:
206
- story = Story.model_validate(modelDict,context={"output_dto":self.output_dto})
193
+ story = Story.model_validate(modelDict, context={"output_dto":self.output_dto})
207
194
  self.output_dto.addContentToDictMappings(story)
208
195
 
209
196
  elif contentType == SecurityContentType.detections:
210
- detection = Detection.model_validate(modelDict,context={"output_dto":self.output_dto, "app":self.input_dto.app})
197
+ detection = Detection.model_validate(modelDict, context={"output_dto":self.output_dto, "app":self.input_dto.app})
211
198
  self.output_dto.addContentToDictMappings(detection)
212
199
 
213
- elif contentType == SecurityContentType.ssa_detections:
214
- self.constructSSADetection(self.ssa_detection_builder, self.output_dto,str(file))
215
- ssa_detection = self.ssa_detection_builder.getObject()
216
- if ssa_detection.status in [DetectionStatus.production.value, DetectionStatus.validation.value]:
217
- self.output_dto.addContentToDictMappings(ssa_detection)
218
-
219
200
  elif contentType == SecurityContentType.data_sources:
220
201
  data_source = DataSource.model_validate(
221
202
  modelDict, context={"output_dto": self.output_dto}
@@ -262,19 +243,3 @@ class Director():
262
243
  f"The following {len(validation_errors)} error(s) were found during validation:\n\n{errors_string}\n\nVALIDATION FAILED"
263
244
  )
264
245
 
265
- def constructSSADetection(
266
- self,
267
- builder: SSADetectionBuilder,
268
- directorOutput: DirectorOutputDto,
269
- file_path: str,
270
- ) -> None:
271
- builder.reset()
272
- builder.setObject(file_path)
273
- builder.addMitreAttackEnrichmentNew(directorOutput.attack_enrichment)
274
- builder.addKillChainPhase()
275
- builder.addCIS()
276
- builder.addNist()
277
- builder.addAnnotations()
278
- builder.addMappings()
279
- builder.addUnitTest()
280
- builder.addRBA()
@@ -46,7 +46,7 @@ class Detection_Abstract(SecurityContentObject):
46
46
  status: DetectionStatus = Field(...)
47
47
  data_source: list[str] = []
48
48
  tags: DetectionTags = Field(...)
49
- search: Union[str, dict[str, Any]] = Field(...)
49
+ search: str = Field(...)
50
50
  how_to_implement: str = Field(..., min_length=4)
51
51
  known_false_positives: str = Field(..., min_length=4)
52
52
 
@@ -65,11 +65,7 @@ class Detection_Abstract(SecurityContentObject):
65
65
 
66
66
  @field_validator("search", mode="before")
67
67
  @classmethod
68
- def validate_presence_of_filter_macro(
69
- cls,
70
- value: Union[str, dict[str, Any]],
71
- info: ValidationInfo
72
- ) -> Union[str, dict[str, Any]]:
68
+ def validate_presence_of_filter_macro(cls, value:str, info:ValidationInfo)->str:
73
69
  """
74
70
  Validates that, if required to be present, the filter macro is present with the proper name.
75
71
  The filter macro MUST be derived from the name of the detection
@@ -83,12 +79,9 @@ class Detection_Abstract(SecurityContentObject):
83
79
 
84
80
  Returns:
85
81
  Union[str, dict[str,Any]]: The search, either in sigma or SPL format.
86
- """
87
-
88
- if isinstance(value, dict):
89
- # If the search is a dict, then it is in Sigma format so return it
90
- return value
91
-
82
+ """
83
+
84
+
92
85
  # Otherwise, the search is SPL.
93
86
 
94
87
  # In the future, we will may add support that makes the inclusion of the
@@ -155,15 +148,16 @@ class Detection_Abstract(SecurityContentObject):
155
148
  @computed_field
156
149
  @property
157
150
  def datamodel(self) -> List[DataModel]:
158
- if isinstance(self.search, str):
159
- return [dm for dm in DataModel if dm.value in self.search]
160
- else:
161
- return []
151
+ return [dm for dm in DataModel if dm.value in self.search]
152
+
153
+
154
+
162
155
 
163
156
  @computed_field
164
157
  @property
165
158
  def source(self) -> str:
166
159
  return self.file_path.absolute().parent.name
160
+
167
161
 
168
162
  deployment: Deployment = Field({})
169
163
 
@@ -249,12 +243,9 @@ class Detection_Abstract(SecurityContentObject):
249
243
  @computed_field
250
244
  @property
251
245
  def providing_technologies(self) -> List[ProvidingTechnology]:
252
- if isinstance(self.search, str):
253
- return ProvidingTechnology.getProvidingTechFromSearch(self.search)
254
- else:
255
- # Dict-formatted searches (sigma) will not have providing technologies
256
- return []
257
-
246
+ return ProvidingTechnology.getProvidingTechFromSearch(self.search)
247
+
248
+
258
249
  @computed_field
259
250
  @property
260
251
  def risk(self) -> list[dict[str, Any]]:
@@ -445,18 +436,13 @@ class Detection_Abstract(SecurityContentObject):
445
436
 
446
437
  @field_validator('lookups', mode="before")
447
438
  @classmethod
448
- def getDetectionLookups(cls, v: list[str], info: ValidationInfo) -> list[Lookup]:
449
- if info.context is None:
450
- raise ValueError("ValidationInfo.context unexpectedly null")
451
-
452
- director: DirectorOutputDto = info.context.get("output_dto", None)
453
-
454
- search: Union[str, dict[str, Any], None] = info.data.get("search", None)
455
- if not isinstance(search, str):
456
- # The search was sigma formatted (or failed other validation and was None), so we will
457
- # not validate macros in it
458
- return []
459
-
439
+ def getDetectionLookups(cls, v:list[str], info:ValidationInfo) -> list[Lookup]:
440
+ director:DirectorOutputDto = info.context.get("output_dto",None)
441
+
442
+ search:Union[str,None] = info.data.get("search",None)
443
+ if search is None:
444
+ raise ValueError("Search was None - is this file missing the search field?")
445
+
460
446
  lookups = Lookup.get_lookups(search, director)
461
447
  return lookups
462
448
 
@@ -496,11 +482,9 @@ class Detection_Abstract(SecurityContentObject):
496
482
 
497
483
  director: DirectorOutputDto = info.context.get("output_dto", None)
498
484
 
499
- search: str | dict[str, Any] | None = info.data.get("search", None)
500
- if not isinstance(search, str):
501
- # The search was sigma formatted (or failed other validation and was None), so we will
502
- # not validate macros in it
503
- return []
485
+ search: str | None = info.data.get("search", None)
486
+ if search is None:
487
+ raise ValueError("Search was None - is this file missing the search field?")
504
488
 
505
489
  search_name: Union[str, Any] = info.data.get("name", None)
506
490
  message = f"Expected 'search_name' to be a string, instead it was [{type(search_name)}]"
@@ -614,45 +598,43 @@ class Detection_Abstract(SecurityContentObject):
614
598
 
615
599
  @model_validator(mode="after")
616
600
  def search_observables_exist_validate(self):
617
- if isinstance(self.search, str):
618
-
619
- observable_fields = [ob.name.lower() for ob in self.tags.observable]
601
+ observable_fields = [ob.name.lower() for ob in self.tags.observable]
620
602
 
621
- # All $field$ fields from the message must appear in the search
622
- field_match_regex = r"\$([^\s.]*)\$"
603
+ # All $field$ fields from the message must appear in the search
604
+ field_match_regex = r"\$([^\s.]*)\$"
623
605
 
624
- missing_fields: set[str]
625
- if self.tags.message:
626
- matches = re.findall(field_match_regex, self.tags.message.lower())
627
- message_fields = [match.replace("$", "").lower() for match in matches]
628
- missing_fields = set([field for field in observable_fields if field not in self.search.lower()])
629
- else:
630
- message_fields = []
631
- missing_fields = set()
632
-
633
- error_messages: list[str] = []
634
- if len(missing_fields) > 0:
635
- error_messages.append(
636
- "The following fields are declared as observables, but do not exist in the "
637
- f"search: {missing_fields}"
638
- )
606
+ missing_fields: set[str]
607
+ if self.tags.message:
608
+ matches = re.findall(field_match_regex, self.tags.message.lower())
609
+ message_fields = [match.replace("$", "").lower() for match in matches]
610
+ missing_fields = set([field for field in observable_fields if field not in self.search.lower()])
611
+ else:
612
+ message_fields = []
613
+ missing_fields = set()
614
+
615
+ error_messages: list[str] = []
616
+ if len(missing_fields) > 0:
617
+ error_messages.append(
618
+ "The following fields are declared as observables, but do not exist in the "
619
+ f"search: {missing_fields}"
620
+ )
639
621
 
640
- missing_fields = set([field for field in message_fields if field not in self.search.lower()])
641
- if len(missing_fields) > 0:
642
- error_messages.append(
643
- "The following fields are used as fields in the message, but do not exist in "
644
- f"the search: {missing_fields}"
645
- )
622
+ missing_fields = set([field for field in message_fields if field not in self.search.lower()])
623
+ if len(missing_fields) > 0:
624
+ error_messages.append(
625
+ "The following fields are used as fields in the message, but do not exist in "
626
+ f"the search: {missing_fields}"
627
+ )
646
628
 
647
- # NOTE: we ignore the type error around self.status because we are using Pydantic's
648
- # use_enum_values configuration
649
- # https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.populate_by_name
650
- if len(error_messages) > 0 and self.status == DetectionStatus.production.value: # type: ignore
651
- msg = (
652
- "Use of fields in observables/messages that do not appear in search:\n\t- "
653
- "\n\t- ".join(error_messages)
654
- )
655
- raise ValueError(msg)
629
+ # NOTE: we ignore the type error around self.status because we are using Pydantic's
630
+ # use_enum_values configuration
631
+ # https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.populate_by_name
632
+ if len(error_messages) > 0 and self.status == DetectionStatus.production.value: # type: ignore
633
+ msg = (
634
+ "Use of fields in observables/messages that do not appear in search:\n\t- "
635
+ "\n\t- ".join(error_messages)
636
+ )
637
+ raise ValueError(msg)
656
638
 
657
639
  # Found everything
658
640
  return self
@@ -175,7 +175,6 @@ class validate(Config_Base):
175
175
  "be avoided for performance reasons.")
176
176
  build_app: bool = Field(default=True, description="Should an app be built and output in the build_path?")
177
177
  build_api: bool = Field(default=False, description="Should api objects be built and output in the build_path?")
178
- build_ssa: bool = Field(default=False, description="Should ssa objects be built and output in the build_path?")
179
178
  data_source_TA_validation: bool = Field(default=False, description="Validate latest TA information from Splunkbase")
180
179
 
181
180
  def getAtomicRedTeamRepoPath(self, atomic_red_team_repo_name:str = "atomic-red-team"):
@@ -577,7 +576,6 @@ class test_common(build):
577
576
  # output to dist. We have already built it!
578
577
  self.build_app = False
579
578
  self.build_api = False
580
- self.build_ssa = False
581
579
  self.enrichments = False
582
580
 
583
581
  self.enable_integration_testing = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: contentctl
3
- Version: 4.2.5
3
+ Version: 4.3.0
4
4
  Summary: Splunk Content Control Tool
5
5
  License: Apache 2.0
6
6
  Author: STRT
@@ -19,8 +19,6 @@ Requires-Dist: gitpython (>=3.1.43,<4.0.0)
19
19
  Requires-Dist: pycvesearch (>=1.2,<2.0)
20
20
  Requires-Dist: pydantic (>=2.7.1,<3.0.0)
21
21
  Requires-Dist: pygit2 (>=1.14.1,<2.0.0)
22
- Requires-Dist: pysigma (>=0.11.5,<0.12.0)
23
- Requires-Dist: pysigma-backend-splunk (>=1.1.0,<2.0.0)
24
22
  Requires-Dist: questionary (>=2.0.1,<3.0.0)
25
23
  Requires-Dist: requests (>=2.32.2,<2.33.0)
26
24
  Requires-Dist: semantic-version (>=2.10.0,<3.0.0)
@@ -36,8 +34,20 @@ Description-Content-Type: text/markdown
36
34
  <p align="center">
37
35
  <img src="docs/contentctl_logo_white.png" title="In case you're wondering, it's a capybara" alt="contentctl logo" width="250" height="250"></p>
38
36
 
39
-
40
-
37
+ # contentctl Quick Start Guide
38
+ If you are already familiar with contentctl, the following common commands may be very useful for basic operations
39
+
40
+ | Operation | Command |
41
+ |-----------|---------|
42
+ | Create a repository | `contentctl init` |
43
+ | Validate Your Content | `contentctl validate` |
44
+ | Validate Your Content, performing MITRE Enrichments | `contentctl validate –-enrichments`|
45
+ | Build Your App | `contentctl build` |
46
+ | Test All the content in your app, pausing so that you can debug a search if it fails | `contentctl test –-post-test-behavior pause_on_failure mode:all` |
47
+ | Test All the content in your app, pausing after every detection to allow debugging | `contentctl test –-post-test-behavior always_pause mode:all` |
48
+ | Test 1 or more specified detections. If you are testing more than one detection, the paths are space-separated. You may also use shell-expanded regexes | `contentctl test –-post-test-behavior always_pause mode:selected --mode.files detections/endpoint/7zip_commandline_to_smb_share_path.yml detections/cloud/aws_multi_factor_authentication_disabled.yml detections/application/okta*` |
49
+ | Diff your current branch with a target_branch and test detections that have been updated. Your current branch **must be DIFFERENT** than the target_branch | `contentctl test –-post-test-behavior always_pause mode:changes –-mode.target_branch develop` |
50
+ | Perform Integration Testing of all content. Note that Enterprise Security MUST be listed as an app in your contentctl.yml folder, otherwise all tests will subsequently fail | `contentctl test –-enable-integration-testing --post-test-behavior never_pause mode:all` |
41
51
 
42
52
  # Introduction
43
53
  #### Security Is Hard
@@ -1,6 +1,5 @@
1
1
  contentctl/__init__.py,sha256=IMjkMO3twhQzluVTo8Z6rE7Eg-9U79_LGKMcsWLKBkY,22
2
- contentctl/actions/build.py,sha256=mGm1F8jWdj547uJVSEWZBZcEyjoO4QpPKWhJOpRwR94,5739
3
- contentctl/actions/convert.py,sha256=0KBWLxvP1hSPXpExePqpOQPRvlQLamvPLyQqeTIWNbk,704
2
+ contentctl/actions/build.py,sha256=FXMub_CAVN4kTks3RLHBm8O9qtFV2EkSSNld7FzCPd0,5035
4
3
  contentctl/actions/deploy_acs.py,sha256=mf3uk495H1EU_LNN-TiOsYCo18HMGoEBMb6ojeTr0zw,1418
5
4
  contentctl/actions/detection_testing/DetectionTestingManager.py,sha256=zg8JasDjCpSC-yhseEyUwO8qbDJIUJbhlus9Li9ZAnA,8818
6
5
  contentctl/actions/detection_testing/GitService.py,sha256=W1vnDDt8JvIL7Z1Lve3D3RS7h8qwMxrW0BMXVGuDZDM,9007
@@ -21,7 +20,7 @@ contentctl/actions/new_content.py,sha256=o5ZYBQ216RN6TnW_wRxVGJybx2SsJ7ht4PAi1dw
21
20
  contentctl/actions/release_notes.py,sha256=akkFfLhsJuaPUyjsb6dLlKt9cUM-JApAjTFQMbYoXeM,13115
22
21
  contentctl/actions/reporting.py,sha256=MJEmvmoA1WnSFZEU9QM6daL_W94oOX0WXAcX1qAM2As,1583
23
22
  contentctl/actions/test.py,sha256=dx7f750_MrlvysxOmOdIro1bH0iVKF4K54TSwhvU2MU,5146
24
- contentctl/actions/validate.py,sha256=2iFhyhh_LXyMAXtkxnYai7CONSVx4Hb8RftEs_Z_7mI,5649
23
+ contentctl/actions/validate.py,sha256=2MQ8yumCKj7zD8iUuA5gfFEMcE-GPRzYqkvuOexn0JA,5633
25
24
  contentctl/api.py,sha256=FBOpRhbBCBdjORmwe_8MPQ3PRZ6T0KrrFcfKovVFkug,6343
26
25
  contentctl/contentctl.py,sha256=SxWFMYquSYQAATrTBpvfj4j5DRedsOF2xO96ASs74wA,10505
27
26
  contentctl/enrichments/attack_enrichment.py,sha256=dVwXcULSeZJuQbeTlPpKDyEB9Y6uCy0UGWI83gPLTI0,6735
@@ -31,13 +30,10 @@ contentctl/helper/link_validator.py,sha256=-XorhxfGtjLynEL1X4hcpRMiyemogf2JEnvLw
31
30
  contentctl/helper/logger.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
31
  contentctl/helper/splunk_app.py,sha256=PZf60Z3ALQLJQ6I--cbWTCzvOMPGsjZSns1BFrZu4S4,9549
33
32
  contentctl/helper/utils.py,sha256=8ICRvE7DUiNL9BK4Hw71hCLFbd3R2u86OwKeDOdaBTY,19454
34
- contentctl/input/backend_splunk_ba.py,sha256=Y70tJqgaUM0nzfm2SiGMof4HkhY84feqf-xnRx1xPb4,5861
35
- contentctl/input/director.py,sha256=w-3aMrFGmfLb8vRzI-rP6K-JlmqYOwZS7OLjU_cOlck,12598
33
+ contentctl/input/director.py,sha256=kTqdN_rCzRMn4dR32hPaVyx2llhAxyhJgoGjowhsHzs,10887
36
34
  contentctl/input/new_content_questions.py,sha256=o4prlBoUhEMxqpZukquI9WKbzfFJfYhEF7a8m2q_BEE,5565
37
- contentctl/input/sigma_converter.py,sha256=ATFNW7boNngp5dmWM7Gr4rMZrUKjvKW2_qu28--FdiU,19391
38
- contentctl/input/ssa_detection_builder.py,sha256=4wjgV-WQaJltPHxqd455lNU_8Dn-OlEaqYO8dvIsZ6c,8279
39
35
  contentctl/input/yml_reader.py,sha256=hyVUYhx4Ka8C618kP2D_E3sDUKEQGC6ty_QZQArHKd4,1489
40
- contentctl/objects/abstract_security_content_objects/detection_abstract.py,sha256=TP2FAbcJ3B1xTTKSRh8-p2FfNgnTVIruprp_WMNyJGw,35388
36
+ contentctl/objects/abstract_security_content_objects/detection_abstract.py,sha256=gra5kZkLFATBQJ-ZR4SNzkZ86MBX3pnOz2RdIl5oOVs,34502
41
37
  contentctl/objects/abstract_security_content_objects/security_content_object_abstract.py,sha256=7tv-WEiUUOvZkao272J9l1IvL0y12kJ6SWLsMeWv9VE,9820
42
38
  contentctl/objects/alert_action.py,sha256=E9gjCn5C31h0sN7k90KNe4agRxFFSnMW_Z-Ri_3YQss,1335
43
39
  contentctl/objects/atomic.py,sha256=BP27gP8KHeODp6UazhVFxwDQ64wuJCARGsLfIH34h7U,8768
@@ -45,7 +41,7 @@ contentctl/objects/base_test.py,sha256=7kAV0njoXaasA-Mt3Zxeq-NFwFF5Z9U85k5cEYW1i
45
41
  contentctl/objects/base_test_result.py,sha256=ZEAC2IUwUrW_-zHoaS7zp-uBBKIVTS8TcMXjkMByjF4,5006
46
42
  contentctl/objects/baseline.py,sha256=Lb1vJKtDdlDrzWgrdkC9oQao_TnRrOxSwOWHf4trtaU,2150
47
43
  contentctl/objects/baseline_tags.py,sha256=fVhLF-NmisavybB_idu3N0Con0Ymj8clKfRMkWzBB-k,1762
48
- contentctl/objects/config.py,sha256=ha18aqKmkYqAvM8YI124q6JYxesYRon9rc0NMWFzCS4,43762
44
+ contentctl/objects/config.py,sha256=XpCjYIoU4XTM6RL4Nt-YjMX342FJz4R-ATDXJWexHNs,43615
49
45
  contentctl/objects/constants.py,sha256=1LjiK9A7t0aHHkJz2mrW-DImdW1P98GPssTwmwNNI_M,3468
50
46
  contentctl/objects/correlation_search.py,sha256=QZp1u-dwTZl9hkUOlJdHQ9h4Hp2bDHWWCKtrp3mvIUY,48310
51
47
  contentctl/objects/data_source.py,sha256=aRr6lHu-EtGmi6J2nXKD7i2ozUPtp7X-vDkQiutvD3I,1545
@@ -92,13 +88,11 @@ contentctl/objects/unit_test_ssa.py,sha256=RURqXb3e0CuI5nNX8PvFucxatAvMmGSUDngVb
92
88
  contentctl/output/api_json_output.py,sha256=n3OTd5z-Vkmsn7ny6QCAar_jSMNuuJfzAQa7xq_9if4,9085
93
89
  contentctl/output/attack_nav_output.py,sha256=95iKV8U9BMMgqh6cCOw1S89Ln73xmJGgJPHTYR0L7hA,2304
94
90
  contentctl/output/attack_nav_writer.py,sha256=64ILZLmNbh2XLmbopgENkeo6t-4SRRG8xZXBmtpNd4g,2219
95
- contentctl/output/ba_yml_output.py,sha256=Lrk13Q9-f71i3c0oNrT50G94PxdogG4k4-MI-rTMOAo,5950
96
91
  contentctl/output/conf_output.py,sha256=7HcHM9pJLNnan1Kq_7ozvs5iOgfzqdKbO6gwxUZJVnc,9994
97
92
  contentctl/output/conf_writer.py,sha256=2TaCAPEtU-bMa7A2m7xOxh93PMpzIdhwiHiPLUCeCB4,8281
98
93
  contentctl/output/data_source_writer.py,sha256=ubFjm6XJ4T2d3oqfKwDFasITHeDj3HFmegqVN--5_ME,1635
99
94
  contentctl/output/detection_writer.py,sha256=AzxbssNLmsNIOaYKotew5-ONoyq1cQpKSGy3pe191B0,960
100
95
  contentctl/output/doc_md_output.py,sha256=gf7osH1uSrC6js3D_I72g4uDe9TaB3tsvtqCHi5znp0,3238
101
- contentctl/output/finding_report_writer.py,sha256=bjJR7NAxLE8vt8uU3zSDhazQzqzOdtCsUu95lVdzU_w,3939
102
96
  contentctl/output/jinja_writer.py,sha256=bdiqr9FaXYxth4wZ1A52zTMAS5stHNGpezTkaS5pres,1119
103
97
  contentctl/output/json_writer.py,sha256=Z-iVLnZb8tzYATxbQtXax0dz572lVPFMNVTx-vWbnog,1007
104
98
  contentctl/output/new_content_yml_output.py,sha256=ktZ9miHluqkw8jD-pn-62bjVp1sQqqQ7B53xy18DHU8,2321
@@ -169,8 +163,8 @@ contentctl/templates/detections/web/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
169
163
  contentctl/templates/macros/security_content_ctime.yml,sha256=Gg1YNllHVsX_YB716H1SJLWzxXZEfuJlnsgB2fuyoHU,159
170
164
  contentctl/templates/macros/security_content_summariesonly.yml,sha256=9BYUxAl2E4Nwh8K19F3AJS8Ka7ceO6ZDBjFiO3l3LY0,162
171
165
  contentctl/templates/stories/cobalt_strike.yml,sha256=rlaXxMN-5k8LnKBLPafBoksyMtlmsPMHPJOjTiMiZ-M,3063
172
- contentctl-4.2.5.dist-info/LICENSE.md,sha256=hQWUayRk-pAiOZbZnuy8djmoZkjKBx8MrCFpW-JiOgo,11344
173
- contentctl-4.2.5.dist-info/METADATA,sha256=AKuXizf44e0rPSDHXX6viX88kBtY4M8RMh01jOEucqU,19386
174
- contentctl-4.2.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
175
- contentctl-4.2.5.dist-info/entry_points.txt,sha256=5bjZ2NkbQfSwK47uOnA77yCtjgXhvgxnmCQiynRF_-U,57
176
- contentctl-4.2.5.dist-info/RECORD,,
166
+ contentctl-4.3.0.dist-info/LICENSE.md,sha256=hQWUayRk-pAiOZbZnuy8djmoZkjKBx8MrCFpW-JiOgo,11344
167
+ contentctl-4.3.0.dist-info/METADATA,sha256=YpQM8untSb4LvHmv0IHCjgJP7qM5X_c13n17lJGK_kg,20939
168
+ contentctl-4.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
169
+ contentctl-4.3.0.dist-info/entry_points.txt,sha256=5bjZ2NkbQfSwK47uOnA77yCtjgXhvgxnmCQiynRF_-U,57
170
+ contentctl-4.3.0.dist-info/RECORD,,
@@ -1,25 +0,0 @@
1
-
2
- import sys
3
- import shutil
4
- import os
5
-
6
- from dataclasses import dataclass
7
-
8
- from contentctl.input.sigma_converter import *
9
- from contentctl.output.yml_output import YmlOutput
10
-
11
- @dataclass(frozen=True)
12
- class ConvertInputDto:
13
- sigma_converter_input_dto: SigmaConverterInputDto
14
- output_path : str
15
-
16
-
17
- class Convert:
18
-
19
- def execute(self, input_dto: ConvertInputDto) -> None:
20
- sigma_converter_output_dto = SigmaConverterOutputDto([])
21
- sigma_converter = SigmaConverter(sigma_converter_output_dto)
22
- sigma_converter.execute(input_dto.sigma_converter_input_dto)
23
-
24
- yml_output = YmlOutput()
25
- yml_output.writeDetections(sigma_converter_output_dto.detections, input_dto.output_path)