The trivy, formerly tfsec, utility is an open source static code analysis tool for Terraform maintained by Aqua Security. It checks for misconfigurations in most major cloud providers, hundreds of built in rules, and is built on top of rego policies.
To get started with Trivy all you need to do is run trivy config . in your current directory. It will recursively check your current directory for any terraform files and recursively review them for security findings.
To install tfsec you can refer to their installation documentation as well as manually install the releases. Please note that tfsec has now migrated to Trivy.
Getting started with tfsec is as simple as tfsec . to scan the current directory recursively. TFSec will immediately begin scanning your IaC and giving you recommendations for securing your infrastructure.