mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
chore(typos): Update check's status (#2629)
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
This commit is contained in:
@@ -117,7 +117,7 @@ class Test_apigateway_authorizers_enabled:
|
||||
assert len(result) == 1
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} has authorizer configured."
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} has an authorizer configured."
|
||||
)
|
||||
assert result[0].resource_id == "test-rest-api"
|
||||
assert (
|
||||
@@ -158,7 +158,7 @@ class Test_apigateway_authorizers_enabled:
|
||||
assert len(result) == 1
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} has not authorizer configured."
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} does not have an authorizer configured."
|
||||
)
|
||||
assert result[0].resource_id == "test-rest-api"
|
||||
assert (
|
||||
|
||||
@@ -127,7 +127,7 @@ class Test_apigateway_client_certificate_enabled:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} in stage test has not client certificate enabled."
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} in stage test does not have client certificate enabled."
|
||||
)
|
||||
assert result[0].resource_id == "test-rest-api"
|
||||
assert (
|
||||
|
||||
@@ -205,7 +205,7 @@ class Test_apigateway_waf_acl_attached:
|
||||
assert len(result) == 1
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} in stage test has not WAF ACL attached."
|
||||
== f"API Gateway test-rest-api ID {rest_api['id']} in stage test does not have WAF ACL attached."
|
||||
)
|
||||
assert result[0].resource_id == "test-rest-api"
|
||||
assert (
|
||||
|
||||
@@ -127,6 +127,6 @@ class Test_apigatewayv2_authorizers_enabled:
|
||||
assert len(result) == 1
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"API Gateway V2 test-api ID {api['ApiId']} has authorizer configured."
|
||||
== f"API Gateway V2 test-api ID {api['ApiId']} has an authorizer configured."
|
||||
)
|
||||
assert result[0].resource_id == "test-api"
|
||||
|
||||
@@ -71,7 +71,7 @@ class Test_awslambda_function_url_cors_policy:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Lambda function {function_name} URL has a wide CORS configuration"
|
||||
== f"Lambda function {function_name} URL has a wide CORS configuration."
|
||||
)
|
||||
|
||||
def test_function_cors_not_wide(self):
|
||||
@@ -114,7 +114,7 @@ class Test_awslambda_function_url_cors_policy:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Lambda function {function_name} has not a wide CORS configuration"
|
||||
== f"Lambda function {function_name} does not have a wide CORS configuration."
|
||||
)
|
||||
|
||||
def test_function_cors_wide_with_two_origins(self):
|
||||
@@ -159,5 +159,5 @@ class Test_awslambda_function_url_cors_policy:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Lambda function {function_name} URL has a wide CORS configuration"
|
||||
== f"Lambda function {function_name} URL has a wide CORS configuration."
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@ class Test_awslambda_function_url_public:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Lambda function {function_name} has a publicly accessible function URL"
|
||||
== f"Lambda function {function_name} has a publicly accessible function URL."
|
||||
)
|
||||
|
||||
def test_function_private_url(self):
|
||||
@@ -114,5 +114,5 @@ class Test_awslambda_function_url_public:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Lambda function {function_name} has not a publicly accessible function URL"
|
||||
== f"Lambda function {function_name} does not have a publicly accessible function URL."
|
||||
)
|
||||
|
||||
@@ -97,7 +97,7 @@ class Test_cloudtrail_bucket_requires_mfa_delete:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) has not MFA delete enabled"
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) does not have MFA delete enabled."
|
||||
)
|
||||
assert result[0].resource_id == trail_name_us
|
||||
assert result[0].region == "us-east-1"
|
||||
@@ -157,7 +157,7 @@ class Test_cloudtrail_bucket_requires_mfa_delete:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) has MFA delete enabled"
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) has MFA delete enabled."
|
||||
)
|
||||
assert result[0].resource_id == trail_name_us
|
||||
assert result[0].region == "us-east-1"
|
||||
@@ -203,7 +203,7 @@ class Test_cloudtrail_bucket_requires_mfa_delete:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) is a cross-account bucket in another account out of Prowler's permissions scope, please check it manually"
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) is a cross-account bucket in another account out of Prowler's permissions scope, please check it manually."
|
||||
)
|
||||
assert result[0].resource_id == trail_name_us
|
||||
assert result[0].region == "us-east-1"
|
||||
@@ -255,7 +255,7 @@ class Test_cloudtrail_bucket_requires_mfa_delete:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) is a cross-account bucket in another account out of Prowler's permissions scope, please check it manually"
|
||||
== f"Trail {trail_name_us} bucket ({bucket_name_us}) is a cross-account bucket in another account out of Prowler's permissions scope, please check it manually."
|
||||
)
|
||||
assert result[0].resource_id == trail_name_us
|
||||
assert result[0].region == "us-east-1"
|
||||
|
||||
@@ -90,7 +90,7 @@ class Test_cloudtrail_insights_exist:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Trail {trail_name_us} has not insight selectors and it is logging"
|
||||
== f"Trail {trail_name_us} does not have insight selectors and it is logging."
|
||||
)
|
||||
assert result[0].resource_id == trail_name_us
|
||||
assert result[0].region == "us-east-1"
|
||||
@@ -135,7 +135,7 @@ class Test_cloudtrail_insights_exist:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Trail {trail_name_us} has insight selectors and it is logging"
|
||||
== f"Trail {trail_name_us} has insight selectors and it is logging."
|
||||
)
|
||||
assert result[0].resource_id == trail_name_us
|
||||
assert result[0].region == "us-east-1"
|
||||
|
||||
@@ -106,7 +106,7 @@ class Test_ec2_instance_public_ip:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "PASS"
|
||||
assert search(
|
||||
f"EC2 Instance {instance.id} has not a Public IP",
|
||||
f"EC2 Instance {instance.id} does not have a Public IP.",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == instance.id
|
||||
@@ -154,7 +154,8 @@ class Test_ec2_instance_public_ip:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "FAIL"
|
||||
assert search(
|
||||
f"EC2 Instance {instance.id} has a Public IP", result[0].status_extended
|
||||
f"EC2 Instance {instance.id} has a Public IP.",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == instance.id
|
||||
assert (
|
||||
|
||||
@@ -192,7 +192,7 @@ class ec2_networkacl_allow_ingress_any_port:
|
||||
assert nacl.status == "PASS"
|
||||
assert (
|
||||
nacl.status_extended
|
||||
== f"Network ACL {nacl_id} has not every port open to the Internet."
|
||||
== f"Network ACL {nacl_id} does not have every port open to the Internet."
|
||||
)
|
||||
assert (
|
||||
nacl.resource_arn
|
||||
|
||||
@@ -194,7 +194,7 @@ class Test_ec2_networkacl_allow_ingress_tcp_port_22:
|
||||
assert nacl.status == "PASS"
|
||||
assert (
|
||||
nacl.status_extended
|
||||
== f"Network ACL {nacl_id} has not SSH port 22 open to the Internet."
|
||||
== f"Network ACL {nacl_id} does not have SSH port 22 open to the Internet."
|
||||
)
|
||||
assert (
|
||||
nacl.resource_arn
|
||||
|
||||
@@ -194,7 +194,7 @@ class Test_ec2_networkacl_allow_ingress_tcp_port_3389:
|
||||
assert nacl.status == "PASS"
|
||||
assert (
|
||||
nacl.status_extended
|
||||
== f"Network ACL {nacl_id} has not Microsoft RDP port 3389 open to the Internet."
|
||||
== f"Network ACL {nacl_id} does not have Microsoft RDP port 3389 open to the Internet."
|
||||
)
|
||||
assert (
|
||||
nacl.resource_arn
|
||||
|
||||
@@ -179,7 +179,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not all ports open to the Internet",
|
||||
"does not have all ports open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
@@ -240,7 +240,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_any_port:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not all ports open to the Internet",
|
||||
"does not have all ports open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_port_mongodb_27017_2
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not MongoDB ports 27017 and 27018 open to the Internet",
|
||||
"does not have MongoDB ports 27017 and 27018 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_ftp_port_20_21:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not FTP ports 20 and 21 open to the Internet",
|
||||
"does not have FTP ports 20 and 21 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -181,7 +181,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_22:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not SSH port 22 open to the Internet",
|
||||
"does not have SSH port 22 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -181,7 +181,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_3389:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Microsoft RDP port 3389 open to the Internet",
|
||||
"does not have Microsoft RDP port 3389 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_cassandra_7
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Casandra ports 7199, 8888 and 9160 open to the Internet",
|
||||
"does not have Casandra ports 7199, 8888 and 9160 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_elasticsear
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Elasticsearch/Kibana ports 9200, 9300 and 5601 open to the Internet",
|
||||
"does not have Elasticsearch/Kibana ports 9200, 9300 and 5601 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -186,7 +186,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_kafka_9092:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Kafka port 9092 open to the Internet",
|
||||
"does not have Kafka port 9092 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_memcached_1
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Memcached port 11211 open to the Internet",
|
||||
"does not have Memcached port 11211 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_mysql_3306:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not MySQL port 3306 open to the Internet",
|
||||
"does not have MySQL port 3306 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_oracle_1521
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Oracle ports 1521 and 2483 open to the Internet",
|
||||
"does not have Oracle ports 1521 and 2483 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_postgres_54
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Postgres port 5432 open to the Internet",
|
||||
"does not have Postgres port 5432 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -186,7 +186,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_redis_6379:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Redis port 6379 open to the Internet",
|
||||
"does not have Redis port 6379 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -187,7 +187,7 @@ class ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_sql_server_1433_
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Microsoft SQL Server ports 1433 and 1434 open to the Internet",
|
||||
"does not have Microsoft SQL Server ports 1433 and 1434 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -186,7 +186,7 @@ class Test_ec2_securitygroup_allow_ingress_from_internet_to_tcp_port_telnet_23:
|
||||
if sg.resource_id == default_sg_id:
|
||||
assert sg.status == "PASS"
|
||||
assert search(
|
||||
"has not Telnet port 23 open to the Internet",
|
||||
"does not have Telnet port 23 open to the Internet",
|
||||
sg.status_extended,
|
||||
)
|
||||
assert (
|
||||
|
||||
@@ -97,7 +97,7 @@ class Test_ecr_repositories_lifecycle_policy_enabled:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Repository {repository_name} has a lifecycle policy configured"
|
||||
== f"Repository {repository_name} has a lifecycle policy configured."
|
||||
)
|
||||
assert result[0].resource_id == repository_name
|
||||
assert result[0].resource_arn == repository_arn
|
||||
@@ -138,7 +138,7 @@ class Test_ecr_repositories_lifecycle_policy_enabled:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Repository {repository_name} has not a lifecycle policy configured"
|
||||
== f"Repository {repository_name} does not have a lifecycle policy configured."
|
||||
)
|
||||
assert result[0].resource_id == repository_name
|
||||
assert result[0].resource_arn == repository_arn
|
||||
|
||||
@@ -51,7 +51,8 @@ class Test_eks_cluster_kms_cmk_encryption_in_secrets_enabled:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "FAIL"
|
||||
assert search(
|
||||
"has not encryption for Kubernetes secrets", result[0].status_extended
|
||||
"does not have encryption for Kubernetes secrets",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == cluster_name
|
||||
assert result[0].resource_arn == cluster_arn
|
||||
|
||||
@@ -104,7 +104,7 @@ class Test_elb_insecure_ssl_ciphers:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "PASS"
|
||||
assert search(
|
||||
"has not insecure SSL protocols or ciphers",
|
||||
"does not have insecure SSL protocols or ciphers",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == "my-lb"
|
||||
|
||||
@@ -97,7 +97,7 @@ class Test_elb_logging_enabled:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "FAIL"
|
||||
assert search(
|
||||
"has not configured access logs",
|
||||
"does not have access logs configured",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == "my-lb"
|
||||
|
||||
@@ -108,7 +108,7 @@ class Test_elbv2_deletion_protection:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "FAIL"
|
||||
assert search(
|
||||
"has not deletion protection",
|
||||
"does not have deletion protection",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == "my-lb"
|
||||
|
||||
@@ -125,7 +125,7 @@ class Test_elbv2_insecure_ssl_ciphers:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "PASS"
|
||||
assert search(
|
||||
"has not insecure SSL protocols or ciphers",
|
||||
"does not have insecure SSL protocols or ciphers",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == "my-lb"
|
||||
|
||||
@@ -111,7 +111,7 @@ class Test_elbv2_logging_enabled:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "FAIL"
|
||||
assert search(
|
||||
"has not configured access logs",
|
||||
"does not have access logs configured",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == "my-lb"
|
||||
|
||||
@@ -59,7 +59,8 @@ class Test_emr_cluster_master_nodes_no_public_ip:
|
||||
assert result[0].resource_arn == cluster_arn
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended == f"EMR Cluster {cluster_id} has a Public IP"
|
||||
result[0].status_extended
|
||||
== f"EMR Cluster {cluster_id} has a Public IP."
|
||||
)
|
||||
|
||||
def test_cluster_private_running(self):
|
||||
@@ -97,7 +98,7 @@ class Test_emr_cluster_master_nodes_no_public_ip:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"EMR Cluster {cluster_id} has not a Public IP"
|
||||
== f"EMR Cluster {cluster_id} does not have a Public IP."
|
||||
)
|
||||
|
||||
def test_cluster_public_terminated(self):
|
||||
@@ -165,5 +166,5 @@ class Test_emr_cluster_master_nodes_no_public_ip:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"EMR Cluster {cluster_id} has not a Public IP"
|
||||
== f"EMR Cluster {cluster_id} does not have a Public IP."
|
||||
)
|
||||
|
||||
@@ -97,7 +97,7 @@ class Test_iam_role_cross_account_readonlyaccess_policy:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== "IAM Role test has not ReadOnlyAccess policy"
|
||||
== "IAM Role test does not have ReadOnlyAccess policy."
|
||||
)
|
||||
assert result[0].resource_id == "test"
|
||||
assert result[0].resource_arn == response["Role"]["Arn"]
|
||||
@@ -146,7 +146,7 @@ class Test_iam_role_cross_account_readonlyaccess_policy:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== "IAM Role test has read-only access but is not cross account"
|
||||
== "IAM Role test has read-only access but is not cross account."
|
||||
)
|
||||
assert result[0].resource_id == "test"
|
||||
assert result[0].resource_arn == response["Role"]["Arn"]
|
||||
@@ -195,7 +195,7 @@ class Test_iam_role_cross_account_readonlyaccess_policy:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== "IAM Role test gives cross account read-only access!"
|
||||
== "IAM Role test gives cross account read-only access."
|
||||
)
|
||||
assert result[0].resource_id == "test"
|
||||
assert result[0].resource_arn == response["Role"]["Arn"]
|
||||
@@ -244,7 +244,7 @@ class Test_iam_role_cross_account_readonlyaccess_policy:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== "IAM Role test gives cross account read-only access!"
|
||||
== "IAM Role test gives cross account read-only access."
|
||||
)
|
||||
assert result[0].resource_id == "test"
|
||||
assert result[0].resource_arn == response["Role"]["Arn"]
|
||||
|
||||
@@ -117,7 +117,7 @@ class Test_rds_instance_backup_enabled:
|
||||
assert len(result) == 1
|
||||
assert result[0].status == "FAIL"
|
||||
assert search(
|
||||
"has not backup enabled",
|
||||
"does not have backup enabled",
|
||||
result[0].status_extended,
|
||||
)
|
||||
assert result[0].resource_id == "db-master-1"
|
||||
|
||||
@@ -97,7 +97,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC has not 1 public subnet and 2 private subnets with a NAT Gateway attached"
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC does not have 1 public subnet and 2 private subnets with a NAT Gateway attached."
|
||||
)
|
||||
assert result[0].resource_id == workspace_id
|
||||
assert result[0].resource_arn == ""
|
||||
@@ -163,7 +163,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC has not 1 public subnet and 2 private subnets with a NAT Gateway attached"
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC does not have 1 public subnet and 2 private subnets with a NAT Gateway attached."
|
||||
)
|
||||
assert result[0].resource_id == workspace_id
|
||||
assert result[0].resource_arn == ""
|
||||
@@ -246,7 +246,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC has not 1 public subnet and 2 private subnets with a NAT Gateway attached"
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC does not have 1 public subnet and 2 private subnets with a NAT Gateway attached."
|
||||
)
|
||||
assert result[0].resource_id == workspace_id
|
||||
assert result[0].resource_arn == ""
|
||||
@@ -348,7 +348,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat:
|
||||
assert result[0].status == "FAIL"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC has not 1 public subnet and 2 private subnets with a NAT Gateway attached"
|
||||
== f"Workspace {workspace_id} is not in a private subnet or its VPC does not have 1 public subnet and 2 private subnets with a NAT Gateway attached."
|
||||
)
|
||||
assert result[0].resource_id == workspace_id
|
||||
assert result[0].resource_arn == ""
|
||||
@@ -458,7 +458,7 @@ class Test_workspaces_vpc_2private_1public_subnets_nat:
|
||||
assert result[0].status == "PASS"
|
||||
assert (
|
||||
result[0].status_extended
|
||||
== f"Workspace {workspace_id} is in a private subnet within a VPC which has 1 public subnet 2 private subnets with a NAT Gateway attached"
|
||||
== f"Workspace {workspace_id} is in a private subnet within a VPC which has 1 public subnet 2 private subnets with a NAT Gateway attached."
|
||||
)
|
||||
assert result[0].resource_id == workspace_id
|
||||
assert result[0].resource_arn == ""
|
||||
|
||||
Reference in New Issue
Block a user