Skip to content

Commit

Permalink
Merge pull request #392 from MrSecure/mega
Browse files Browse the repository at this point in the history
WIP: MegaProwler Add-on
  • Loading branch information
toniblyx committed Oct 14, 2019
2 parents 08cd94f + 38c0b60 commit 31a4024
Show file tree
Hide file tree
Showing 4 changed files with 722 additions and 0 deletions.
73 changes: 73 additions & 0 deletions util/multi-account/Audit_Exec_Role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Prowler Auditing Role - in Control Tower pick AWSControlTowerStackSetRole for IAM role and AWSControlTowerExecution for execution

Parameters:

AuditorAccountId:
Default: 987600001234
Description: AWS Account ID where the audit tooling executes
Type: Number
AuditRolePathName:
Default: '/audit/prowler/XA_AuditRole_Prowler'
Description: Path for role name in audit tooling account
Type: String

Resources:
XAAuditRole:
Type: "AWS::IAM::Role"
Properties: # /audit/prowler/XA_AuditRole_Prowler
RoleName: XA_AuditRole_Prowler
Path: "/audit/prowler/"
ManagedPolicyArns:
- arn:aws:iam::aws:policy/SecurityAudit
- arn:aws:iam::aws:policy/AWSOrganizationsReadOnlyAccess
- arn:aws:iam::aws:policy/IAMReadOnlyAccess
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
AWS: # TODO: review permissions to see if this can be narrowed down - code build only perhaps
- !Sub "arn:aws:iam::${AuditorAccountId}:root"
Action:
- "sts:AssumeRole"
- Effect: "Allow"
Principal:
Service:
- "codebuild.amazonaws.com"
Action:
- "sts:AssumeRole"
# TODO: restrict to only AuditorAccount only
Policies:
- PolicyName: "ProwlerPolicyAdditions"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: "ProwlerPolicyAdditions"
Effect: "Allow"
Resource: "*"
Action:
- "acm:describecertificate"
- "acm:listcertificates"
- "es:describeelasticsearchdomainconfig"
- "logs:DescribeLogGroups"
- "logs:DescribeMetricFilters"
- "ses:getidentityverificationattributes"
- "sns:listsubscriptionsbytopic"
- "guardduty:ListDetectors"
- "guardduty:GetDetector"
- "S3:GetEncryptionConfiguration"
- "trustedadvisor:Describe*"
- "cloudtrail:GetEventSelectors"
- "apigateway:GET"
- "support:*"
Metadata:
cfn_nag:
rules_to_suppress:
- id: W28
reason: "the role name is intentionally static"
- id: W11
reason: "the policy grants read/view/audit access only, to all resources, by design"
- id: F3
reason: "Support does not allow or deny access to individual actions"
Loading

0 comments on commit 31a4024

Please sign in to comment.