mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 14:55:00 +00:00
committed by
GitHub
parent
679414418e
commit
1d409d04f2
@@ -33,7 +33,11 @@ extra7148() {
|
|||||||
if [[ $LIST_OF_EFS_SYSTEMS ]]; then
|
if [[ $LIST_OF_EFS_SYSTEMS ]]; then
|
||||||
for filesystem in $LIST_OF_EFS_SYSTEMS; do
|
for filesystem in $LIST_OF_EFS_SYSTEMS; do
|
||||||
# if retention is 0 then is disabled
|
# if retention is 0 then is disabled
|
||||||
BACKUP_POLICY=$($AWSCLI efs describe-backup-policy $PROFILE_OPT --region $regx --file-system-id $filesystem --query BackupPolicy --output text)
|
BACKUP_POLICY=$($AWSCLI efs describe-backup-policy $PROFILE_OPT --region $regx --file-system-id $filesystem --query BackupPolicy --output text 2>&1)
|
||||||
|
if [[ $(echo "$BACKUP_POLICY" | grep -E 'AccessDenied|UnauthorizedOperation|AuthorizationError') ]]; then
|
||||||
|
textInfo "$regx: Access Denied trying to describe backup policy" "$regx"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
if [[ $BACKUP_POLICY == "DISABLED" ]]; then
|
if [[ $BACKUP_POLICY == "DISABLED" ]]; then
|
||||||
textFail "$regx: File system $filesystem does not have backup enabled!" "$regx" "$filesystem"
|
textFail "$regx: File system $filesystem does not have backup enabled!" "$regx" "$filesystem"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -67,4 +67,5 @@ Resources:
|
|||||||
- 's3:GetAccountPublicAccessBlock'
|
- 's3:GetAccountPublicAccessBlock'
|
||||||
- 'shield:GetSubscriptionState'
|
- 'shield:GetSubscriptionState'
|
||||||
- 'shield:DescribeProtection'
|
- 'shield:DescribeProtection'
|
||||||
|
- 'elasticfilesystem:DescribeBackupPolicy'
|
||||||
Resource: '*'
|
Resource: '*'
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
"glue:SearchTables",
|
"glue:SearchTables",
|
||||||
"s3:GetAccountPublicAccessBlock",
|
"s3:GetAccountPublicAccessBlock",
|
||||||
"shield:GetSubscriptionState",
|
"shield:GetSubscriptionState",
|
||||||
"shield:DescribeProtection"
|
"shield:DescribeProtection",
|
||||||
|
"elasticfilesystem:DescribeBackupPolicy"
|
||||||
],
|
],
|
||||||
"Resource": "*",
|
"Resource": "*",
|
||||||
"Effect": "Allow",
|
"Effect": "Allow",
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ Resources:
|
|||||||
- s3:GetAccountPublicAccessBlock
|
- s3:GetAccountPublicAccessBlock
|
||||||
- shield:GetSubscriptionState
|
- shield:GetSubscriptionState
|
||||||
- shield:DescribeProtection
|
- shield:DescribeProtection
|
||||||
|
- elasticfilesystem:DescribeBackupPolicy
|
||||||
Effect: Allow
|
Effect: Allow
|
||||||
Resource: !Sub 'arn:aws:glue:${AWS::Region}:${AWS::AccountId}:catalog'
|
Resource: !Sub 'arn:aws:glue:${AWS::Region}:${AWS::AccountId}:catalog'
|
||||||
- PolicyName: CodeBuild
|
- PolicyName: CodeBuild
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ Resources:
|
|||||||
- tag:GetTagKeys
|
- tag:GetTagKeys
|
||||||
- shield:GetSubscriptionState
|
- shield:GetSubscriptionState
|
||||||
- shield:DescribeProtection
|
- shield:DescribeProtection
|
||||||
|
- elasticfilesystem:DescribeBackupPolicy
|
||||||
- PolicyName: Prowler-S3-Reports
|
- PolicyName: Prowler-S3-Reports
|
||||||
PolicyDocument:
|
PolicyDocument:
|
||||||
Version: 2012-10-17
|
Version: 2012-10-17
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ Resources:
|
|||||||
- tag:GetTagKeys
|
- tag:GetTagKeys
|
||||||
- shield:GetSubscriptionState
|
- shield:GetSubscriptionState
|
||||||
- shield:DescribeProtection
|
- shield:DescribeProtection
|
||||||
|
- elasticfilesystem:DescribeBackupPolicy
|
||||||
- PolicyName: Prowler-S3-Reports
|
- PolicyName: Prowler-S3-Reports
|
||||||
PolicyDocument:
|
PolicyDocument:
|
||||||
Version: 2012-10-17
|
Version: 2012-10-17
|
||||||
|
|||||||
@@ -322,7 +322,8 @@ resource "aws_iam_policy" "prowler_kickstarter_iam_policy" {
|
|||||||
"glue:SearchTables",
|
"glue:SearchTables",
|
||||||
"s3:GetAccountPublicAccessBlock",
|
"s3:GetAccountPublicAccessBlock",
|
||||||
"shield:GetSubscriptionState",
|
"shield:GetSubscriptionState",
|
||||||
"shield:DescribeProtection"
|
"shield:DescribeProtection",
|
||||||
|
"elasticfilesystem:DescribeBackupPolicy"
|
||||||
]
|
]
|
||||||
Effect = "Allow"
|
Effect = "Allow"
|
||||||
Resource = "arn:aws:glue:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:catalog"
|
Resource = "arn:aws:glue:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:catalog"
|
||||||
|
|||||||
Reference in New Issue
Block a user