prelude-sdk 2.6.35__tar.gz → 2.6.37__tar.gz
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-2.6.35 → prelude_sdk-2.6.37}/PKG-INFO +1 -1
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/detect_controller.py +1 -1
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/iam_controller.py +9 -1
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/scm_controller.py +12 -10
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/models/codes.py +12 -3
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk.egg-info/PKG-INFO +1 -1
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/setup.cfg +1 -1
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_iam.py +3 -3
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_partner.py +18 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_scm.py +11 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/LICENSE +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/README.md +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/__init__.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/__init__.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/build_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/export_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/generate_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/http_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/jobs_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/partner_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/controllers/probe_controller.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/models/__init__.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk/models/account.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk.egg-info/SOURCES.txt +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk.egg-info/dependency_links.txt +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk.egg-info/requires.txt +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/prelude_sdk.egg-info/top_level.txt +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/pyproject.toml +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_build.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_detect.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_generate.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_probe.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/test_scm_build.py +0 -0
- {prelude_sdk-2.6.35 → prelude_sdk-2.6.37}/tests/testutils.py +0 -0
|
@@ -30,13 +30,21 @@ class IAMAccountController(HttpController):
|
|
|
30
30
|
return res.json()
|
|
31
31
|
|
|
32
32
|
@verify_credentials
|
|
33
|
-
def update_account(
|
|
33
|
+
def update_account(
|
|
34
|
+
self,
|
|
35
|
+
company: str = None,
|
|
36
|
+
inactivity_timeout: int = None,
|
|
37
|
+
mode: Mode = None,
|
|
38
|
+
slug: str = None,
|
|
39
|
+
):
|
|
34
40
|
"""Update properties on an account"""
|
|
35
41
|
body = dict()
|
|
36
42
|
if mode is not None:
|
|
37
43
|
body["mode"] = mode.name
|
|
38
44
|
if company is not None:
|
|
39
45
|
body["company"] = company
|
|
46
|
+
if inactivity_timeout is not None:
|
|
47
|
+
body["inactivity_timeout"] = inactivity_timeout
|
|
40
48
|
if slug is not None:
|
|
41
49
|
body["slug"] = slug
|
|
42
50
|
|
|
@@ -642,23 +642,25 @@ class ScmController(HttpController):
|
|
|
642
642
|
sort_by: str,
|
|
643
643
|
group_by: str,
|
|
644
644
|
group_limit: int,
|
|
645
|
-
|
|
646
|
-
|
|
645
|
+
display_overrides: dict = None,
|
|
646
|
+
odata_filter: str = None,
|
|
647
|
+
scopes: dict = None,
|
|
647
648
|
):
|
|
648
649
|
"""Get SCM chart data"""
|
|
649
|
-
|
|
650
|
-
"
|
|
651
|
-
"
|
|
650
|
+
body = {
|
|
651
|
+
"category": scm_category.name,
|
|
652
|
+
"display_overrides": display_overrides,
|
|
652
653
|
"group_by": group_by,
|
|
653
654
|
"group_limit": group_limit,
|
|
654
655
|
"scopes": scopes,
|
|
656
|
+
"sort_by": sort_by,
|
|
655
657
|
}
|
|
656
|
-
if
|
|
657
|
-
|
|
658
|
-
res = self.
|
|
659
|
-
f"{self.account.hq}/scm/
|
|
658
|
+
if odata_filter:
|
|
659
|
+
body["$filter"] = odata_filter
|
|
660
|
+
res = self.post(
|
|
661
|
+
f"{self.account.hq}/scm/reports/data",
|
|
660
662
|
headers=self.account.headers,
|
|
661
|
-
|
|
663
|
+
json=body,
|
|
662
664
|
timeout=30,
|
|
663
665
|
)
|
|
664
666
|
return res.json()
|
|
@@ -533,13 +533,22 @@ class PartnerEvents(Enum, metaclass=MissingItem):
|
|
|
533
533
|
PartnerEvents.MISSING_SERVER_MANAGER: [ControlCategory.ASSET_MANAGER],
|
|
534
534
|
PartnerEvents.MISSING_VULN_MANAGER: [ControlCategory.VULN_MANAGER],
|
|
535
535
|
PartnerEvents.MISSING_VULN_SCAN: [ControlCategory.VULN_MANAGER],
|
|
536
|
-
PartnerEvents.NO_ASR_POLICY: [
|
|
537
|
-
|
|
536
|
+
PartnerEvents.NO_ASR_POLICY: [
|
|
537
|
+
ControlCategory.ASSET_MANAGER,
|
|
538
|
+
ControlCategory.XDR,
|
|
539
|
+
],
|
|
540
|
+
PartnerEvents.NO_AV_POLICY: [
|
|
541
|
+
ControlCategory.ASSET_MANAGER,
|
|
542
|
+
ControlCategory.XDR,
|
|
543
|
+
],
|
|
538
544
|
PartnerEvents.NO_DEVICE_COMPLIANCE_POLICY: [ControlCategory.ASSET_MANAGER],
|
|
539
545
|
PartnerEvents.NO_DISK_ENCRYPTION: [ControlCategory.ASSET_MANAGER],
|
|
540
546
|
PartnerEvents.NO_DISK_ENCRYPTION_POLICY: [ControlCategory.ASSET_MANAGER],
|
|
541
547
|
PartnerEvents.NO_EDR_POLICY: [ControlCategory.XDR],
|
|
542
|
-
PartnerEvents.NO_HOST_FIREWALL_POLICY: [
|
|
548
|
+
PartnerEvents.NO_HOST_FIREWALL_POLICY: [
|
|
549
|
+
ControlCategory.ASSET_MANAGER,
|
|
550
|
+
ControlCategory.XDR,
|
|
551
|
+
],
|
|
543
552
|
PartnerEvents.NO_REGISTERED_DEVICES: [ControlCategory.IDENTITY],
|
|
544
553
|
PartnerEvents.NONCOMPLIANT: [ControlCategory.ASSET_MANAGER],
|
|
545
554
|
PartnerEvents.OUT_OF_DATE_FIRMWARE: [ControlCategory.NETWORK],
|
|
@@ -17,7 +17,7 @@ class TestIAM:
|
|
|
17
17
|
def setup_class(self):
|
|
18
18
|
self.iam_account = IAMAccountController(pytest.account)
|
|
19
19
|
self.iam_user = IAMUserController(pytest.account)
|
|
20
|
-
self.company = "prelude"
|
|
20
|
+
self.company = "prelude-sdk-qa"
|
|
21
21
|
self.service_user = "registration"
|
|
22
22
|
|
|
23
23
|
def test_get_account(self, unwrap):
|
|
@@ -29,7 +29,7 @@ class TestIAM:
|
|
|
29
29
|
res = unwrap(self.iam_user.list_accounts)(self.iam_user)
|
|
30
30
|
assert pytest.expected_account["account_id"] in [a["account_id"] for a in res]
|
|
31
31
|
|
|
32
|
-
def
|
|
32
|
+
def test_create_second_service_user(self, unwrap):
|
|
33
33
|
service_user = unwrap(self.iam_account.create_service_user)(
|
|
34
34
|
self.iam_account, name=self.service_user
|
|
35
35
|
)
|
|
@@ -56,7 +56,7 @@ class TestIAM:
|
|
|
56
56
|
diffs = check_dict_items(pytest.expected_account, res)
|
|
57
57
|
assert not diffs, json.dumps(diffs, indent=2)
|
|
58
58
|
|
|
59
|
-
def
|
|
59
|
+
def test_delete_second_service_user(self, unwrap):
|
|
60
60
|
unwrap(self.iam_account.delete_service_user)(
|
|
61
61
|
self.iam_account, handle=pytest.second_service_user_handle
|
|
62
62
|
)
|
|
@@ -498,3 +498,21 @@ class TestPartner:
|
|
|
498
498
|
assert res["pagination"]["offset"] == 0
|
|
499
499
|
assert res["pagination"]["total"] > 0
|
|
500
500
|
pytest.crowdstrike_advisory_id = res["advisories"][0]["id"]
|
|
501
|
+
|
|
502
|
+
def test_delete_endpoint(
|
|
503
|
+
self,
|
|
504
|
+
unwrap,
|
|
505
|
+
host,
|
|
506
|
+
edr_id,
|
|
507
|
+
control,
|
|
508
|
+
os,
|
|
509
|
+
platform,
|
|
510
|
+
policy,
|
|
511
|
+
policy_name,
|
|
512
|
+
webhook_keys,
|
|
513
|
+
group_id,
|
|
514
|
+
):
|
|
515
|
+
unwrap(self.detect.delete_endpoint)(self.detect, pytest.endpoint["endpoint_id"])
|
|
516
|
+
res = unwrap(self.detect.list_endpoints)(self.detect)
|
|
517
|
+
sorted_res = {r["serial_num"]: r for r in res}
|
|
518
|
+
assert pytest.endpoint["serial_num"] not in sorted_res
|
|
@@ -200,6 +200,17 @@ class TestScmPerControl:
|
|
|
200
200
|
"endpoint_count",
|
|
201
201
|
"success_count",
|
|
202
202
|
} == evaluation["policies"][0].keys()
|
|
203
|
+
elif control == Control.INTEL_INTUNE:
|
|
204
|
+
evaluation = _wait_for_policies(control, instance_id, "endpoint")
|
|
205
|
+
assert {
|
|
206
|
+
"active_count",
|
|
207
|
+
"excepted",
|
|
208
|
+
"id",
|
|
209
|
+
"name",
|
|
210
|
+
"not_supported_count",
|
|
211
|
+
"supported_count",
|
|
212
|
+
"techniques",
|
|
213
|
+
} == evaluation["policies"][0].keys()
|
|
203
214
|
else:
|
|
204
215
|
assert len(evaluation["policies"]) == 0
|
|
205
216
|
elif "user_evaluation" in evaluation:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|