turbot/steampipe-mod-terraform-azure-compliance

Control: Ensure that 'HTTP Version' is the latest, if used to run the Function app

Description

Periodically, newer versions are released for HTTP either due to security flaws or to include additional functionality. Using the latest HTTP version for web apps to take advantage of security fixes, if any, and/or new functionalities of the newer version. Currently, this policy only applies to Linux web apps.

Usage

Run the control in your terminal:

powerpipe control run terraform_azure_compliance.control.appservice_function_app_latest_http_version

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_azure_compliance.control.appservice_function_app_latest_http_version --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'site_config') is null then 'alarm'
when (attributes_std -> 'site_config' ->> 'http2_enabled')::boolean then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'site_config') is null then ' HTTP version not defined'
when (attributes_std -> 'site_config' ->> 'http2_enabled')::boolean then ' HTTP version is latest'
else ' HTTP version not latest'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'azurerm_function_app';

Tags