contentctl 4.2.0__py3-none-any.whl → 4.2.1__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.
- contentctl/actions/detection_testing/GitService.py +10 -9
- {contentctl-4.2.0.dist-info → contentctl-4.2.1.dist-info}/METADATA +1 -1
- {contentctl-4.2.0.dist-info → contentctl-4.2.1.dist-info}/RECORD +6 -6
- {contentctl-4.2.0.dist-info → contentctl-4.2.1.dist-info}/LICENSE.md +0 -0
- {contentctl-4.2.0.dist-info → contentctl-4.2.1.dist-info}/WHEEL +0 -0
- {contentctl-4.2.0.dist-info → contentctl-4.2.1.dist-info}/entry_points.txt +0 -0
|
@@ -155,21 +155,22 @@ class GitService(BaseModel):
|
|
|
155
155
|
print(f"[{len(updated_detections)}] Pieces of modifed and new content (this may include experimental/deprecated/manual_test content):\n - {modifiedAndNewContentString}")
|
|
156
156
|
return updated_detections
|
|
157
157
|
|
|
158
|
-
def getSelected(self, detectionFilenames:List[FilePath])->List[Detection]:
|
|
159
|
-
filepath_to_content_map:dict[FilePath, SecurityContentObject] = {
|
|
158
|
+
def getSelected(self, detectionFilenames: List[FilePath]) -> List[Detection]:
|
|
159
|
+
filepath_to_content_map: dict[FilePath, SecurityContentObject] = {
|
|
160
|
+
obj.file_path: obj for (_, obj) in self.director.name_to_content_map.items() if obj.file_path is not None
|
|
161
|
+
}
|
|
160
162
|
errors = []
|
|
161
|
-
detections:List[Detection] = []
|
|
163
|
+
detections: List[Detection] = []
|
|
162
164
|
for name in detectionFilenames:
|
|
163
|
-
obj = filepath_to_content_map.get(name,None)
|
|
164
|
-
if obj
|
|
165
|
+
obj = filepath_to_content_map.get(name, None)
|
|
166
|
+
if obj is None:
|
|
165
167
|
errors.append(f"There is no detection file or security_content_object at '{name}'")
|
|
166
168
|
elif not isinstance(obj, Detection):
|
|
167
169
|
errors.append(f"The security_content_object at '{name}' is of type '{type(obj).__name__}', NOT '{Detection.__name__}'")
|
|
168
170
|
else:
|
|
169
171
|
detections.append(obj)
|
|
170
172
|
|
|
171
|
-
if
|
|
173
|
+
if errors:
|
|
172
174
|
errorsString = "\n - ".join(errors)
|
|
173
|
-
raise Exception(f"
|
|
174
|
-
return detections
|
|
175
|
-
|
|
175
|
+
raise Exception(f"The following errors were encountered while getting selected detections to test:\n - {errorsString}")
|
|
176
|
+
return detections
|
|
@@ -3,7 +3,7 @@ contentctl/actions/build.py,sha256=mGm1F8jWdj547uJVSEWZBZcEyjoO4QpPKWhJOpRwR94,5
|
|
|
3
3
|
contentctl/actions/convert.py,sha256=0KBWLxvP1hSPXpExePqpOQPRvlQLamvPLyQqeTIWNbk,704
|
|
4
4
|
contentctl/actions/deploy_acs.py,sha256=mf3uk495H1EU_LNN-TiOsYCo18HMGoEBMb6ojeTr0zw,1418
|
|
5
5
|
contentctl/actions/detection_testing/DetectionTestingManager.py,sha256=zg8JasDjCpSC-yhseEyUwO8qbDJIUJbhlus9Li9ZAnA,8818
|
|
6
|
-
contentctl/actions/detection_testing/GitService.py,sha256=
|
|
6
|
+
contentctl/actions/detection_testing/GitService.py,sha256=W1vnDDt8JvIL7Z1Lve3D3RS7h8qwMxrW0BMXVGuDZDM,9007
|
|
7
7
|
contentctl/actions/detection_testing/generate_detection_coverage_badge.py,sha256=N5mznaeErVak3mOBwsd0RDBFJO3bku0EZvpayCyU-uk,2259
|
|
8
8
|
contentctl/actions/detection_testing/infrastructures/DetectionTestingInfrastructure.py,sha256=VFhSHdw_0N6ol668hDkaj7yFjPsZqBoFNC8FKzWKICc,53141
|
|
9
9
|
contentctl/actions/detection_testing/infrastructures/DetectionTestingInfrastructureContainer.py,sha256=HVGWCXy0GQeBqu2cVJn5H-I8GY8rwgkkc53ilO1TfZA,6846
|
|
@@ -165,8 +165,8 @@ contentctl/templates/detections/web/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
|
165
165
|
contentctl/templates/macros/security_content_ctime.yml,sha256=Gg1YNllHVsX_YB716H1SJLWzxXZEfuJlnsgB2fuyoHU,159
|
|
166
166
|
contentctl/templates/macros/security_content_summariesonly.yml,sha256=9BYUxAl2E4Nwh8K19F3AJS8Ka7ceO6ZDBjFiO3l3LY0,162
|
|
167
167
|
contentctl/templates/stories/cobalt_strike.yml,sha256=rlaXxMN-5k8LnKBLPafBoksyMtlmsPMHPJOjTiMiZ-M,3063
|
|
168
|
-
contentctl-4.2.
|
|
169
|
-
contentctl-4.2.
|
|
170
|
-
contentctl-4.2.
|
|
171
|
-
contentctl-4.2.
|
|
172
|
-
contentctl-4.2.
|
|
168
|
+
contentctl-4.2.1.dist-info/LICENSE.md,sha256=hQWUayRk-pAiOZbZnuy8djmoZkjKBx8MrCFpW-JiOgo,11344
|
|
169
|
+
contentctl-4.2.1.dist-info/METADATA,sha256=3S_M3w5I3jpYqd6NtoqTdkxWXWh5HaJ4ut9QLmNtO7k,19706
|
|
170
|
+
contentctl-4.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
171
|
+
contentctl-4.2.1.dist-info/entry_points.txt,sha256=5bjZ2NkbQfSwK47uOnA77yCtjgXhvgxnmCQiynRF_-U,57
|
|
172
|
+
contentctl-4.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|