turbot/steampipe-mod-azure-compliance

Control: 1.18 Ensure that 'Users can create security groups in Azure portals, API or PowerShell' is set to 'No'

Description

Restrict security group creation to administrators only.

When creating security groups is enabled, all users in the directory are allowed to create new security groups and add members to those groups. Unless a business requires this day-to-day delegation, security group creation should be restricted to administrators only.

Remediation

From Azure Portal

  1. From Azure Home select the Portal Menu.
  2. Select Microsoft Entra ID.
  3. Select Groups.
  4. Select General under Settings.
  5. Set Users can create security groups in Azure portals, API or PowerShell to No.

Default Value

By default, Users can create security groups in Azure portals, API or PowerShell is set to Yes.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cis_v210_1_18

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.cis_v210_1_18 --share

SQL

This control uses a named query:

with distinct_tenant as (
select
distinct tenant_id,
subscription_id,
_ctx
from
azure_tenant
)
select
a.id as resource,
case
when a.default_user_role_permissions ->> 'allowedToCreateSecurityGroups' = 'false' then 'ok'
else 'alarm'
end as status,
case
when a.default_user_role_permissions ->> 'allowedToCreateSecurityGroups' = 'false' then a.display_name || ' does not allow user to create security groups.'
else a.display_name || ' allows user to create security groups.'
end as reason,
t.tenant_id
from
distinct_tenant as t,
azuread_authorization_policy as a;

Tags