turbot/steampipe-mod-azure-compliance

Control: 2.12 Ensure Any of the ASC Default Policy Setting is Not Set to 'Disabled'

Description

None of the settings offered by ASC Default policy should be set to effect Disabled. A security policy defines the desired configuration of your workloads and helps ensure compliance with company or regulatory security requirements. ASC Default policy is associated with every subscription by default. ASC default policy assignment is set of security recommendations based on best practices.

Enabling recommendations in ASC default policy ensures that Azure security center provides ability to monitor all of the supported recommendations and allow automated action optionally for few of the supported recommendations.

Remediation

From Console

Perform the following action to check ASC Default policy is set to enabled:

  1. Navigate to Azure Policy
  2. On Policy "Overview" blade, Click on Policy ASC Default(<Subscription:Subscription_ID>)
  3. On "ASC Default" blade, Click on Edit Assignments
  4. In section PARAMETERS, configure the impacted setting to any other available value than Disabled or empty
  5. Click Save

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cis_v140_2_12

Snapshot and share results via Turbot Pipes:

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

SQL

This control uses a named query:

with policy_assignment_parameters as (
select
id,
name,
key,
parameters -> key ->> 'value' as value,
subscription_id
from
azure_policy_assignment,
jsonb_object_keys(parameters) as key
where
name = 'SecurityCenterBuiltIn'
)
select
sub.id as resource,
case
when count(value = 'Disabled') > 0 then 'alarm'
else 'ok'
end as status,
case
when count(value = 'Disabled') > 0 then 'Settings disabled for ' || count(*) filter (where value = 'Disabled') || ' parameters.'
else 'Settings enabled for all the parameters.'
end as reason
, sub.display_name as subscription
from
policy_assignment_parameters pol_assignment
right join azure_subscription sub on pol_assignment.subscription_id = sub.subscription_id
group by
sub.id,
pol_assignment.id,
sub._ctx,
sub.subscription_id,
pol_assignment.subscription_id,
sub.display_name;

Tags