turbot/aws_compliance

Query: lambda_function_cors_configuration

Usage

powerpipe query aws_compliance.query.lambda_function_cors_configuration

Steampipe Tables

SQL

select
arn as resource,
case
when url_config is null then 'info'
when url_config -> 'Cors' ->> 'AllowOrigins' = '["*"]' then 'alarm'
else 'ok'
end as status,
case
when url_config is null then title || ' does not has a URL config.'
when url_config -> 'Cors' ->> 'AllowOrigins' = '["*"]' then title || ' CORS configuration allows all origins.'
else title || ' CORS configuration does not allow all origins.'
end as reason
, region, account_id
from
aws_lambda_function;

Controls

The query is being used by the following controls: