Skip to content

Commit

Permalink
fix(gcp): use session credentials to check if API is active (#5935)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCloudSec authored Nov 27, 2024
1 parent 17a39f3 commit 4ba1c02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion prowler/providers/gcp/lib/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def __is_api_active__(self, audited_project_ids):
project_ids = []
for project_id in audited_project_ids:
try:
client = discovery.build("serviceusage", "v1")
client = discovery.build(
"serviceusage", "v1", credentials=self.credentials
)
request = client.services().get(
name=f"projects/{project_id}/services/{self.service}.googleapis.com"
)
Expand Down

0 comments on commit 4ba1c02

Please # to comment.