aws-remediate-cis-securityhub/cft/aws-cis-securityhubactions.yml [910:964]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                      DocumentVersion='1', # default
                      Parameters={
                          'TrailName': [ TrailName ],
                          'CloudTrailLogGroupArn': [ CloudTrailLogGroupArn ],
                          'CloudWatchRoleArn': [ CloudWatchRoleArn ]
                      }
                  )

              except Exception as e:
                  print(e)
                  print("SSM automation execution error")
                  raise

  CloudTrailLogFileValidationEnabledLambdaRole:
    Type: AWS::IAM::Role
    Properties:
      Policies:
      - PolicyName: CloudTrailLogFileValidationEnabledLambdaPolicy
        PolicyDocument:
          Version: 2012-10-17
          Statement:
          - Effect: Allow
            Action:
            - cloudwatch:PutMetricData
            Resource: '*'
          - Effect: Allow
            Action:
            - ssm:StartAutomationExecution
            - logs:CreateLogGroup
            - logs:CreateLogStream
            - logs:PutLogEvents
            - logs:DescribeLogGroups
            - iam:PassRole
            Resource: '*'
          - Effect: Allow
            Action:
            - cloudtrail:UpdateTrail
            - securityhub:UpdateFindings
            Resource: '*'
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
        - Effect: Allow
          Principal: { Service: lambda.amazonaws.com }
          Action:
          - sts:AssumeRole
  
# -------------------------------------------------------------------------------------------------------------------------------------------------------
# CIS AWS Foundations Benchmark - 1.5,1.6,1.7.1.8,1.9,1.10,1.11. – IAM Account Settings related to Password Policy
# -------------------------------------------------------------------------------------------------------------------------------------------------------

  IAMPasswordPolicyEnabledRule: 
    Type: AWS::Events::Rule
    Properties: 
      Name: IAMPasswordPolicyEnabledRule
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-remediate-pci-securityhub/cft/aws-security-hub-pci-remediations-template2.yml [1752:1804]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                      DocumentVersion='1', # default
                      Parameters={
                          'TrailName': [ TrailName ],
                          'CloudTrailLogGroupArn': [ CloudTrailLogGroupArn ],
                          'CloudWatchRoleArn': [ CloudWatchRoleArn ]
                      }
                  )

              except Exception as e:
                  print(e)
                  print("SSM automation execution error")
                  raise

  CloudTrailLogFileValidationEnabledLambdaRole:
    Type: AWS::IAM::Role
    Properties:
      Policies:
      - PolicyName: CloudTrailLogFileValidationEnabledLambdaPolicy
        PolicyDocument:
          Version: 2012-10-17
          Statement:
          - Effect: Allow
            Action:
            - cloudwatch:PutMetricData
            Resource: '*'
          - Effect: Allow
            Action:
            - ssm:StartAutomationExecution
            - logs:CreateLogGroup
            - logs:CreateLogStream
            - logs:PutLogEvents
            - logs:DescribeLogGroups
            - iam:PassRole
            Resource: '*'
          - Effect: Allow
            Action:
            - cloudtrail:UpdateTrail
            - securityhub:UpdateFindings
            Resource: '*'
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
        - Effect: Allow
          Principal: { Service: lambda.amazonaws.com }
          Action:
          - sts:AssumeRole
  

# PCI IAM 4
  IAMPasswordPolicyEnabledRule: 
    Type: AWS::Events::Rule
    Properties: 
      Name: IAMPasswordPolicyEnabledRule
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



