github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/cloudfront/enable_logging.cf.go (about)

     1  package cloudfront
     2  
     3  var cloudFormationEnableLoggingGoodExamples = []string{
     4  	`---
     5  Resources:
     6    GoodExample:
     7      Properties:
     8        DistributionConfig:
     9          DefaultCacheBehavior:
    10            TargetOriginId: target
    11            ViewerProtocolPolicy: https-only
    12          Enabled: true
    13          Logging:
    14            Bucket: logging-bucket
    15          Origins:
    16            - DomainName: https://some.domain
    17              Id: somedomain1
    18      Type: AWS::CloudFront::Distribution
    19  `,
    20  }
    21  
    22  var cloudFormationEnableLoggingBadExamples = []string{
    23  	`---
    24  Resources:
    25    BadExample:
    26      Properties:
    27        DistributionConfig:
    28          DefaultCacheBehavior:
    29            TargetOriginId: target
    30            ViewerProtocolPolicy: https-only
    31          Enabled: true
    32          Origins:
    33            - DomainName: https://some.domain
    34              Id: somedomain1
    35      Type: AWS::CloudFront::Distribution
    36  `,
    37  }
    38  
    39  var cloudFormationEnableLoggingLinks = []string{}
    40  
    41  var cloudFormationEnableLoggingRemediationMarkdown = ``