github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/ec2/no_sensitive_info.tf.go (about) 1 package ec2 2 3 var terraformNoSensitiveInfoGoodExamples = []string{ 4 ` 5 resource "aws_launch_configuration" "as_conf" { 6 name = "web_config" 7 image_id = data.aws_ami.ubuntu.id 8 instance_type = "t2.micro" 9 user_data = <<EOF 10 export GREETING="Hello there" 11 EOF 12 } 13 `, ` 14 resource "aws_launch_configuration" "as_conf" { 15 name = "web_config" 16 image_id = data.aws_ami.ubuntu.id 17 instance_type = "t2.micro" 18 user_data_base64 = "ZXhwb3J0IEVESVRPUj12aW1hY3M=" 19 } 20 `, 21 } 22 23 var terraformNoSensitiveInfoBadExamples = []string{ 24 ` 25 resource "aws_launch_configuration" "as_conf" { 26 name = "web_config" 27 image_id = data.aws_ami.ubuntu.id 28 instance_type = "t2.micro" 29 user_data = <<EOF 30 export DATABASE_PASSWORD=\"SomeSortOfPassword\" 31 EOF 32 } 33 `, ` 34 resource "aws_launch_configuration" "as_conf" { 35 name = "web_config" 36 image_id = data.aws_ami.ubuntu.id 37 instance_type = "t2.micro" 38 user_data_base64 = "ZXhwb3J0IERBVEFCQVNFX1BBU1NXT1JEPSJTb21lU29ydE9mUGFzc3dvcmQi" 39 } 40 `, 41 } 42 43 var terraformNoSensitiveInfoLinks = []string{ 44 `https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#user_data,user_data_base64`, 45 } 46 47 var terraformNoSensitiveInfoRemediationMarkdown = ``