turbot/azure_compliance

Query: compute_vm_scale_set_ssh_key_authentication_linux

Usage

powerpipe query azure_compliance.query.compute_vm_scale_set_ssh_key_authentication_linux

SQL

select
a.id as resource,
case
when virtual_machine_storage_profile -> 'osDisk' ->> 'osType' = 'Windows' then 'skip'
when virtual_machine_os_profile -> 'linuxConfiguration' ->> 'disablePasswordAuthentication' = 'true' then 'ok'
else 'alarm'
end as status,
case
when virtual_machine_storage_profile -> 'osDisk' ->> 'osType' = 'Windows' then a.title || ' is using windows OS.'
when virtual_machine_os_profile -> 'linuxConfiguration' ->> 'disablePasswordAuthentication' = 'true' then a.title || ' has SSK key authentication enabled.'
else a.title || ' has password authentication enabled.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_compute_virtual_machine_scale_set as a,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id;

Controls

The query is being used by the following controls: