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

     1  package sqs
     2  
     3  var cloudFormationNoWildcardsInPolicyDocumentsGoodExamples = []string{
     4  	`---
     5  AWSTemplateFormatVersion: 2010-09-09
     6  Description: Good example of queue policy
     7  Resources:
     8    MyQueue:
     9      Type: AWS::SQS::Queue
    10      Properties:
    11        Name: something
    12    SampleSQSPolicy: 
    13      Type: AWS::SQS::QueuePolicy
    14      Properties: 
    15        Queues: 
    16          - Ref: MyQueue
    17        PolicyDocument: 
    18          Statement: 
    19            - 
    20              Action: 
    21                - "SQS:SendMessage" 
    22                - "SQS:ReceiveMessage"
    23              Effect: "Allow"
    24              Resource: "arn:aws:sqs:us-east-2:444455556666:queue2"
    25              Principal:  
    26                AWS: 
    27                  - "111122223333"        
    28  `,
    29  }
    30  
    31  var cloudFormationNoWildcardsInPolicyDocumentsBadExamples = []string{
    32  	`---
    33  AWSTemplateFormatVersion: 2010-09-09
    34  Description: Bad example of queue policy
    35  Resources:
    36    MyQueue:
    37      Type: AWS::SQS::Queue
    38      Properties:
    39        Name: something
    40    SampleSQSPolicy: 
    41      Type: AWS::SQS::QueuePolicy
    42      Properties: 
    43        Queues: 
    44          - !Ref MyQueue
    45        PolicyDocument: 
    46          Statement: 
    47            - 
    48              Action: 
    49                - "*" 
    50              Effect: "Allow"
    51              Resource: "arn:aws:sqs:us-east-2:444455556666:queue2"
    52              Principal:  
    53                AWS: 
    54                  - "111122223333"        
    55  `,
    56  }
    57  
    58  var cloudFormationNoWildcardsInPolicyDocumentsLinks = []string{}
    59  
    60  var cloudFormationNoWildcardsInPolicyDocumentsRemediationMarkdown = ``