mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
fix(iam): handle no display name error in service account (#2176)
This commit is contained in:
@@ -12,7 +12,7 @@ class iam_sa_no_administrative_privileges(Check):
|
||||
report = Check_Report_GCP(self.metadata())
|
||||
report.project_id = iam_client.project_id
|
||||
report.resource_id = account.email
|
||||
report.resource_name = account.display_name
|
||||
report.resource_name = account.name
|
||||
report.location = iam_client.region
|
||||
report.status = "PASS"
|
||||
report.status_extended = (
|
||||
|
||||
@@ -9,7 +9,7 @@ class iam_sa_no_user_managed_keys(Check):
|
||||
report = Check_Report_GCP(self.metadata())
|
||||
report.project_id = iam_client.project_id
|
||||
report.resource_id = account.email
|
||||
report.resource_name = account.display_name
|
||||
report.resource_name = account.name
|
||||
report.location = iam_client.region
|
||||
report.status = "PASS"
|
||||
report.status_extended = (
|
||||
|
||||
@@ -36,7 +36,7 @@ class IAM:
|
||||
ServiceAccount(
|
||||
name=account["name"],
|
||||
email=account["email"],
|
||||
display_name=account["displayName"],
|
||||
display_name=account.get("displayName", ""),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user