Back to Checks
openai

OpenAI organization has a limited number of owners

organization_owners_limited
Service: organizationSeverity: medium
OfficialVerifiedPrivate
Categories:gen-aiidentity-access
Resource Type:OpenAIOrganization

The number of organization members with the owner role is checked against max_organization_owners (default 3).

Prowler logoProwlerprowler-provider-openai

Risk

Every owner can change billing, data controls, keys and members. Each extra owner is another account whose compromise hands over the whole organization.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler openai --checks organization_owners_limited

Recommendation

Change members who do not need full control to the reader role, or to a narrower custom role.

Remediation

CLI

curl -X POST https://api.openai.com/v1/organization/users/<user_id> -H "Authorization: Bearer $OPENAI_ADMIN_KEY" -H "Content-Type: application/json" -d '{"role": "reader"}'

Check Code

from prowler.lib.check.models import Check

from prowler_provider_openai.check_report import finding
from prowler_provider_openai.services.organization.organization_client import (
    organization_client,
)


class organization_owners_limited(Check):
    def execute(self):
        users = organization_client.users
        if users is None:
            return []
        limit = organization_client.audit_config.get("max_organization_owners", 3)
        owners = [u.get("email") or u.get("name") or u.get("id", "") for u in users if u.get("role") == "owner"]
        org = organization_client.resource["name"]
        passed = len(owners) <= limit
        text = f"Organization {org} has {len(owners)} owners"
        text += "." if passed else f", more than {limit}: {', '.join(owners)}."
        return [finding(self.metadata(), organization_client.resource, passed, text)]