How to scan your IaC using Terrascan?

You can use the following commands to scan your IaC using Terrascan.

If Python module is Installed

If you’re not using the Python module, you need to use the command in your terminal:

terrascan scan -f <filename>

If Python module is not Installed

If you’re using the Terrascan module from Python, the command line changes a bit.

terrascan -f <filename>

Updating Terrascan Software

Since it is an open-source software, there will be updates to the software from time to time. You can update it using the command:

terrascan init

What is Terrascan? Features, Installation and Use Cases

Terrascan is a popular software used to detect any possible vulnerabilities in IaC (Infrastructure as Code) structures. With its predefined built-in policies, Terrascan can detect any vulnerabilities in your code and let you know about the policy violations in detail, including their severity. The violations can range from minor infractions to severe structural compromises detected in the code. Before we go into detail, let’s see more about Terrascan.

Similar Reads

What is Terrascan?

It is an open-source static code analysis tool. It is used to scan the templates in IaC and cross-check them with the in-built policies defining the structure of a good IaC. It is good for beginners trying to learn how to build IaC in the cloud, AWS, Azure, and GCP....

What are the Key Features of Terrascan?

Numerous features of Terrascan can be used to your advantage. Key features are mentioned below:...

How to Install Terrascan?

There are many ways provided by the developers to install Terrascan in your system. They are shown below....

How to scan your IaC using Terrascan?

You can use the following commands to scan your IaC using Terrascan....

What are the Use Cases of Terrascan?

Here are some common use cases of Terrascan as seen below....

Conclusion

...

FAQs

...