Snyk Documentation


Snyk can be used with private source code management systems (SCMs) such as GitHub Enterprise installations via an applicative tunnel, referred to as the Snyk “Broker”. A Snyk Broker allows moderated access to a private SCM deployment, securely connecting Snyk to your locally managed code repositories. It keeps sensitive data such as your access tokens within the perimeter of your private network, while narrowing down SCM access to the bare minimum required for Snyk.

These instructions will get you up and running with a Snyk Broker, allowing your private SCM to connect to

Snyk Broker currently supports the following SCMs:

  1. GitHub Enterprise
  3. Bitbucket Server
  5. On-premise GitLab deployment
  6. On-premise Jira


How it works

The Snyk Broker is made up of two web servers that proxy requests over a secure web socket connection. The Broker client runs within your network, in a location with connectivity to your private SCM. On start-up it establishes a secure web socket connection to a Broker server running at Requests from Snyk to your private SCM and web-hook initiated requests from your private SCM to Snyk are sent over this tunnel.
The Broker client has a white list of allowed requests (expressed as a JSON file), ensuring that only requests which are required for Snyk to function are proxied. All other requests are dropped. Requests are filtered on both request path, and JSON body.
The default provided white list allows only the following requests:

  1. is only allowed to fetch dependency manifest files and the Snyk policy file. All other requests are dropped.
  2. SCM web-hooks are only allowed if they notify of a relevant event (push to branch, pull request opened), AND the event data includes a dependency manifest file or a Snyk policy file. All other web-hooks are dropped.


Snyk setup

In order to use Snyk with your SCM, Snyk will first need to enable Broker support for one of your Snyk organisations.
To request Broker support, contact with the name of the organisation that you’d like to connect to your SCM.
Each Broker is identified by a UUID token. Once Broker support has been enabled for your organisation, you can access your unique Broker token on the organisation’s settings page. This token is private, and must not be shared.

GitHub / GitHub Enterprise setup

In order to interact with your or GitHub Enterprise repositories, Snyk needs to use a personal access token with “repo” scope.

To create a GitHub personal access token:

  1. log in to your or GitHub Enterprise account
  2. navigate to “/settings/tokens” in your web browser. e.g. for, go to
  3. click on the “Generate new token” button
  4. enter a description for the token, and select the “repo” scope
  5. click on the “Generate token” button
  6. securely save the token so that you can configure your Broker client with it

This GitHub token must be provided to the Broker client, which then identifies with it on requests as they are proxied from Snyk to your or GitHub Enterprise.

The GitHub token never leaves your network!

Bitbucket Server setup

In order to interact with your Bitbucket Server repositories, Snyk needs to use the credentials of a Bitbucket user. The username and password must be provided to the Broker client, which then identifies with these credentials on requests as they are proxied from Snyk to your Bitbucket Server deployment.

The Bitbucket Server credentials never leave your network!

GitLab setup

In order to interact with your GitLab projects, Snyk needs to use an access token with an  api scope. The access token must be provided to the broker client, which then identifies with these credentials on requests as they are proxied from Snyk to your Gitlab deployment.

The GitLab access token never leaves your network!

Jira setup

First, create a new user with API access in your Jira instance that can be used by Snyk. These credentials need to be provided to the Broker client, which then identifies with these credentials on requests as they are proxied from Snyk to your Jira instance. Note that the Jira user credentials never leave your network. If you wish to authenticate with an API token, then provide the username (usually an email address) as the JIRA_USERNAME and the API token as the JIRA_PASSWORD.

Next, you’ll need to generate a new Broker UUID token. Go to “Integrations” in your org settings area, then click on “Jira” in the list, and “Edit Settings”. If you are installing the Jira Broker for the first time, click on the link “For installation of Jira within a private network”.
Here, you can configure how Snyk will interact with the Jira instance. Click “generate” to create a new token for use in the Broker client.

For more information about setting up and integrating Snyk with Jira, please refer to the Jira integration documentation.

Broker client

The Broker client is a web server which securely relays requests between Snyk’s servers and your repositories hosted on supported SCMs. It needs to run on a network which has both outbound internet access and access to your SCM.

The Broker client is best installed as a docker image. See the Dockerhub page for further details on installing and configuring your Broker client.
The Broker is an open source project hosted at GitHub.

Connect Snyk to your Brokered SCM

Once your Broker client is up and running, you can connect you Snyk account to your SCM in a secure manner.

  1. Important: log out of
  2. log back in to
  3. select the organisation that you’re using with your Broker
  4. navigate to the “Projects” page
  5. click on “Add Projects”
  6. you will be prompted to select the type of SCM - GitHub (for both or GitHub Enterprise) or Bitbucket Server, depending on your organisation’s settings
  7. if you choose GitHub, you will be prompted for permissions, which must be provided. This is required while the Broker is in early-access, but this access is not used
  8. you should see repositories from your Brokered SCM



If you do not see any repositories, you may need to click the “Refresh results” link.
If you see your repositories then log out, then log back in and try again.