|
1 | 1 | import os |
2 | 2 | import sys |
3 | | -from pathlib import Path |
4 | 3 | from dataclasses import dataclass, field |
5 | | -from pydantic import ValidationError |
| 4 | +from pathlib import Path |
6 | 5 | from uuid import UUID |
7 | | -from contentctl.input.yml_reader import YmlReader |
8 | 6 |
|
9 | | -from contentctl.objects.detection import Detection |
10 | | -from contentctl.objects.story import Story |
| 7 | +from pydantic import ValidationError |
11 | 8 |
|
12 | | -from contentctl.objects.baseline import Baseline |
13 | | -from contentctl.objects.investigation import Investigation |
14 | | -from contentctl.objects.playbook import Playbook |
15 | | -from contentctl.objects.deployment import Deployment |
16 | | -from contentctl.objects.macro import Macro |
17 | | -from contentctl.objects.lookup import LookupAdapter, Lookup |
18 | | -from contentctl.objects.atomic import AtomicEnrichment |
19 | | -from contentctl.objects.security_content_object import SecurityContentObject |
20 | | -from contentctl.objects.data_source import DataSource |
21 | | -from contentctl.objects.dashboard import Dashboard |
22 | 9 | from contentctl.enrichments.attack_enrichment import AttackEnrichment |
23 | 10 | from contentctl.enrichments.cve_enrichment import CveEnrichment |
24 | | - |
| 11 | +from contentctl.helper.utils import Utils |
| 12 | +from contentctl.input.yml_reader import YmlReader |
| 13 | +from contentctl.objects.atomic import AtomicEnrichment |
| 14 | +from contentctl.objects.baseline import Baseline |
25 | 15 | from contentctl.objects.config import validate |
| 16 | +from contentctl.objects.dashboard import Dashboard |
| 17 | +from contentctl.objects.data_source import DataSource |
| 18 | +from contentctl.objects.deployment import Deployment |
| 19 | +from contentctl.objects.detection import Detection |
26 | 20 | from contentctl.objects.enums import SecurityContentType |
27 | | -from contentctl.helper.utils import Utils |
| 21 | +from contentctl.objects.investigation import Investigation |
| 22 | +from contentctl.objects.lookup import Lookup, LookupAdapter |
| 23 | +from contentctl.objects.macro import Macro |
| 24 | +from contentctl.objects.playbook import Playbook |
| 25 | +from contentctl.objects.security_content_object import SecurityContentObject |
| 26 | +from contentctl.objects.story import Story |
28 | 27 |
|
29 | 28 |
|
30 | 29 | @dataclass |
@@ -113,20 +112,6 @@ def execute(self, input_dto: validate) -> None: |
113 | 112 | self.createSecurityContent(SecurityContentType.detections) |
114 | 113 | self.createSecurityContent(SecurityContentType.dashboards) |
115 | 114 |
|
116 | | - from contentctl.objects.abstract_security_content_objects.detection_abstract import ( |
117 | | - MISSING_SOURCES, |
118 | | - ) |
119 | | - |
120 | | - if len(MISSING_SOURCES) > 0: |
121 | | - missing_sources_string = "\n 🟡 ".join(sorted(list(MISSING_SOURCES))) |
122 | | - print( |
123 | | - "WARNING: The following data_sources have been used in detections, but are not yet defined.\n" |
124 | | - "This is not yet an error since not all data_sources have been defined, but will be convered to an error soon:\n 🟡 " |
125 | | - f"{missing_sources_string}" |
126 | | - ) |
127 | | - else: |
128 | | - print("No missing data_sources!") |
129 | | - |
130 | 115 | def createSecurityContent(self, contentType: SecurityContentType) -> None: |
131 | 116 | if contentType in [ |
132 | 117 | SecurityContentType.deployments, |
|
0 commit comments