0
0
Terraformcloud~10 mins

Terraform security scanning tools - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run a basic security scan using tfsec.

Terraform
tfsec [1]
Drag options to blanks, or click blank then click option'
A--init
B--plan
C--apply
D.
Attempts:
3 left
💡 Hint
Common Mistakes
Using --init instead of specifying the directory
Using --apply which is not a tfsec option
Using --plan which is a Terraform command, not tfsec
2fill in blank
medium

Complete the code to run checkov on a Terraform directory.

Terraform
checkov -d [1]
Drag options to blanks, or click blank then click option'
Aterraform
B.
C/tmp
D/var/log
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated directories that don't contain Terraform files
Confusing checkov flags with Terraform commands
3fill in blank
hard

Fix the error in the command to run tfsec with JSON output.

Terraform
tfsec --format [1]
Drag options to blanks, or click blank then click option'
Ajson
Bxml
Cyaml
Dtxt
Attempts:
3 left
💡 Hint
Common Mistakes
Using unsupported formats like xml or yaml
Using txt which is not a valid format flag
4fill in blank
hard

Fill both blanks to run checkov on a Terraform directory with output to a file.

Terraform
checkov -d [1] --output-file-path [2]
Drag options to blanks, or click blank then click option'
A.
Boutput.json
C--skip-check CKV_AWS_20
D--skip-check CKV_AWS_21
Attempts:
3 left
💡 Hint
Common Mistakes
Putting skip-check flags in place of directory or output file
Using invalid file names or paths
5fill in blank
hard

Fill all three blanks to run tfsec on a specific directory, output JSON, and exclude a rule.

Terraform
tfsec [1] --format [2] --exclude [3]
Drag options to blanks, or click blank then click option'
Aterraform
Bjson
CAWS001
Dterraform.tfstate
Attempts:
3 left
💡 Hint
Common Mistakes
Using a file instead of directory for first blank
Using unsupported formats
Using invalid or unrelated exclude values