turbot/github_compliance
GitHub

Query: org_minimum_administrators_set

Usage

steampipe query github_compliance.query.org_minimum_administrators_set

SQL

select
-- Required Columns
o.url as resource,
case
when count(m.login) < 2 then 'alarm'
else 'ok'
end as status,
case
when count(m.login) < 2 then m.organization || ' has less than 2 admins.'
else m.organization || ' has minimum required admins.'
end as reason,
-- Additional Dimensions
m.organization
from
github_organization_member m
join github_my_organization o on m.organization = o.login
where
role = 'ADMIN'
group by
role,
m.organization,
o.url;

Controls

The query is being used by the following controls: