prelude-sdk 2.6.40__py3-none-any.whl → 2.6.42__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.
- prelude_sdk/controllers/build_controller.py +35 -18
- prelude_sdk/models/codes.py +20 -15
- {prelude_sdk-2.6.40.dist-info → prelude_sdk-2.6.42.dist-info}/METADATA +1 -1
- {prelude_sdk-2.6.40.dist-info → prelude_sdk-2.6.42.dist-info}/RECORD +7 -7
- {prelude_sdk-2.6.40.dist-info → prelude_sdk-2.6.42.dist-info}/WHEEL +1 -1
- {prelude_sdk-2.6.40.dist-info → prelude_sdk-2.6.42.dist-info}/licenses/LICENSE +0 -0
- {prelude_sdk-2.6.40.dist-info → prelude_sdk-2.6.42.dist-info}/top_level.txt +0 -0
|
@@ -19,9 +19,11 @@ class BuildController(HttpController):
|
|
|
19
19
|
return res.json()
|
|
20
20
|
|
|
21
21
|
@verify_credentials
|
|
22
|
-
def create_test(self, name, unit, technique=None, test_id=None):
|
|
22
|
+
def create_test(self, name, unit, schedulable=None, technique=None, test_id=None):
|
|
23
23
|
"""Create or update a test"""
|
|
24
24
|
body = dict(name=name, unit=unit)
|
|
25
|
+
if schedulable is not None:
|
|
26
|
+
body["schedulable"] = schedulable
|
|
25
27
|
if technique:
|
|
26
28
|
body["technique"] = technique
|
|
27
29
|
if test_id:
|
|
@@ -34,10 +36,11 @@ class BuildController(HttpController):
|
|
|
34
36
|
def update_test(
|
|
35
37
|
self,
|
|
36
38
|
test_id,
|
|
39
|
+
crowdstrike_expected_outcome: EDRResponse = None,
|
|
37
40
|
name=None,
|
|
38
|
-
|
|
41
|
+
schedulable=None,
|
|
39
42
|
technique=None,
|
|
40
|
-
|
|
43
|
+
unit=None,
|
|
41
44
|
):
|
|
42
45
|
"""Update a test"""
|
|
43
46
|
body = dict()
|
|
@@ -45,10 +48,12 @@ class BuildController(HttpController):
|
|
|
45
48
|
body["expected"] = dict(crowdstrike=crowdstrike_expected_outcome.value)
|
|
46
49
|
if name:
|
|
47
50
|
body["name"] = name
|
|
48
|
-
if
|
|
49
|
-
body["
|
|
51
|
+
if schedulable is not None:
|
|
52
|
+
body["schedulable"] = schedulable
|
|
50
53
|
if technique is not None:
|
|
51
54
|
body["technique"] = technique
|
|
55
|
+
if unit:
|
|
56
|
+
body["unit"] = unit
|
|
52
57
|
|
|
53
58
|
res = self.post(f"{self.account.hq}/build/tests/{test_id}", json=body)
|
|
54
59
|
return res.json()
|
|
@@ -70,8 +75,8 @@ class BuildController(HttpController):
|
|
|
70
75
|
@verify_credentials
|
|
71
76
|
def upload(self, test_id, filename, data, skip_compile=False):
|
|
72
77
|
"""Upload a test or attachment"""
|
|
73
|
-
if len(data) >
|
|
74
|
-
raise ValueError(f"File size must be under
|
|
78
|
+
if len(data) > 3145728:
|
|
79
|
+
raise ValueError(f"File size must be under 3MB ({filename})")
|
|
75
80
|
|
|
76
81
|
h = self.account.headers | {"Content-Type": "application/octet-stream"}
|
|
77
82
|
query_params = ""
|
|
@@ -101,18 +106,27 @@ class BuildController(HttpController):
|
|
|
101
106
|
|
|
102
107
|
@verify_credentials
|
|
103
108
|
def create_threat(
|
|
104
|
-
self,
|
|
109
|
+
self,
|
|
110
|
+
name,
|
|
111
|
+
published,
|
|
112
|
+
schedulable=None,
|
|
113
|
+
source=None,
|
|
114
|
+
source_id=None,
|
|
115
|
+
tests=None,
|
|
116
|
+
threat_id=None,
|
|
105
117
|
):
|
|
106
118
|
"""Create a threat"""
|
|
107
119
|
body = dict(name=name, published=published)
|
|
108
|
-
if
|
|
109
|
-
body["
|
|
110
|
-
if source_id:
|
|
111
|
-
body["source_id"] = source_id
|
|
120
|
+
if schedulable is not None:
|
|
121
|
+
body["schedulable"] = schedulable
|
|
112
122
|
if source:
|
|
113
123
|
body["source"] = source
|
|
124
|
+
if source_id:
|
|
125
|
+
body["source_id"] = source_id
|
|
114
126
|
if tests:
|
|
115
127
|
body["tests"] = tests
|
|
128
|
+
if threat_id:
|
|
129
|
+
body["id"] = threat_id
|
|
116
130
|
|
|
117
131
|
res = self.post(f"{self.account.hq}/build/threats", json=body)
|
|
118
132
|
return res.json()
|
|
@@ -122,21 +136,24 @@ class BuildController(HttpController):
|
|
|
122
136
|
self,
|
|
123
137
|
threat_id,
|
|
124
138
|
name=None,
|
|
125
|
-
source_id=None,
|
|
126
|
-
source=None,
|
|
127
139
|
published=None,
|
|
140
|
+
schedulable=None,
|
|
141
|
+
source=None,
|
|
142
|
+
source_id=None,
|
|
128
143
|
tests=None,
|
|
129
144
|
):
|
|
130
145
|
"""Update a threat"""
|
|
131
146
|
body = dict()
|
|
132
147
|
if name:
|
|
133
148
|
body["name"] = name
|
|
134
|
-
if source_id is not None:
|
|
135
|
-
body["source_id"] = source_id
|
|
136
|
-
if source is not None:
|
|
137
|
-
body["source"] = source
|
|
138
149
|
if published is not None:
|
|
139
150
|
body["published"] = published
|
|
151
|
+
if schedulable is not None:
|
|
152
|
+
body["schedulable"] = schedulable
|
|
153
|
+
if source is not None:
|
|
154
|
+
body["source"] = source
|
|
155
|
+
if source_id is not None:
|
|
156
|
+
body["source_id"] = source_id
|
|
140
157
|
if tests is not None:
|
|
141
158
|
body["tests"] = tests
|
|
142
159
|
|
prelude_sdk/models/codes.py
CHANGED
|
@@ -190,6 +190,7 @@ class Control(Enum, metaclass=MissingItem):
|
|
|
190
190
|
CISCO_MERAKI_IDENTITY = 30
|
|
191
191
|
CROWDSTRIKE_VULN = 31
|
|
192
192
|
DEFENDER_VULN = 32
|
|
193
|
+
NETSKOPE = 33
|
|
193
194
|
|
|
194
195
|
@classmethod
|
|
195
196
|
def _missing_(cls, value):
|
|
@@ -302,6 +303,8 @@ class Control(Enum, metaclass=MissingItem):
|
|
|
302
303
|
return "CrowdStrike Vulnerability Management"
|
|
303
304
|
case Control.DEFENDER_VULN:
|
|
304
305
|
return "Microsoft Defender Vulnerability Management"
|
|
306
|
+
case Control.NETSKOPE:
|
|
307
|
+
return "Netskope"
|
|
305
308
|
case _:
|
|
306
309
|
return "Unknown Control"
|
|
307
310
|
|
|
@@ -320,6 +323,7 @@ class ControlCategory(Enum, metaclass=MissingItem):
|
|
|
320
323
|
SIEM = 9
|
|
321
324
|
PRIVATE_REPO = 10
|
|
322
325
|
HARDWARE = 11
|
|
326
|
+
SASE = 12
|
|
323
327
|
|
|
324
328
|
@classmethod
|
|
325
329
|
def _missing_(cls, value):
|
|
@@ -343,13 +347,8 @@ class ControlCategory(Enum, metaclass=MissingItem):
|
|
|
343
347
|
Control.SERVICENOW,
|
|
344
348
|
Control.TENABLE_DISCOVERY,
|
|
345
349
|
],
|
|
346
|
-
ControlCategory.EMAIL: [
|
|
347
|
-
|
|
348
|
-
Control.M365,
|
|
349
|
-
],
|
|
350
|
-
ControlCategory.HARDWARE: [
|
|
351
|
-
Control.INTEL_INTUNE,
|
|
352
|
-
],
|
|
350
|
+
ControlCategory.EMAIL: [Control.GMAIL, Control.M365],
|
|
351
|
+
ControlCategory.HARDWARE: [Control.INTEL_INTUNE],
|
|
353
352
|
ControlCategory.IDENTITY: [
|
|
354
353
|
Control.CISCO_MERAKI_IDENTITY,
|
|
355
354
|
Control.ENTRA,
|
|
@@ -357,14 +356,9 @@ class ControlCategory(Enum, metaclass=MissingItem):
|
|
|
357
356
|
Control.OKTA,
|
|
358
357
|
],
|
|
359
358
|
ControlCategory.NETWORK: [Control.CISCO_MERAKI],
|
|
360
|
-
ControlCategory.PRIVATE_REPO: [
|
|
361
|
-
|
|
362
|
-
],
|
|
363
|
-
ControlCategory.SIEM: [
|
|
364
|
-
Control.S3,
|
|
365
|
-
Control.SPLUNK,
|
|
366
|
-
Control.VECTR,
|
|
367
|
-
],
|
|
359
|
+
ControlCategory.PRIVATE_REPO: [Control.GITHUB],
|
|
360
|
+
ControlCategory.SASE: [Control.NETSKOPE],
|
|
361
|
+
ControlCategory.SIEM: [Control.S3, Control.SPLUNK, Control.VECTR],
|
|
368
362
|
ControlCategory.VULN_MANAGER: [
|
|
369
363
|
Control.CROWDSTRIKE_VULN,
|
|
370
364
|
Control.DEFENDER_VULN,
|
|
@@ -404,6 +398,8 @@ class ControlCategory(Enum, metaclass=MissingItem):
|
|
|
404
398
|
return "Private Repository"
|
|
405
399
|
case ControlCategory.HARDWARE:
|
|
406
400
|
return "Client Hardware Security"
|
|
401
|
+
case ControlCategory.SASE:
|
|
402
|
+
return "Secure Access Service Edge"
|
|
407
403
|
case _:
|
|
408
404
|
return "Unknown Control Category"
|
|
409
405
|
|
|
@@ -435,6 +431,7 @@ class SCMCategory(Enum, metaclass=MissingItem):
|
|
|
435
431
|
Control.INTEL_INTUNE,
|
|
436
432
|
Control.INTUNE,
|
|
437
433
|
Control.JAMF,
|
|
434
|
+
Control.NETSKOPE,
|
|
438
435
|
Control.QUALYS,
|
|
439
436
|
Control.QUALYS_DISCOVERY,
|
|
440
437
|
Control.RAPID7,
|
|
@@ -466,6 +463,7 @@ class SCMCategory(Enum, metaclass=MissingItem):
|
|
|
466
463
|
ControlCategory.ASSET_MANAGER,
|
|
467
464
|
ControlCategory.DISCOVERED_DEVICES,
|
|
468
465
|
ControlCategory.HARDWARE,
|
|
466
|
+
ControlCategory.SASE,
|
|
469
467
|
ControlCategory.VULN_MANAGER,
|
|
470
468
|
ControlCategory.XDR,
|
|
471
469
|
],
|
|
@@ -524,6 +522,8 @@ class PartnerEvents(Enum, metaclass=MissingItem):
|
|
|
524
522
|
NO_DEVICE_COMPLIANCE_POLICY = 22
|
|
525
523
|
NONCOMPLIANT = 23
|
|
526
524
|
NO_ASR_POLICY = 24
|
|
525
|
+
MISSING_SASE = 25
|
|
526
|
+
OUT_OF_DATE_VERSION = 26
|
|
527
527
|
|
|
528
528
|
@classmethod
|
|
529
529
|
def _missing_(cls, value):
|
|
@@ -541,6 +541,7 @@ class PartnerEvents(Enum, metaclass=MissingItem):
|
|
|
541
541
|
PartnerEvents.MISSING_ASSET_MANAGER: [ControlCategory.ASSET_MANAGER],
|
|
542
542
|
PartnerEvents.MISSING_EDR: [ControlCategory.XDR],
|
|
543
543
|
PartnerEvents.MISSING_MFA: [ControlCategory.IDENTITY],
|
|
544
|
+
PartnerEvents.MISSING_SASE: [ControlCategory.SASE],
|
|
544
545
|
PartnerEvents.MISSING_SERVER_MANAGER: [ControlCategory.ASSET_MANAGER],
|
|
545
546
|
PartnerEvents.MISSING_VULN_MANAGER: [ControlCategory.VULN_MANAGER],
|
|
546
547
|
PartnerEvents.MISSING_VULN_SCAN: [ControlCategory.VULN_MANAGER],
|
|
@@ -563,6 +564,7 @@ class PartnerEvents(Enum, metaclass=MissingItem):
|
|
|
563
564
|
PartnerEvents.NO_REGISTERED_DEVICES: [ControlCategory.IDENTITY],
|
|
564
565
|
PartnerEvents.NONCOMPLIANT: [ControlCategory.ASSET_MANAGER],
|
|
565
566
|
PartnerEvents.OUT_OF_DATE_FIRMWARE: [ControlCategory.NETWORK],
|
|
567
|
+
PartnerEvents.OUT_OF_DATE_VERSION: [ControlCategory.SASE],
|
|
566
568
|
PartnerEvents.OUT_OF_DATE_SCAN: [ControlCategory.VULN_MANAGER],
|
|
567
569
|
PartnerEvents.REDUCED_FUNCTIONALITY_MODE: [ControlCategory.XDR],
|
|
568
570
|
PartnerEvents.USER_MISSING_ASSET_MANAGER: [ControlCategory.IDENTITY],
|
|
@@ -596,6 +598,8 @@ class AlertTypes(Enum, metaclass=MissingItem):
|
|
|
596
598
|
NEW_NO_DEVICE_COMPLIANCE_POLICY_ENDPOINTS = 23
|
|
597
599
|
NEW_NONCOMPLIANT_ENDPOINTS = 24
|
|
598
600
|
NEW_NO_ASR_POLICY_ENDPOINTS = 25
|
|
601
|
+
NEW_MISSING_SASE_ENDPOINTS = 26
|
|
602
|
+
NEW_OUT_OF_DATE_VERSION_ENDPOINTS = 27
|
|
599
603
|
|
|
600
604
|
@classmethod
|
|
601
605
|
def _missing_(cls, value):
|
|
@@ -624,6 +628,7 @@ class PolicyType(Enum, metaclass=MissingItem):
|
|
|
624
628
|
INTEL_CHIP = 19
|
|
625
629
|
DISK_ENCRYPTION = 20
|
|
626
630
|
ASR = 21
|
|
631
|
+
SASE_CLIENT = 22
|
|
627
632
|
|
|
628
633
|
@classmethod
|
|
629
634
|
def _missing_(cls, value):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
prelude_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
prelude_sdk/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
prelude_sdk/controllers/build_controller.py,sha256=
|
|
3
|
+
prelude_sdk/controllers/build_controller.py,sha256=ub9YBRyW4V8rs3LyJwB9fY9dHJurtbDsBmGqDD7Bt5o,8013
|
|
4
4
|
prelude_sdk/controllers/detect_controller.py,sha256=SQO2cHHQFeqnFpdk68x_ctazKWYj5ttnzxUFX9af-bM,6409
|
|
5
5
|
prelude_sdk/controllers/export_controller.py,sha256=rITSEId7OE3xik5WK2W7BQlPyzoDt8zZ3fKY1vMaLys,741
|
|
6
6
|
prelude_sdk/controllers/generate_controller.py,sha256=LJm0XAsz_JqGQSNWxCKk3NXv_HnCWutb19-CxSh4bng,1175
|
|
@@ -12,9 +12,9 @@ prelude_sdk/controllers/probe_controller.py,sha256=Skdj3joA7C_H72LyIiAQYIX9D9-Kg
|
|
|
12
12
|
prelude_sdk/controllers/scm_controller.py,sha256=_uRiJgdXgD7Px5dwAXBspCRPjwznzAGuPwlORS92uy0,17541
|
|
13
13
|
prelude_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
prelude_sdk/models/account.py,sha256=dRKhX6_mrqDTyqyfIsvHFVavcedgZ5hZAIDYVF7YlZI,8962
|
|
15
|
-
prelude_sdk/models/codes.py,sha256=
|
|
16
|
-
prelude_sdk-2.6.
|
|
17
|
-
prelude_sdk-2.6.
|
|
18
|
-
prelude_sdk-2.6.
|
|
19
|
-
prelude_sdk-2.6.
|
|
20
|
-
prelude_sdk-2.6.
|
|
15
|
+
prelude_sdk/models/codes.py,sha256=zdusWseiIRupooHWboIFigNASYSwSKxw5Y-YI7n8tds,19777
|
|
16
|
+
prelude_sdk-2.6.42.dist-info/licenses/LICENSE,sha256=ttdT5omfN6LNmtQoIjUhkkFhz6i44SDMRNwKrbfyTf8,1069
|
|
17
|
+
prelude_sdk-2.6.42.dist-info/METADATA,sha256=W9ormB9l9YOckcM6Vmh2weJ8K1ZGPzbvLou4zQKJ9W8,1187
|
|
18
|
+
prelude_sdk-2.6.42.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
19
|
+
prelude_sdk-2.6.42.dist-info/top_level.txt,sha256=6O7C8nl-yK7FsVpsPaka_GV8PYy2uvAJtus8Tlzw4dE,12
|
|
20
|
+
prelude_sdk-2.6.42.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|