Control: The default stateless action for Network Firewall policies should be drop or forward for fragmented packets
Description
This control checks whether the default stateless action for fragmented packets for a Network Firewall policy is drop or forward. The control passes if Drop or Forward is selected, and fails if Pass is selected.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.networkfirewall_firewall_policy_default_stateless_action_check_fragmented_packetsSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.networkfirewall_firewall_policy_default_stateless_action_check_fragmented_packets --shareSQL
This control uses a named query:
select  arn as resource,  case    when (not (firewall_policy -> 'StatelessFragmentDefaultActions') ? 'aws:drop'        and not (firewall_policy -> 'StatelessFragmentDefaultActions') ? 'aws:forward_to_sfe') then 'alarm'    else 'ok'  end as status,  case    when (not (firewall_policy -> 'StatelessFragmentDefaultActions') ? 'aws:drop'        and not (firewall_policy -> 'StatelessFragmentDefaultActions') ? 'aws:forward_to_sfe') then title || ' stateless action is neither drop nor forward for fragmented packets.'    else title || ' stateless action is either drop or forward for fragmented packets.'  end as reason    , region, account_idfrom  aws_networkfirewall_firewall_policy;