mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 04:21:52 +00:00
fix(googleworkspace): use per-service resources for Directory (#11176)
This commit is contained in:
@@ -19,6 +19,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
- Google Workspace Directory checks sharing a single resource row, causing the service field to be overwritten by the last check executed [(#11176)](https://github.com/prowler-cloud/prowler/pull/11176)
|
||||
- Google Workspace Calendar and Drive services sharing a single resource row, causing the service field to be overwritten by the last check executed [(#11161)](https://github.com/prowler-cloud/prowler/pull/11161)
|
||||
- `zone_waf_enabled` check for Cloudflare provider now appends a plan-aware hint to the FAIL `status_extended`: a possible-false-positive note on paid plans (Pro, Business, Enterprise) where the legacy `waf` zone setting can read `off` even though WAF managed rulesets are deployed via the dashboard, and a "not available on the Cloudflare Free plan" note on Free zones [(#9896)](https://github.com/prowler-cloud/prowler/pull/9896)
|
||||
- Google Workspace Gmail checks sharing a single resource row, causing the service field to be overwritten by the last check executed [(#11169)](https://github.com/prowler-cloud/prowler/pull/11169)
|
||||
|
||||
+3
@@ -24,6 +24,9 @@ class directory_super_admin_count(Check):
|
||||
report = CheckReportGoogleWorkspace(
|
||||
metadata=self.metadata(),
|
||||
resource=directory_client.provider.domain_resource,
|
||||
resource_id="directoryUsers",
|
||||
resource_name="Directory Users",
|
||||
customer_id=directory_client.provider.identity.customer_id,
|
||||
)
|
||||
|
||||
if 2 <= admin_count <= 4:
|
||||
|
||||
+3
@@ -47,6 +47,9 @@ class directory_super_admin_only_admin_roles(Check):
|
||||
report = CheckReportGoogleWorkspace(
|
||||
metadata=self.metadata(),
|
||||
resource=directory_client.provider.domain_resource,
|
||||
resource_id="directoryUsers",
|
||||
resource_name="Directory Users",
|
||||
customer_id=directory_client.provider.identity.customer_id,
|
||||
)
|
||||
report.status = "PASS"
|
||||
report.status_extended = (
|
||||
|
||||
+2
-3
@@ -3,7 +3,6 @@ from unittest.mock import patch
|
||||
from prowler.providers.googleworkspace.services.directory.directory_service import User
|
||||
from tests.providers.googleworkspace.googleworkspace_fixtures import (
|
||||
CUSTOMER_ID,
|
||||
DOMAIN,
|
||||
set_mocked_googleworkspace_provider,
|
||||
)
|
||||
|
||||
@@ -54,8 +53,8 @@ class TestDirectorySuperAdminCount:
|
||||
assert findings[0].status == "PASS"
|
||||
assert "2 super administrator(s)" in findings[0].status_extended
|
||||
assert "within the recommended range" in findings[0].status_extended
|
||||
assert findings[0].resource_name == DOMAIN
|
||||
assert findings[0].resource_id == CUSTOMER_ID
|
||||
assert findings[0].resource_name == "Directory Users"
|
||||
assert findings[0].resource_id == "directoryUsers"
|
||||
assert findings[0].customer_id == CUSTOMER_ID
|
||||
assert findings[0].resource == mock_provider.domain_resource.dict()
|
||||
|
||||
|
||||
+2
-3
@@ -6,7 +6,6 @@ from prowler.providers.googleworkspace.services.directory.directory_service impo
|
||||
)
|
||||
from tests.providers.googleworkspace.googleworkspace_fixtures import (
|
||||
CUSTOMER_ID,
|
||||
DOMAIN,
|
||||
set_mocked_googleworkspace_provider,
|
||||
)
|
||||
|
||||
@@ -90,8 +89,8 @@ class TestDirectorySuperAdminOnlyAdminRoles:
|
||||
assert len(findings) == 1
|
||||
assert findings[0].status == "PASS"
|
||||
assert "used only for super admin activities" in findings[0].status_extended
|
||||
assert findings[0].resource_name == DOMAIN
|
||||
assert findings[0].resource_id == CUSTOMER_ID
|
||||
assert findings[0].resource_name == "Directory Users"
|
||||
assert findings[0].resource_id == "directoryUsers"
|
||||
assert findings[0].customer_id == CUSTOMER_ID
|
||||
assert findings[0].resource == mock_provider.domain_resource.dict()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user