github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/codebuild/enable_encryption.tf.go (about) 1 package codebuild 2 3 var terraformEnableEncryptionGoodExamples = []string{ 4 ` 5 resource "aws_codebuild_project" "good_example" { 6 // other config 7 8 artifacts { 9 // other artifacts config 10 11 encryption_disabled = false 12 } 13 } 14 15 resource "aws_codebuild_project" "good_example" { 16 // other config 17 18 artifacts { 19 // other artifacts config 20 } 21 } 22 23 resource "aws_codebuild_project" "codebuild" { 24 // other config 25 26 secondary_artifacts { 27 // other artifacts config 28 29 encryption_disabled = false 30 } 31 32 secondary_artifacts { 33 // other artifacts config 34 } 35 } 36 `, 37 } 38 39 var terraformEnableEncryptionBadExamples = []string{ 40 ` 41 resource "aws_codebuild_project" "bad_example" { 42 // other config 43 44 artifacts { 45 // other artifacts config 46 47 encryption_disabled = true 48 } 49 } 50 51 resource "aws_codebuild_project" "bad_example" { 52 // other config including primary artifacts 53 54 secondary_artifacts { 55 // other artifacts config 56 57 encryption_disabled = false 58 } 59 60 secondary_artifacts { 61 // other artifacts config 62 63 encryption_disabled = true 64 } 65 } 66 `, 67 } 68 69 var terraformEnableEncryptionLinks = []string{ 70 `https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codebuild_project#encryption_disabled`, 71 } 72 73 var terraformEnableEncryptionRemediationMarkdown = ``