mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-02-09 02:30:43 +00:00
chore(iam): update Prowler permissions (#2050)
This commit is contained in:
@@ -18,13 +18,13 @@ Before sending findings to Prowler, you will need to perform next steps:
|
|||||||
Once it is enabled, it is as simple as running the command below (for all regions):
|
Once it is enabled, it is as simple as running the command below (for all regions):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./prowler aws -S
|
prowler aws -S
|
||||||
```
|
```
|
||||||
|
|
||||||
or for only one filtered region like eu-west-1:
|
or for only one filtered region like eu-west-1:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./prowler -S -f eu-west-1
|
prowler -S -f eu-west-1
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note 1**: It is recommended to send only fails to Security Hub and that is possible adding `-q` to the command.
|
> **Note 1**: It is recommended to send only fails to Security Hub and that is possible adding `-q` to the command.
|
||||||
@@ -43,5 +43,5 @@ By default, Prowler archives all its findings in Security Hub that have not appe
|
|||||||
You can skip this logic by using the option `--skip-sh-update` so Prowler will not archive older findings:
|
You can skip this logic by using the option `--skip-sh-update` so Prowler will not archive older findings:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./prowler -S --skip-sh-update
|
prowler -S --skip-sh-update
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ AWSTemplateFormatVersion: '2010-09-09'
|
|||||||
# aws cloudformation create-stack \
|
# aws cloudformation create-stack \
|
||||||
# --capabilities CAPABILITY_IAM --capabilities CAPABILITY_NAMED_IAM \
|
# --capabilities CAPABILITY_IAM --capabilities CAPABILITY_NAMED_IAM \
|
||||||
# --template-body "file://create_role_to_assume_cfn.yaml" \
|
# --template-body "file://create_role_to_assume_cfn.yaml" \
|
||||||
# --stack-name "ProwlerExecRole" \
|
# --stack-name "ProwlerScanRole" \
|
||||||
# --parameters "ParameterKey=AuthorisedARN,ParameterValue=arn:aws:iam::123456789012:root"
|
# --parameters "ParameterKey=AuthorisedARN,ParameterValue=arn:aws:iam::123456789012:root"
|
||||||
#
|
#
|
||||||
Description: |
|
Description: |
|
||||||
@@ -13,7 +13,7 @@ Description: |
|
|||||||
account to assume that role. The role name and the ARN of the trusted user can all be passed
|
account to assume that role. The role name and the ARN of the trusted user can all be passed
|
||||||
to the CloudFormation stack as parameters. Then you can run Prowler to perform a security
|
to the CloudFormation stack as parameters. Then you can run Prowler to perform a security
|
||||||
assessment with a command like:
|
assessment with a command like:
|
||||||
./prowler -A <THIS_ACCOUNT_ID> -R ProwlerExecRole
|
prowler --role ProwlerScanRole.ARN
|
||||||
Parameters:
|
Parameters:
|
||||||
AuthorisedARN:
|
AuthorisedARN:
|
||||||
Description: |
|
Description: |
|
||||||
@@ -22,12 +22,12 @@ Parameters:
|
|||||||
Type: String
|
Type: String
|
||||||
ProwlerRoleName:
|
ProwlerRoleName:
|
||||||
Description: |
|
Description: |
|
||||||
Name of the IAM role that will have these policies attached. Default: ProwlerExecRole
|
Name of the IAM role that will have these policies attached. Default: ProwlerScanRole
|
||||||
Type: String
|
Type: String
|
||||||
Default: 'ProwlerExecRole'
|
Default: 'ProwlerScanRole'
|
||||||
|
|
||||||
Resources:
|
Resources:
|
||||||
ProwlerExecRole:
|
ProwlerScanRole:
|
||||||
Type: AWS::IAM::Role
|
Type: AWS::IAM::Role
|
||||||
Properties:
|
Properties:
|
||||||
AssumeRolePolicyDocument:
|
AssumeRolePolicyDocument:
|
||||||
@@ -42,31 +42,49 @@ Resources:
|
|||||||
# Bool:
|
# Bool:
|
||||||
# 'aws:MultiFactorAuthPresent': true
|
# 'aws:MultiFactorAuthPresent': true
|
||||||
# This is 12h that is maximum allowed, Minimum is 3600 = 1h
|
# This is 12h that is maximum allowed, Minimum is 3600 = 1h
|
||||||
# to take advantage of this use -T like in './prowler -A <ACCOUNT_ID_TO_ASSUME> -R ProwlerExecRole -T 43200 -M text,html'
|
# to take advantage of this use -T like in './prowler --role ProwlerScanRole.ARN -T 43200'
|
||||||
MaxSessionDuration: 43200
|
MaxSessionDuration: 43200
|
||||||
ManagedPolicyArns:
|
ManagedPolicyArns:
|
||||||
- 'arn:aws:iam::aws:policy/SecurityAudit'
|
- 'arn:aws:iam::aws:policy/SecurityAudit'
|
||||||
- 'arn:aws:iam::aws:policy/job-function/ViewOnlyAccess'
|
- 'arn:aws:iam::aws:policy/job-function/ViewOnlyAccess'
|
||||||
RoleName: !Sub ${ProwlerRoleName}
|
RoleName: !Sub ${ProwlerRoleName}
|
||||||
Policies:
|
Policies:
|
||||||
- PolicyName: ProwlerExecRoleAdditionalViewPrivileges
|
- PolicyName: ProwlerScanRoleAdditionalViewPrivileges
|
||||||
PolicyDocument:
|
PolicyDocument:
|
||||||
Version : '2012-10-17'
|
Version : '2012-10-17'
|
||||||
Statement:
|
Statement:
|
||||||
- Effect: Allow
|
- Effect: Allow
|
||||||
Action:
|
Action:
|
||||||
- 'ds:ListAuthorizedApplications'
|
- 'account:Get*'
|
||||||
|
- 'appstream:Describe*'
|
||||||
|
- 'appstream:List*'
|
||||||
|
- 'codeartifact:List*'
|
||||||
|
- 'codebuild:BatchGet*'
|
||||||
|
- 'ds:Get*'
|
||||||
|
- 'ds:Describe*'
|
||||||
|
- 'ds:List*'
|
||||||
- 'ec2:GetEbsEncryptionByDefault'
|
- 'ec2:GetEbsEncryptionByDefault'
|
||||||
- 'ecr:Describe*'
|
- 'ecr:Describe*'
|
||||||
- 'elasticfilesystem:DescribeBackupPolicy'
|
- 'elasticfilesystem:DescribeBackupPolicy'
|
||||||
- 'glue:GetConnections'
|
- 'glue:GetConnections'
|
||||||
- 'glue:GetSecurityConfiguration'
|
- 'glue:GetSecurityConfiguration*'
|
||||||
- 'glue:SearchTables'
|
- 'glue:SearchTables'
|
||||||
- 'lambda:GetFunction'
|
- 'lambda:GetFunction*'
|
||||||
|
- 'macie2:GetMacieSession'
|
||||||
- 's3:GetAccountPublicAccessBlock'
|
- 's3:GetAccountPublicAccessBlock'
|
||||||
- 'shield:DescribeProtection'
|
- 'shield:DescribeProtection'
|
||||||
- 'shield:GetSubscriptionState'
|
- 'shield:GetSubscriptionState'
|
||||||
|
- 'securityhub:BatchImportFindings'
|
||||||
|
- 'securityhub:GetFindings'
|
||||||
- 'ssm:GetDocument'
|
- 'ssm:GetDocument'
|
||||||
- 'support:Describe*'
|
- 'support:Describe*'
|
||||||
- 'tag:GetTagKeys'
|
- 'tag:GetTagKeys'
|
||||||
Resource: '*'
|
Resource: '*'
|
||||||
|
- PolicyName: ProwlerScanRoleAdditionalViewPrivilegesApiGateway
|
||||||
|
PolicyDocument:
|
||||||
|
Version : '2012-10-17'
|
||||||
|
Statement:
|
||||||
|
- Effect: Allow
|
||||||
|
Action:
|
||||||
|
- 'apigateway:GET'
|
||||||
|
Resource: 'arn:aws:apigateway:*::/restapis/*'
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
"Statement": [
|
"Statement": [
|
||||||
{
|
{
|
||||||
"Action": [
|
"Action": [
|
||||||
|
"account:Get*",
|
||||||
"appstream:Describe*",
|
"appstream:Describe*",
|
||||||
|
"appstream:List*",
|
||||||
"codeartifact:List*",
|
"codeartifact:List*",
|
||||||
"codebuild:BatchGet*",
|
"codebuild:BatchGet*",
|
||||||
"ds:Describe*",
|
"ds:Describe*",
|
||||||
|
|||||||
Reference in New Issue
Block a user