mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 06:45:08 +00:00
fix(vpc_peering_routing_tables_with_least_privilege): check only peering routes (#2887)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"Code": {
|
||||
"CLI": "https://docs.bridgecrew.io/docs/networking_5#cli-command",
|
||||
"NativeIaC": "",
|
||||
"Other": "",
|
||||
"Other": "https://www.trendmicro.com/cloudoneconformity-staging/knowledge-base/aws/VPC/vpc-peering-access.html#",
|
||||
"Terraform": ""
|
||||
},
|
||||
"Recommendation": {
|
||||
|
||||
@@ -103,7 +103,10 @@ class VPC(AWSService):
|
||||
if (
|
||||
route["Origin"] != "CreateRouteTable"
|
||||
): # avoid default route table
|
||||
if "DestinationCidrBlock" in route:
|
||||
if (
|
||||
"DestinationCidrBlock" in route
|
||||
and "VpcPeeringConnectionId" in route
|
||||
):
|
||||
destination_cidrs.append(route["DestinationCidrBlock"])
|
||||
conn.route_tables.append(
|
||||
Route(
|
||||
|
||||
Reference in New Issue
Block a user