# Snyk

![Snyk-logo.png](https://assets.relyanceuat.xyz/images/docs/6592897346957/6592744175501.png)
Snyk is a developer security platform for securing code, dependencies, containers, and infrastructure as code. It is a vulnerability scanner and automated vulnerability testing tool that monitors for misconfigurations or coding flaws that pose cybersecurity threats.

In order to integrate Snyk with Relyance AI you will need a Snyk **Auth Token**, **Organization Ids** (delimited by semicolons ';'), and **Group Ids** (delimited by semicolons ';').

#### In Snyk:

Obtain your **Auth Token**:

1. Login to your Snyk account.
2. From the homepage, select the user menu in the top-right, and from the drop down menu select **Account settings**.

![Snyk-1.png](https://assets.relyanceuat.xyz/images/docs/6592897346957/6593152792461.png)

3. On the account settings page you will be able to click the box shown to obtain your **Auth Token**:

![Snyk-3.png](https://assets.relyanceuat.xyz/images/docs/6592897346957/6593163345293.png)

4. Copy this key to be used in Relyance AI.

Obtain your **Organization / Group IDs**:
(These will be important for extracting PI Data types from the instance.)

1. From the top menu select the gear icon.

![Snyk-2.png](https://assets.relyanceuat.xyz/images/docs/6592897346957/6593199323917.png)

2. From here you can select the **Group** and **Organization Ids**.

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Snyk** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **Auth Token**, **Organization Ids**, and **Group Ids** into their respective fields.

![Snyk-4.png](https://assets.relyanceuat.xyz/images/docs/6592897346957/6593213010317.png)

9. Click **Authenticate**.
10. At this point, you should see the following result on the Vendor Integrations page:

![Snyk-5.png](https://assets.relyanceuat.xyz/images/docs/6592897346957/6593270553613.png)

11. Congratulations, you are now connected to **Snyk**.

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "snyk" {
  vendor = "snyk"
  name   = "<your connection name>"

  auth = {
    method = "access-token"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      auth_token = var.snyk_auth_token
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
