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

     1  package sam
     2  
     3  var cloudFormationEnableStateMachineTracingGoodExamples = []string{
     4  	`---
     5  AWSTemplateFormatVersion: 2010-09-09
     6  Description: Good Example of SAM API
     7  Resources:
     8    GoodStateMachine:
     9      Type: AWS::Serverless::StateMachine
    10      Properties:
    11        Definition:
    12          StartAt: MyLambdaState
    13          States:
    14            MyLambdaState:
    15              Type: Task
    16              Resource: arn:aws:lambda:us-east-1:123456123456:function:my-sample-lambda-app
    17              End: true
    18        Role: arn:aws:iam::123456123456:role/service-role/my-sample-role
    19        Tracing:
    20          Enabled: true
    21  `,
    22  }
    23  
    24  var cloudFormationEnableStateMachineTracingBadExamples = []string{
    25  	`---
    26  AWSTemplateFormatVersion: 2010-09-09
    27  Description: Bad Example of SAM API
    28  Resources:
    29    BadStateMachine:
    30      Type: AWS::Serverless::StateMachine
    31      Properties:
    32        Definition:
    33          StartAt: MyLambdaState
    34          States:
    35            MyLambdaState:
    36              Type: Task
    37              Resource: arn:aws:lambda:us-east-1:123456123456:function:my-sample-lambda-app
    38              End: true
    39        Role: arn:aws:iam::123456123456:role/service-role/my-sample-role
    40        Tracing:
    41          Enabled: false
    42  `, `---
    43  AWSTemplateFormatVersion: 2010-09-09
    44  Description: Bad Example of SAM API
    45  Resources:
    46    BadStateMachine:
    47      Type: AWS::Serverless::StateMachine
    48      Properties:
    49        Definition:
    50          StartAt: MyLambdaState
    51          States:
    52            MyLambdaState:
    53              Type: Task
    54              Resource: arn:aws:lambda:us-east-1:123456123456:function:my-sample-lambda-app
    55              End: true
    56        Role: arn:aws:iam::123456123456:role/service-role/my-sample-role
    57  `,
    58  }
    59  
    60  var cloudFormationEnableStateMachineTracingLinks = []string{}
    61  
    62  var cloudFormationEnableStateMachineTracingRemediationMarkdown = ``