From 89a2a9f82e3afaca800799acb60d929115ace780 Mon Sep 17 00:00:00 2001 From: Bittu Date: Mon, 26 Aug 2024 16:28:39 +0530 Subject: [PATCH 1/2] fixed yml formatting and errors --- RBI/AWS/api-gw-associated-with-wafv2.yml | 2 +- RBI/AWS/api-gw-execution-logging-enabled.yml | 10 +++++----- RBI/AWS/cloud-trail-cloud-watch-logs-enabled.yml | 3 ++- RBI/AWS/rds-instance-public-access-check.yml | 3 ++- RBI/AWS/restricted-common-ports.yml | 2 +- RBI/AWS/restricted-ssh.yml | 2 +- RBI/AWS/s3-access-point-block-public-access.yml | 10 +++++----- .../s3-account-level-public-access-blocks-periodic.yml | 2 +- RBI/AWS/subnet-auto-assign-public-ip-disabled.yml | 5 +---- 9 files changed, 19 insertions(+), 20 deletions(-) diff --git a/RBI/AWS/api-gw-associated-with-wafv2.yml b/RBI/AWS/api-gw-associated-with-wafv2.yml index c996f8f..b18768f 100644 --- a/RBI/AWS/api-gw-associated-with-wafv2.yml +++ b/RBI/AWS/api-gw-associated-with-wafv2.yml @@ -1,5 +1,5 @@ policies: - - name: api-gw-associated-with-waf + - name: api-gw-associated-with-wafv2 resource: rest-stage filters: - type: wafv2-enabled diff --git a/RBI/AWS/api-gw-execution-logging-enabled.yml b/RBI/AWS/api-gw-execution-logging-enabled.yml index b0580cb..f6f8af6 100644 --- a/RBI/AWS/api-gw-execution-logging-enabled.yml +++ b/RBI/AWS/api-gw-execution-logging-enabled.yml @@ -1,7 +1,7 @@ policies: - name: api-gw-execution-logging-enabled - resource: rest-stage - filters: - - type: value - key: 'methodSettings."*/*".loggingLevel' - value: absent \ No newline at end of file + resource: rest-stage + filters: + - type: value + key: 'methodSettings."*/*".loggingLevel' + value: absent \ No newline at end of file diff --git a/RBI/AWS/cloud-trail-cloud-watch-logs-enabled.yml b/RBI/AWS/cloud-trail-cloud-watch-logs-enabled.yml index 3542d2e..20bf718 100644 --- a/RBI/AWS/cloud-trail-cloud-watch-logs-enabled.yml +++ b/RBI/AWS/cloud-trail-cloud-watch-logs-enabled.yml @@ -1,4 +1,5 @@ -- name: cloud-trail-cloud-watch-logs-enabled +policies: + - name: cloud-trail-cloud-watch-logs-enabled resource: aws.cloudtrail filters: - type: value diff --git a/RBI/AWS/rds-instance-public-access-check.yml b/RBI/AWS/rds-instance-public-access-check.yml index ffe546b..427d3f1 100644 --- a/RBI/AWS/rds-instance-public-access-check.yml +++ b/RBI/AWS/rds-instance-public-access-check.yml @@ -1,4 +1,5 @@ -- name: rds-instance-public-access-check +policies: + - name: rds-instance-public-access-check resource: rds filters: - PubliclyAccessible: true \ No newline at end of file diff --git a/RBI/AWS/restricted-common-ports.yml b/RBI/AWS/restricted-common-ports.yml index 4b8bc89..abc3b7a 100644 --- a/RBI/AWS/restricted-common-ports.yml +++ b/RBI/AWS/restricted-common-ports.yml @@ -1,7 +1,7 @@ policies: - name: restricted-common-ports resource: security-group - filters: + filters: - or: - type: ingress Ports: [22, 3389, 20, 21, 3306, 4333] diff --git a/RBI/AWS/restricted-ssh.yml b/RBI/AWS/restricted-ssh.yml index e4e1e14..799439e 100644 --- a/RBI/AWS/restricted-ssh.yml +++ b/RBI/AWS/restricted-ssh.yml @@ -1,7 +1,7 @@ policies: - name: restricted-ssh resource: security-group - filters: + filters: - or: - type: ingress Ports: [22, 3389,] diff --git a/RBI/AWS/s3-access-point-block-public-access.yml b/RBI/AWS/s3-access-point-block-public-access.yml index 1d114df..49a458c 100644 --- a/RBI/AWS/s3-access-point-block-public-access.yml +++ b/RBI/AWS/s3-access-point-block-public-access.yml @@ -1,7 +1,7 @@ policies: - name: s3-access-point-block-public-access - resource: aws.s3-access-point - filters: - - type: value - key: PublicAccessBlockConfiguration.BlockPublicAcls.WriteAccess - value: false \ No newline at end of file + resource: aws.s3-access-point + filters: + - type: value + key: PublicAccessBlockConfiguration.BlockPublicAcls.WriteAccess + value: false \ No newline at end of file diff --git a/RBI/AWS/s3-account-level-public-access-blocks-periodic.yml b/RBI/AWS/s3-account-level-public-access-blocks-periodic.yml index e334b2b..a1c5208 100644 --- a/RBI/AWS/s3-account-level-public-access-blocks-periodic.yml +++ b/RBI/AWS/s3-account-level-public-access-blocks-periodic.yml @@ -1,5 +1,5 @@ policies: - - name: s3-bucket-level-public-access-prohibited + - name: s3-account-level-public-access-prohibited resource: aws.s3 filters: - type: check-public-block diff --git a/RBI/AWS/subnet-auto-assign-public-ip-disabled.yml b/RBI/AWS/subnet-auto-assign-public-ip-disabled.yml index 1a2c23b..35e547b 100644 --- a/RBI/AWS/subnet-auto-assign-public-ip-disabled.yml +++ b/RBI/AWS/subnet-auto-assign-public-ip-disabled.yml @@ -4,7 +4,4 @@ policies: filters: - type: value key: MapPublicIpOnLaunch - value: true - actions: - - type: modify - MapPublicIpOnLaunch: false \ No newline at end of file + value: true \ No newline at end of file From 23f841796e96c1aadb9ab707b79eb0fd3cae6d43 Mon Sep 17 00:00:00 2001 From: Bittu Date: Mon, 26 Aug 2024 16:59:42 +0530 Subject: [PATCH 2/2] fixed key error --- ...certificateapigateway_restapi_client_certificate_enabled.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RBI/AWS/rest-stages-old-certificateapigateway_restapi_client_certificate_enabled.yml b/RBI/AWS/rest-stages-old-certificateapigateway_restapi_client_certificate_enabled.yml index 8e6b2e0..30e15a4 100644 --- a/RBI/AWS/rest-stages-old-certificateapigateway_restapi_client_certificate_enabled.yml +++ b/RBI/AWS/rest-stages-old-certificateapigateway_restapi_client_certificate_enabled.yml @@ -3,5 +3,5 @@ policies: resource: rest-stage filters: - type: value - key: client-certificate + key: "`client-certificate`" value: absent \ No newline at end of file