mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-11 15:25:10 +00:00
chore(security hub): improve securityhub_enabled check logic (#1851)
Co-authored-by: sergargar <sergargar@users.noreply.github.com>
This commit is contained in:
@@ -30,6 +30,12 @@ def mock_make_api_call(self, operation_name, kwarg):
|
||||
},
|
||||
]
|
||||
}
|
||||
if operation_name == "ListEnabledProductsForImport":
|
||||
return {
|
||||
"ProductSubscriptions": [
|
||||
"arn:aws:securityhub:us-east-1:0123456789012:product-subscription/prowler/prowler",
|
||||
]
|
||||
}
|
||||
if operation_name == "DescribeHub":
|
||||
return {
|
||||
"HubArn": "arn:aws:securityhub:us-east-1:0123456789012:hub/default",
|
||||
@@ -74,4 +80,5 @@ class Test_SecurityHub_Service:
|
||||
== "arn:aws:securityhub:us-east-1:0123456789012:hub/default"
|
||||
)
|
||||
assert securityhub.securityhubs[0].id == "default"
|
||||
assert securityhub.securityhubs[0].standards == " cis-aws-foundations-benchmark"
|
||||
assert securityhub.securityhubs[0].standards == "cis-aws-foundations-benchmark "
|
||||
assert securityhub.securityhubs[0].integrations == "prowler "
|
||||
|
||||
Reference in New Issue
Block a user