Snyk
This page describes how to configure a Snyk data source. With Data Loader, you can replicate and load your source data into your target destination.
Snyk is a Flex connector. In the Data Productivity Cloud, Flex connectors are preconfigured connectors that satisfy a number of endpoints (see below).
You can use the Snyk connector in its preconfigured state, or you can edit the connector by adding or amending available endpoints in your Snyk source as per your use case. You can edit Flex connectors in the Custom Connector user interface.
Schema Drift Support: Yes. Read Schema Drift to learn more.
Return to any page of this wizard by clicking Previous.
Click X in the upper-right of the UI and then click Yes, discard to close the pipeline creation wizard.
Prerequisites
Read the Allowed IP addresses topic before you begin. You may not be able to connect to certain data sources without first allowing the Batch IP addresses. In these circumstances, connection tests will always fail and you will not be able to complete the pipeline.
Endpoints
The following endpoints are available by default for the Snyk Flex connector:
Endpoint Name | Description | Documentation |
---|---|---|
List Organization Members | This call returns an array of all non-admin members of the Organization. | Click here |
Get Organization Level Audit Logs | Get audit logs of your group or organization. | Click here |
List All Dependencies | Get a list of all dependencies. | Click here |
List Issue Counts Over Time | To get a list of issues that have been fixed. | Click here |
List Aggregated Projects Issues | returns an array of ignoreReasons for each vulnerability. | Click here |
List All Licenses | Get a list of licenses which the packages/modules in your projects use. | Click here |
List Latest Issues | Get a list of latest issues. | Click here |
Create pipeline
- In Data Loader, click Add pipeline.
- Choose Snyk from the grid of data sources. You can also use the search bar.
When you create a Snyk Flex connector, it will become accessible from the Custom Connectors tab of the Choose sources menu. Read Flex connector setup for more information.
Choose endpoints
Select one or more endpoints to use. Use the arrow buttons to move endpoints to the Endpoints to extract and load listbox and then reorder any tables with click-and-drag. Additionally, select multiple tables using the SHIFT
key.
Click Continue with X endpoints to move forward.
Configure your endpoints
You need to configure each endpoint you wish to use. These instructions assume you have kept Configuration Mode set to "Basic".
General
The General tab displays the endpoint URL. In this tab, you can set your data warehouse table name and choose either "Basic" or "Advanced" configuration.
- Provide a data warehouse table name.
- Choose either Basic or Advanced. Advanced configuration requires more manual user input. Read Custom Connector batch pipeline to learn more.
Authentication
Snyk uses an API key for authentication.
- Read the Snyk documentation to learn how to acquire an API key.
- Specify the required key.
- Use the Manage Passwords dialog to save your API key value as a password entry.
- Click Manage.
- Click + Add new password.
- In the Add new password dialog, provide a unique, descriptive password label.
- Provide the literal value of the password.
- Click Save password.
- Click Done.
- In the API Key Value drop-down menu, choose your newly created password.
Behaviour (advanced mode)
In the Behaviour tab you can choose which elements you want to include as columns in the target table. By default, all elements are selected.
Parameters
- The Header and Body tabs are not required.
- In the Query tab, provide the Group Admin details. Refer to the Snyk documentation to become a Snyk Group Admin.
- In the URI tab, set the Snyk
org_id
detail. Refer to the Snyk documentation for the organization id to use. - Click Continue when you are happy with the configuration. An endpoint will display a green checkmark and red warnings will disappear from each tab.
Parameters (advanced mode)
- The Header and Body tabs are not required.
- Select the Query tab and provide the Group Admin details. Refer to the Snyk documentation to become a Snyk Group Admin.
- Select the URI tab and set the Snyk
org_id
detail. Refer to the Snyk documentation for the organization id to use. -
Use the Dynamic? toggle to select whether the parameter is dynamic (toggle on/green) or static (toggle off/gray).
- Static parameters have an unchanging value that you must type into the Value field.
- Dynamic parameters have a behavior dependent on which Parser is selected from the drop-down: DATE or STRING.
The DATE parser retrieves source data based on some date in your current data set. To define which date will be used, you need to create a variable (see above) mapping to that date. The MAX variable type will identify the maximum value of the mapped field in your data set and load new data based on that value. For example, if the maximum (latest) date in the current data set is one week ago, all data newer than one week ago will be loaded when the pipeline runs.
The STRING parser allows you to write a custom query that will be used in the API call.
-
Add or select a Variable after selecting a parser type. To set a new variable:
- Click Add new variable.
- Select whether the variable type is MAX or DATE. This will determine how it is used with a parameter (see below).
- Name the variable. Names must be unique.
- Select which data field the variable maps to.
- Click Add.
-
Configure the parser if required. Click the cog wheel icon next to the variable you have created to open the Version settings.
- Choose the required variable, if not already selected.
- Choose an appropriate API format.
- Choose a suitable timeframe from the Shift drop-down menu.
- In the Default field, re-enter the query with a default value for each variable. This is so that the initial run of the pipeline can retrieve data.
- Choose the required Data warehouse format from the drop-down menu.
- Click Save when finished.
Keys (advanced mode)
In the Keys tab:
- Add a key column by selecting a property from the drop-down. Use the + Add property button to add further properties as required.
- Select required parameters from the drop-down menu.
Choose destination
Choose an existing destination or click Add a new destination.
- Read Set up Snowflake to configure your Snowflake account to use Snowflake as a destination within Data Loader.
- Read Connect to Snowflake to use Snowflake as your destination for batch-loading a pipeline.
Set frequency
Property | Description |
---|---|
Pipeline name | A descriptive label for your pipeline. This is how the pipeline appears on the pipeline dashboard and how Data Loader refers to the pipeline. |
Sync every | The frequency at which the pipeline should sync. The minimum frequency is every 5 minutes. Day values include 1—7. Hour values include 1—23. Minute values include 5—59. The input is also the length of delay before the first sync. |
Currently, you can't specify a start time.
Once you are happy with your pipeline configuration, click Create pipeline to complete the process and add the pipeline to your dashboard.
Support
For any queries or assistance, visit Getting support or visit our support portal.