diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_any_port/ec2_securitygroup_allow_ingress_from_internet_to_any_port_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_any_port/ec2_securitygroup_allow_ingress_from_internet_to_any_port_test.py index 007f94866b..fe7e825de1 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_any_port/ec2_securitygroup_allow_ingress_from_internet_to_any_port_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_any_port/ec2_securitygroup_allow_ingress_from_internet_to_any_port_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -70,6 +70,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -132,6 +133,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -199,6 +201,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -247,6 +250,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -287,6 +291,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -329,6 +334,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -389,6 +395,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018_test.py index 186c4ea1a5..46e32472a7 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018/ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_27018_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2 default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21_test.py index b62158a5e7..89f3bd6ea7 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21/ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22_test.py index 1773144971..b086c15dc7 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22_test.py @@ -4,7 +4,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -20,6 +19,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -73,6 +73,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -141,6 +142,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -189,6 +191,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -229,6 +232,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -286,6 +290,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389_test.py index 10ad345556..8e022396fd 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -56,6 +56,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -96,6 +97,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -147,6 +149,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -211,6 +214,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -281,6 +285,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888_test.py index 52ac38e821..ca7a8f79e9 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7199_9160_8888_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7 default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601_test.py index ff17073ff6..01ccbc030c 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsearch_kibana_9200_9300_5601_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092_test.py index 9ae2518a9e..6bfea7fc78 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211_test.py index a3e7798d10..5c40774ff3 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_11211_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1 default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306_test.py index 4878af1632..5c016d3866 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483_test.py index 4d9eb6a12f..647c6ed185 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521_2483_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521 default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432_test.py index 1c7d503549..283a79efa3 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_5432_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -211,6 +213,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -261,6 +264,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -303,6 +307,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -362,6 +367,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54 ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379_test.py index 73c4cd3c5a..d01f3c3430 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -26,6 +25,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379: "SecurityGroups" ] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( audited_regions=[ @@ -115,6 +115,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( audited_regions=[ @@ -184,6 +185,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( audited_regions=[ @@ -236,6 +238,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( audited_regions=[ @@ -279,6 +282,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379: sgs_us_east_1 = ec2_client.describe_security_groups()["SecurityGroups"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info() current_audit_info.ignore_unused_services = True @@ -349,6 +353,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434_test.py index b45dd4e42a..839013cc67 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_1434_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_ ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_ ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_ ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_ ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_ default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_ ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23_test.py index 9f558879d3..e8a1f4d9e5 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23/ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23_test.py @@ -3,7 +3,6 @@ from unittest import mock from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from tests.providers.aws.audit_info_utils import ( AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1, @@ -19,6 +18,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -74,6 +74,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -140,6 +141,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -190,6 +192,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -232,6 +235,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23: default_sg["GroupId"] default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1], @@ -291,6 +295,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_wide_open_public_ipv4/ec2_securitygroup_allow_wide_open_public_ipv4_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_wide_open_public_ipv4/ec2_securitygroup_allow_wide_open_public_ipv4_test.py index 16dd628198..a470b41f21 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_allow_wide_open_public_ipv4/ec2_securitygroup_allow_wide_open_public_ipv4_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_allow_wide_open_public_ipv4/ec2_securitygroup_allow_wide_open_public_ipv4_test.py @@ -18,6 +18,7 @@ class Test_ec2_securitygroup_allow_wide_open_public_ipv4: ec2_client.create_vpc(CidrBlock="10.0.0.0/16") from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -29,6 +30,9 @@ class Test_ec2_securitygroup_allow_wide_open_public_ipv4: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4 import ( @@ -66,6 +70,7 @@ class Test_ec2_securitygroup_allow_wide_open_public_ipv4: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -77,6 +82,9 @@ class Test_ec2_securitygroup_allow_wide_open_public_ipv4: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4 import ( @@ -125,6 +133,7 @@ class Test_ec2_securitygroup_allow_wide_open_public_ipv4: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( [AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] @@ -136,6 +145,9 @@ class Test_ec2_securitygroup_allow_wide_open_public_ipv4: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_allow_wide_open_public_ipv4.ec2_securitygroup_allow_wide_open_public_ipv4 import ( diff --git a/tests/providers/aws/services/ec2/ec2_securitygroup_default_restrict_traffic/ec2_securitygroup_default_restrict_traffic_test.py b/tests/providers/aws/services/ec2/ec2_securitygroup_default_restrict_traffic/ec2_securitygroup_default_restrict_traffic_test.py index 491763523d..7a63751699 100644 --- a/tests/providers/aws/services/ec2/ec2_securitygroup_default_restrict_traffic/ec2_securitygroup_default_restrict_traffic_test.py +++ b/tests/providers/aws/services/ec2/ec2_securitygroup_default_restrict_traffic/ec2_securitygroup_default_restrict_traffic_test.py @@ -33,6 +33,7 @@ class Test_ec2_securitygroup_default_restrict_traffic: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_US_EAST_1]) @@ -42,6 +43,9 @@ class Test_ec2_securitygroup_default_restrict_traffic: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic import ( @@ -96,6 +100,7 @@ class Test_ec2_securitygroup_default_restrict_traffic: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_US_EAST_1]) @@ -105,6 +110,9 @@ class Test_ec2_securitygroup_default_restrict_traffic: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic import ( @@ -159,6 +167,7 @@ class Test_ec2_securitygroup_default_restrict_traffic: ) from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info( audited_regions=[AWS_REGION_US_EAST_1], ignore_unused_services=True @@ -170,6 +179,9 @@ class Test_ec2_securitygroup_default_restrict_traffic: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic import ( @@ -193,6 +205,7 @@ class Test_ec2_securitygroup_default_restrict_traffic: default_sg_name = default_sg["GroupName"] from prowler.providers.aws.services.ec2.ec2_service import EC2 + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_US_EAST_1]) @@ -202,6 +215,9 @@ class Test_ec2_securitygroup_default_restrict_traffic: ), mock.patch( "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.ec2_client", new=EC2(current_audit_info), + ), mock.patch( + "prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic.vpc_client", + new=VPC(current_audit_info), ): # Test Check from prowler.providers.aws.services.ec2.ec2_securitygroup_default_restrict_traffic.ec2_securitygroup_default_restrict_traffic import ( diff --git a/tests/providers/aws/services/vpc/vpc_service_test.py b/tests/providers/aws/services/vpc/vpc_service_test.py index c4317fc932..a0a6bbde12 100644 --- a/tests/providers/aws/services/vpc/vpc_service_test.py +++ b/tests/providers/aws/services/vpc/vpc_service_test.py @@ -3,7 +3,7 @@ import json from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC, Route +from prowler.providers.aws.services.vpc.vpc_service import Route from tests.providers.aws.audit_info_utils import ( AWS_ACCOUNT_NUMBER, AWS_REGION_EU_WEST_1, @@ -21,6 +21,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert vpc.service == "ec2" @@ -31,6 +33,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) for regional_client in vpc.regional_clients.values(): assert regional_client.__class__.__name__ == "EC2" @@ -42,6 +46,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert vpc.session.__class__.__name__ == "Session" @@ -52,6 +58,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert vpc.audited_account == AWS_ACCOUNT_NUMBER @@ -76,6 +84,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert ( len(vpc.vpcs) == 3 @@ -107,6 +117,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) # Search created VPC among default ones for vpc_iter in vpc.vpcs.values(): @@ -142,6 +154,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert len(vpc.vpc_peering_connections) == 1 assert vpc.vpc_peering_connections[0].id == vpc_pcx_id @@ -183,6 +197,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) vpc.vpc_peering_connections[0].route_tables = [ Route( @@ -232,6 +248,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert len(vpc.vpc_endpoints) == 1 assert vpc.vpc_endpoints[0].id == endpoint @@ -281,6 +299,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) for vpce in vpc.vpc_endpoint_services: @@ -310,6 +330,8 @@ class Test_VPC_Service: audit_info = set_mocked_aws_audit_info( [AWS_REGION_US_EAST_1, AWS_REGION_EU_WEST_1] ) + from prowler.providers.aws.services.vpc.vpc_service import VPC + vpc = VPC(audit_info) assert ( len(vpc.vpcs) == 3 diff --git a/tests/providers/aws/services/workspaces/workspaces_vpc_2private_1public_subnets_nat/workspaces_vpc_2private_1public_subnets_nat_test.py b/tests/providers/aws/services/workspaces/workspaces_vpc_2private_1public_subnets_nat/workspaces_vpc_2private_1public_subnets_nat_test.py index 78a59cb81a..69cfba8399 100644 --- a/tests/providers/aws/services/workspaces/workspaces_vpc_2private_1public_subnets_nat/workspaces_vpc_2private_1public_subnets_nat_test.py +++ b/tests/providers/aws/services/workspaces/workspaces_vpc_2private_1public_subnets_nat/workspaces_vpc_2private_1public_subnets_nat_test.py @@ -4,7 +4,6 @@ from uuid import uuid4 from boto3 import client, resource from moto import mock_aws -from prowler.providers.aws.services.vpc.vpc_service import VPC from prowler.providers.aws.services.workspaces.workspaces_service import WorkSpace from tests.providers.aws.audit_info_utils import ( AWS_ACCOUNT_NUMBER, @@ -51,6 +50,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat: root_volume_encryption_enabled=True, ) ) + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_EU_WEST_1]) @@ -119,6 +119,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat: subnet_id=subnet_private["Subnet"]["SubnetId"], ) ) + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_EU_WEST_1]) @@ -204,6 +205,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat: subnet_id=subnet_private["Subnet"]["SubnetId"], ) ) + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_EU_WEST_1]) @@ -310,6 +312,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat: ) current_audit_info = set_mocked_aws_audit_info([AWS_REGION_EU_WEST_1]) + from prowler.providers.aws.services.vpc.vpc_service import VPC with mock.patch( "prowler.providers.aws.lib.audit_info.audit_info.current_audit_info", @@ -413,6 +416,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat: subnet_id=subnet_private["Subnet"]["SubnetId"], ) ) + from prowler.providers.aws.services.vpc.vpc_service import VPC current_audit_info = set_mocked_aws_audit_info([AWS_REGION_EU_WEST_1])