prelude-sdk 2.6.32__py3-none-any.whl → 2.6.34__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/scm_controller.py +69 -0
- prelude_sdk/models/codes.py +90 -0
- {prelude_sdk-2.6.32.dist-info → prelude_sdk-2.6.34.dist-info}/METADATA +1 -1
- {prelude_sdk-2.6.32.dist-info → prelude_sdk-2.6.34.dist-info}/RECORD +7 -7
- {prelude_sdk-2.6.32.dist-info → prelude_sdk-2.6.34.dist-info}/WHEEL +0 -0
- {prelude_sdk-2.6.32.dist-info → prelude_sdk-2.6.34.dist-info}/licenses/LICENSE +0 -0
- {prelude_sdk-2.6.32.dist-info → prelude_sdk-2.6.34.dist-info}/top_level.txt +0 -0
|
@@ -593,3 +593,72 @@ class ScmController(HttpController):
|
|
|
593
593
|
],
|
|
594
594
|
)
|
|
595
595
|
return history
|
|
596
|
+
|
|
597
|
+
@verify_credentials
|
|
598
|
+
def get_report(self, report_id: str):
|
|
599
|
+
"""Get SCM report by ID"""
|
|
600
|
+
res = self.get(
|
|
601
|
+
f"{self.account.hq}/scm/reports/{report_id}",
|
|
602
|
+
headers=self.account.headers,
|
|
603
|
+
timeout=10,
|
|
604
|
+
)
|
|
605
|
+
return res.json()
|
|
606
|
+
|
|
607
|
+
@verify_credentials
|
|
608
|
+
def list_reports(self):
|
|
609
|
+
"""List SCM reports"""
|
|
610
|
+
res = self.get(
|
|
611
|
+
f"{self.account.hq}/scm/reports",
|
|
612
|
+
headers=self.account.headers,
|
|
613
|
+
timeout=10,
|
|
614
|
+
)
|
|
615
|
+
return res.json()
|
|
616
|
+
|
|
617
|
+
@verify_credentials
|
|
618
|
+
def delete_report(self, report_id: str):
|
|
619
|
+
"""Delete SCM report by ID"""
|
|
620
|
+
res = self.delete(
|
|
621
|
+
f"{self.account.hq}/scm/reports/{report_id}",
|
|
622
|
+
headers=self.account.headers,
|
|
623
|
+
timeout=10,
|
|
624
|
+
)
|
|
625
|
+
return res.json()
|
|
626
|
+
|
|
627
|
+
@verify_credentials
|
|
628
|
+
def put_report(self, report_data: dict, report_id: str = None):
|
|
629
|
+
"""Put SCM report by ID"""
|
|
630
|
+
res = self.put(
|
|
631
|
+
f"{self.account.hq}/scm/reports",
|
|
632
|
+
headers=self.account.headers,
|
|
633
|
+
json=dict(report=report_data, id=report_id),
|
|
634
|
+
timeout=10,
|
|
635
|
+
)
|
|
636
|
+
return res.json()
|
|
637
|
+
|
|
638
|
+
@verify_credentials
|
|
639
|
+
def get_chart_data(
|
|
640
|
+
self,
|
|
641
|
+
scm_category: SCMCategory,
|
|
642
|
+
sort_by: str,
|
|
643
|
+
group_by: str,
|
|
644
|
+
group_limit: int,
|
|
645
|
+
scopes: str = None,
|
|
646
|
+
filter: str = None,
|
|
647
|
+
):
|
|
648
|
+
"""Get SCM chart data"""
|
|
649
|
+
params = {
|
|
650
|
+
"scm_category": scm_category.name,
|
|
651
|
+
"sort_by": sort_by,
|
|
652
|
+
"group_by": group_by,
|
|
653
|
+
"group_limit": group_limit,
|
|
654
|
+
"scopes": scopes,
|
|
655
|
+
}
|
|
656
|
+
if filter:
|
|
657
|
+
params["$filter"] = filter
|
|
658
|
+
res = self.get(
|
|
659
|
+
f"{self.account.hq}/scm/chart_data",
|
|
660
|
+
headers=self.account.headers,
|
|
661
|
+
params=params,
|
|
662
|
+
timeout=30,
|
|
663
|
+
)
|
|
664
|
+
return res.json()
|
prelude_sdk/models/codes.py
CHANGED
|
@@ -236,6 +236,68 @@ class Control(Enum, metaclass=MissingItem):
|
|
|
236
236
|
case _:
|
|
237
237
|
return []
|
|
238
238
|
|
|
239
|
+
@property
|
|
240
|
+
def display_name(self):
|
|
241
|
+
match self:
|
|
242
|
+
case Control.CROWDSTRIKE:
|
|
243
|
+
return "CrowdStrike"
|
|
244
|
+
case Control.DEFENDER:
|
|
245
|
+
return "Microsoft Defender"
|
|
246
|
+
case Control.SPLUNK:
|
|
247
|
+
return "Splunk"
|
|
248
|
+
case Control.SENTINELONE:
|
|
249
|
+
return "SentinelOne"
|
|
250
|
+
case Control.VECTR:
|
|
251
|
+
return "VECTR"
|
|
252
|
+
case Control.S3:
|
|
253
|
+
return "Amazon S3"
|
|
254
|
+
case Control.INTUNE:
|
|
255
|
+
return "Microsoft Intune"
|
|
256
|
+
case Control.SERVICENOW:
|
|
257
|
+
return "ServiceNow"
|
|
258
|
+
case Control.OKTA:
|
|
259
|
+
return "Okta"
|
|
260
|
+
case Control.M365:
|
|
261
|
+
return "Microsoft 365"
|
|
262
|
+
case Control.ENTRA:
|
|
263
|
+
return "Microsoft Entra ID"
|
|
264
|
+
case Control.JAMF:
|
|
265
|
+
return "Jamf"
|
|
266
|
+
case Control.GMAIL:
|
|
267
|
+
return "Gmail"
|
|
268
|
+
case Control.GOOGLE_IDENTITY:
|
|
269
|
+
return "Google Cloud Identity Platform"
|
|
270
|
+
case Control.DEFENDER_DISCOVERY:
|
|
271
|
+
return "Microsoft Defender Discovery"
|
|
272
|
+
case Control.TENABLE:
|
|
273
|
+
return "Tenable"
|
|
274
|
+
case Control.EC2:
|
|
275
|
+
return "Amazon EC2"
|
|
276
|
+
case Control.AWS_SSM:
|
|
277
|
+
return "Amazon SSM"
|
|
278
|
+
case Control.AZURE_VM:
|
|
279
|
+
return "Azure VM"
|
|
280
|
+
case Control.GITHUB:
|
|
281
|
+
return "GitHub"
|
|
282
|
+
case Control.TENABLE_DISCOVERY:
|
|
283
|
+
return "Tenable Discovery"
|
|
284
|
+
case Control.QUALYS:
|
|
285
|
+
return "Qualys"
|
|
286
|
+
case Control.QUALYS_DISCOVERY:
|
|
287
|
+
return "Qualys Discovery"
|
|
288
|
+
case Control.RAPID7:
|
|
289
|
+
return "Rapid7"
|
|
290
|
+
case Control.RAPID7_DISCOVERY:
|
|
291
|
+
return "Rapid7 Discovery"
|
|
292
|
+
case Control.INTEL_INTUNE:
|
|
293
|
+
return "Intel"
|
|
294
|
+
case Control.CISCO_MERAKI:
|
|
295
|
+
return "Cisco Meraki"
|
|
296
|
+
case Control.CISCO_MERAKI_IDENTITY:
|
|
297
|
+
return "Cisco Meraki Identity"
|
|
298
|
+
case _:
|
|
299
|
+
return "Unknown Control"
|
|
300
|
+
|
|
239
301
|
|
|
240
302
|
class ControlCategory(Enum, metaclass=MissingItem):
|
|
241
303
|
INVALID = -1
|
|
@@ -308,6 +370,34 @@ class ControlCategory(Enum, metaclass=MissingItem):
|
|
|
308
370
|
],
|
|
309
371
|
}
|
|
310
372
|
|
|
373
|
+
@property
|
|
374
|
+
def display_name(self):
|
|
375
|
+
match self:
|
|
376
|
+
case ControlCategory.CLOUD:
|
|
377
|
+
return "Cloud"
|
|
378
|
+
case ControlCategory.EMAIL:
|
|
379
|
+
return "Email"
|
|
380
|
+
case ControlCategory.IDENTITY:
|
|
381
|
+
return "Identity Provider"
|
|
382
|
+
case ControlCategory.NETWORK:
|
|
383
|
+
return "Network"
|
|
384
|
+
case ControlCategory.XDR:
|
|
385
|
+
return "EDR"
|
|
386
|
+
case ControlCategory.ASSET_MANAGER:
|
|
387
|
+
return "Endpoint Management"
|
|
388
|
+
case ControlCategory.DISCOVERED_DEVICES:
|
|
389
|
+
return "Discovered Devices"
|
|
390
|
+
case ControlCategory.VULN_MANAGER:
|
|
391
|
+
return "Vulnerability Management"
|
|
392
|
+
case ControlCategory.SIEM:
|
|
393
|
+
return "SIEM"
|
|
394
|
+
case ControlCategory.PRIVATE_REPO:
|
|
395
|
+
return "Private Repository"
|
|
396
|
+
case ControlCategory.HARDWARE:
|
|
397
|
+
return "Client Hardware Security"
|
|
398
|
+
case _:
|
|
399
|
+
return "Unknown Control Category"
|
|
400
|
+
|
|
311
401
|
|
|
312
402
|
class SCMCategory(Enum, metaclass=MissingItem):
|
|
313
403
|
INVALID = -1
|
|
@@ -9,12 +9,12 @@ prelude_sdk/controllers/iam_controller.py,sha256=Ya5jg7F6t3cAYzanTlBQfthkVV081aV
|
|
|
9
9
|
prelude_sdk/controllers/jobs_controller.py,sha256=TECogrNcbW4uY5uDIDndAwxGHSA7RLnFZWmeXhvAHSM,1150
|
|
10
10
|
prelude_sdk/controllers/partner_controller.py,sha256=63P7d7fwVc1iWIUMxQv5PQOQ-e-VIpDql9HYNtLOZNo,4742
|
|
11
11
|
prelude_sdk/controllers/probe_controller.py,sha256=rwBnqkFJa1KuVwZMluM-pfo8bhQFB6JKSRSeK7s-kew,406
|
|
12
|
-
prelude_sdk/controllers/scm_controller.py,sha256=
|
|
12
|
+
prelude_sdk/controllers/scm_controller.py,sha256=tivAboJLmS0ztdZnyMD70fsOC5mRxz4FfqXf7iHQydw,20231
|
|
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=owX-h3DNEU9buAQ8u4_GhgINOIgPNAG01o8E7eyZLuU,18672
|
|
16
|
+
prelude_sdk-2.6.34.dist-info/licenses/LICENSE,sha256=ttdT5omfN6LNmtQoIjUhkkFhz6i44SDMRNwKrbfyTf8,1069
|
|
17
|
+
prelude_sdk-2.6.34.dist-info/METADATA,sha256=UGE_rQSeBIp5_WA0pCyul2KPpYudr2OkDPtNh9cOLoI,1187
|
|
18
|
+
prelude_sdk-2.6.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
prelude_sdk-2.6.34.dist-info/top_level.txt,sha256=6O7C8nl-yK7FsVpsPaka_GV8PYy2uvAJtus8Tlzw4dE,12
|
|
20
|
+
prelude_sdk-2.6.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|