How to Install Terrascan?

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

1. For any Native Executable (MacOS or Linux)

Type the command below to download Terrascan into your system’s terminal.

$ curl -L "$(curl -s https://api.github.com/repos/tenable/terrascan/releases/latest | grep -o -E "https://.+?_Darwin_x86_64.tar.gz")" > terrascan.tar.gz
$ tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz
$ install terrascan /usr/local/bin && rm terrascan
$ terrascan

2. For ArchLinux/Manjaro via AUR (Arch User Repository)

Type the following command in the terminal.

yay -S terrascan

3. For Homebrew Users (MacOS)

You can install Terrascan using the brew command.

$ brew install terrascan

4. Install as a Docker Image

The functionalities of Terrascan can also be used as a Docker image. You can type the following command:

$ docker run tenable/terrascan

5. For Windows systems

You can download Terrascan from this page. After installing the zip file, extract it to your desired folder.

After installation, add a path to the Terrascan executable by editing in the “Environment Variables”.

Edit the “Path” section in the Environment variables.

Click “New” to add a new path. Add the path to the Terrascan CMD to the paths.

6. Using Python

If you have Python, there is no need to install Terrascan in your system. The terrascan module is built in Python. You can use the pip command to install Terrascan in your system or in your Python shell.

pip install terrascan

After installing it, to check if it works, you can use the “–version” command. You can view all the available commands in the Terrascan module as shonw below using the command:

terrascan -h

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

...

Contact Us