Links

Getting started with Snyk Infrastructure as Code (IaC)

Get started with Snyk IaC to inspect, find and fix issues in configuration files for Terraform or Kubernetes (including Helm) environments. For more information, see Scan Kubernetes configuration files and Scan Terraform files.
This article describes a process using the Snyk.io UI. For details of using IaC with the Snyk CLI, see Snyk CLI for Infrastructure as Code.

Prerequisites

Ensure you have:
For more details, see:

Stage 1: Import projects

Import projects to test with Snyk, by choosing repositories for Snyk to test and monitor.
  1. 1.
    Select Projects from Snyk.io.
  2. 2.
    Select the tool to add the project from (for example GitHub).
  3. 3.
    In Personal and Organization repositories, select the repositories to use.
  4. 4.
    Click Add selected repositories to import the selected repositories into your projects.
  5. 5.
    A progress bar appears: click View log to see import log results (you can scan both Kubernetes and Terraform files simultaneously)
  6. 6.
    Project import completes.
Currently Snyk Infrastructure as Code projects has a recurring test default interval of 1 week. The default interval is changed under project settings.

Stage 2: View configuration file issues

View results for configuration files in imported projects.
Select Projects, then click on the imported project entry, to see information for scanned configuration files, including the number of high, medium and low severity issues found. For example:
(Issues are sorted into project types: Helm, Kubernetes and Terraform.)
Click on a project to see more information and details of the issues in a configuration file:
If you encounter any errors during import, see Importing projects FAQs.

Stage 3: View and fix config files

Act on the recommendations produced by Snyk IaC.
  1. 1.
    IaC results appear as direct issues in the relevant scanned configuration files.
  2. 2.
    Click on an issue to see the details for that issue, and specific recommendations from Snyk IaC.
  3. 3.
    Edit the configuration file to fix the issue identified, based on the recommendations, then commit the change.
  4. 4.
    Snyk automatically rescans the changed file, and you can see the change reflected in the issue display.

For more information