From 24c3da2a60dc95a088015c3f74433483fd43c753 Mon Sep 17 00:00:00 2001 From: Toni de la Fuente Date: Wed, 10 Nov 2021 14:27:01 +0100 Subject: [PATCH 1/2] Revert "New check 7159 ELB Classic Load balancer has listeners underneath @kbgoll05" --- checks/check_extra7159 | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 checks/check_extra7159 diff --git a/checks/check_extra7159 b/checks/check_extra7159 deleted file mode 100644 index a4fcbcd3..00000000 --- a/checks/check_extra7159 +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. -CHECK_ID_extra7159="7.159" -CHECK_TITLE_extra7159="[extra7159] Check if ELB has listeners underneath" -CHECK_SCORED_extra7159="NOT_SCORED" -CHECK_TYPE_extra7159="EXTRA" -CHECK_SEVERITY_extra7159="Medium" -CHECK_ASFF_RESOURCE_TYPE_extra7159="AwsElbLoadBalancer" -CHECK_ALTERNATE_check7159="extra7159" -CHECK_SERVICENAME_extra7159="elb" -CHECK_RISK_extra7159='The rules that are defined for a listener determine how the load balancer routes requests to its registered targets.' -CHECK_REMEDIATION_extra7159='Add listeners to Elastic Load Balancers.' -CHECK_DOC_extra7159='https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html' -CHECK_CAF_EPIC_extra7159='Data Protection' - -extra7159(){ - for regx in $REGIONS; do - LIST_OF_ELBS=$($AWSCLI elb describe-load-balancers --query 'LoadBalancerDescriptions[*].LoadBalancerName' $PROFILE_OPT --region $regx --output text) - if [[ $LIST_OF_ELBS ]]; then - for elb in $LIST_OF_ELBS; do - LIST_OF_LISTENERS=$($AWSCLI elb describe-load-balancers --load-balancer-name $elb --query 'LoadBalancerDescriptions[*].ListenerDescriptions' $PROFILE_OPT --region $regx --output text) - if [[ $LIST_OF_LISTENERS ]]; then - textPass "$regx: $elb has listeners underneath" "$regx" "$elb" - else - textFail "$regx: $elb has no listeners underneath" "$regx" "$elb" - fi - done - else - textInfo "$regx: No ELBs found" "$regx" - fi - done -} \ No newline at end of file From 1ee7f4f2768a355852776faa17705bd29476f846 Mon Sep 17 00:00:00 2001 From: Toni de la Fuente Date: Wed, 10 Nov 2021 14:27:27 +0100 Subject: [PATCH 2/2] Revert "New check 7158 ELBV2 has listeners underneath @kbgoll05" --- checks/check_extra7158 | 43 ------------------------------------------ 1 file changed, 43 deletions(-) delete mode 100644 checks/check_extra7158 diff --git a/checks/check_extra7158 b/checks/check_extra7158 deleted file mode 100644 index 2ab4a885..00000000 --- a/checks/check_extra7158 +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash - -# Prowler - the handy cloud security tool (copyright 2018) by Toni de la Fuente -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. -CHECK_ID_extra7158="7.158" -CHECK_TITLE_extra7158="[extra7158] Check if ELBV2 has listeners underneath" -CHECK_SCORED_extra7158="NOT_SCORED" -CHECK_TYPE_extra7158="EXTRA" -CHECK_SEVERITY_extra7158="Medium" -CHECK_ASFF_RESOURCE_TYPE_extra7158="AwsElbv2LoadBalancer" -CHECK_ALTERNATE_check7158="extra7158" -CHECK_SERVICENAME_extra7158="elb" -CHECK_RISK_extra7158='The rules that are defined for a listener determine how the load balancer routes requests to its registered targets.' -CHECK_REMEDIATION_extra7158='Add listeners to Elastic Load Balancers V2.' -CHECK_DOC_extra7158='https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html' -CHECK_CAF_EPIC_extra7158='Data Protection' - -extra7158(){ - for regx in $REGIONS; do - LIST_OF_ELBSV2=$($AWSCLI elbv2 describe-load-balancers --query 'LoadBalancers[*].LoadBalancerArn' $PROFILE_OPT --region $regx --output text) - if [[ $LIST_OF_ELBSV2 ]]; then - for elb in $LIST_OF_ELBSV2; do - LIST_OF_LISTENERS=$($AWSCLI elbv2 describe-listeners $PROFILE_OPT --region $regx --load-balancer-arn $elb --query 'Listeners[*]' --output text) - ELBV2_NAME=$(echo $elb|cut -d\/ -f3) - if [[ $LIST_OF_LISTENERS ]]; then - textPass "$regx: $ELBV2_NAME has listeners underneath" "$regx" "$elb" - else - textFail "$regx: $ELBV2_NAME has no listeners underneath" "$regx" "$elb" - fi - done - else - textInfo "$regx: No ELBs found" "$regx" - fi - done -} \ No newline at end of file