Control: The default stateless action for Network Firewall policies should be drop or forward for full packets
Description
A firewall policy defines how your firewall monitors and handles traffic in AWS VPC. You configure stateless and stateful rule groups to filter packets and traffic flows. Defaulting to Pass can allow unintended traffic.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.networkfirewall_firewall_policy_default_stateless_action_check_full_packetsSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.networkfirewall_firewall_policy_default_stateless_action_check_full_packets --shareSQL
This control uses a named query:
select arn as resource, case when (not (firewall_policy -> 'StatelessDefaultActions') ? 'aws:drop' and not (firewall_policy -> 'StatelessDefaultActions') ? 'aws:forward_to_sfe') then 'alarm' else 'ok' end as status, case when (not (firewall_policy -> 'StatelessDefaultActions') ? 'aws:drop' and not (firewall_policy -> 'StatelessDefaultActions') ? 'aws:forward_to_sfe') then title || ' stateless action is neither drop nor forward for full packets.' else title || ' stateless action is either drop or forward for full packets.' end as reason , region, account_idfrom aws_networkfirewall_firewall_policy;