Back to Checks
Prowlerprowler-provider-chatgpt
Inactive ChatGPT workspace users do not keep owner or admin roles
workspace_inactive_admins_removed
Service: workspaceSeverity: high
OfficialVerifiedPrivate
Categories:gen-aiidentity-access
Resource Type:OpenAIWorkspaceUser
Each workspace owner and admin is checked for ChatGPT usage within admin_max_inactive_days (default and maximum 30), the closest signal to activity the API offers.
Risk
An unused privileged account is an unwatched one: if its credentials leak, it can change workspace settings and export data without anyone noticing.
Run this check with Prowler
Run in Prowler CloudRun
prowler chatgpt --checks workspace_inactive_admins_removedRecommendation
Remove the owner or admin role from users who no longer use the workspace.
Check Code
from prowler.lib.check.models import Check
from prowler_provider_chatgpt.check_report import finding
from prowler_provider_chatgpt.services.workspace.workspace_client import workspace_client
class workspace_inactive_admins_removed(Check):
def execute(self):
active = workspace_client.active_admin_ids
if active is None:
return []
days = workspace_client.max_inactive_days
findings = []
for admin in workspace_client.admins:
role = admin["role"]
if admin["id"] in active:
text = f"{role.capitalize()} {admin['name']} used ChatGPT in the last {days} days."
findings.append(finding(self.metadata(), admin, True, text))
else:
text = f"{role.capitalize()} {admin['name']} has not used ChatGPT in the last {days} days and keeps the {role} role."
findings.append(finding(self.metadata(), admin, False, text))
return findings