From 5957bdddc79ffd75b451ab65c2e7b63bdbafe945 Mon Sep 17 00:00:00 2001 From: jinyoungmoonDEV Date: Thu, 13 Feb 2025 10:51:59 +0900 Subject: [PATCH] fix: add ec2>security_group inbound_rule PrefixListIds field --- src/plugin/manager/ec2/security_group_manager.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugin/manager/ec2/security_group_manager.py b/src/plugin/manager/ec2/security_group_manager.py index aa087bb..a30e7de 100644 --- a/src/plugin/manager/ec2/security_group_manager.py +++ b/src/plugin/manager/ec2/security_group_manager.py @@ -89,6 +89,14 @@ def create_cloud_service(self, region, options, secret_data, schema): ) ) + for prefix_list_id in in_rule.get("PrefixListIds", []): + in_rule_copy = copy.deepcopy(in_rule) + inbound_rules.append( + self.custom_security_group_inbound_rule_info( + in_rule_copy, prefix_list_id, "prefix_list_ids",vulnerable_ports + ) + ) + # Outbound Rules outbound_rules = [] for out_rule in raw.get("IpPermissionsEgress", []): @@ -294,6 +302,8 @@ def _get_source_display(remote): return group_id elif cidrv6 := remote.get("CidrIpv6"): return cidrv6 + elif prefix_list_id := remote.get("PrefixListId"): + return prefix_list_id return ""