GitHub Plugin for Threat Exchange

GitHub Plugin for Threat Exchange

This document explains how to configure the GitHub plugin with the Threat Exchange module of the Netskope Cloud Exchange platform. This integration allows for sharing of file hashes of GitHub repository files with Netskope.


To complete this configuration, you need:

  • A Netskope tenant (or multiple, for example, production and development/test instances) that is already configured in Cloud Exchange.
  • A Netskope Threat Prevention subscription for malicious file hash sharing.
  • A Netskope Cloud Exchange tenant with the Threat Exchange module already configured.
  • A GitHub Account with access to repositories from which the file hashes are required to be fetched.


  1. Get the GitHub API token.
  2. Configure the GitHub Plugin.
  3. Configure sharing between Netskope and GitHub.
  4. Validate the GitHub Plugin.

Click play to watch a video.


Get the GitHub API Token

  1. Log in to GitHub.
  2. In the top right corner of any page, click your profile photo, and then click Settings.
  3. In the left panel, click Developer settings.
  4. In the left panel, click Personal access tokens.
  5. Click Generate new token from top right corner.
  6. In Note, give your token a descriptive name.
  7. Select the following scopes for repo and user.
  8. Click the Generate token icon.
  9. Copy the newly generated token by pressing image9.jpeg and save it in a secure location. This token is used to configuring the GitHub plugin.

Configure the GitHub Plugin

  1. In Cloud Exchange, go to Settings and click Plugins.
  2. Search for and select the GitHub plugin box to open the plugin creation pages.
  3. Enter the Basic Information on the first page:
    • Configuration Name: Enter a name appropriate for your integration.
    • Poll Interval: Adjust to environment needs. We recommend not to go below 5 minutes for production environments.
    • Aging Criteria: Leave the default.
    • Override Reputation: Leave the default.
    • Enable SSL Verification: Leave the default.
  4. Click Next.
  5. Enter the Configuration Parameters on the second page:
    • Base URL: Enter the Base URL of your GitHub API (only if default needs to be changed).
    • API Token: Enter your GitHub API token.
    • Repository Name: Enter comma-separated names of the repositories for which the file hashes are to be fetched. Leave empty to include all accessible repositories.
    • Tag: Leave the default.
    • Quota Limit: Leave the default.
  6. Click Save in the top right corner. Go to Threat Exchange > Plugins to see your new GitHub plugin.

Configure Sharing for Netskope and GitHub

  1. Go to Threat Exchange and select Sharing. The Sharing page displays the existing relationships for each sharing configuration in grid view as shown below. The Sharing page also has inputs to configure new sharing from one plugin to another.
  2. Click Add Sharing Configuration, and in the Source Configuration dropdown list, select Github.
  3. Select a Business Rule, and then select Netskope for the Destination Configuration. Sharing configurations are unidirectional. data obtained from one plugin is shared with another plugin. To achieve bi- or multi-directional sharing, configure each separately.
  4. Select a Target. Each plugin will have a different target or destination for the IoC.

    Depending on the Target selected, Add to URL List or Add to File Hash List, the remaining options change. If using a File Hash List, jump to the next step.

    For a URL List, select a List Name, enter a New List Name. The List Name must exist in the Netskope UI. For information about creating a URL List, refer to Add a URL List. Now select a URL List Type, and then a List Size and Default URL.

  5. For Add a File Hash List, enter a List Name, List Size, and Default File Hash. The List Name needs to exist in your Netskope UI at Settings > Policies > Profiles. For information about creating a File Profile for hashes, refer to Adding a File Profile
  6. Click Save.
  7. Repeat steps 2-6, but select Netskope as the Source Configuration and GitHub as the Destination Configuration.
  8. Click Save.

Adding a new sharing configuration on the active source poll will share the existing IoCs of the source configuration to the destination configuration. Whenever a new sharing configuration is built, all the active IoCs will also be considered for sharing if they match the source/destination combination.


Plugins that do not have API for ingesting data cannot receive threat data. This is true of the installed plugin API Source, which provides a bucket associated with an API endpoint for remote 3rd-party systems to push data to. Once a Sharing policy has been added, it takes effect.

After a sharing configuration has been created, the sharing table will show the rule being invoked, the source system providing the potential IoC matches, the destination system that will receive matching IoC, and the target applicable to that rule. Multiple Sharing configurations can be made to support mapping certain IoC to multiple targets even on the system destination system.

Modify, Test, or Delete a Sharing Configuration

Each configuration supports 3 actions:

  • Edit the rule by clicking on the pencil icon.
  • Test the rule by clicking on the synchronization icon. This tests how many IoC will actually be sent to the destination system based on the timeframe and the rule.
  • Delete the rule by clicking on the garbage can icon.

Validate the GitHub Plugin

In order to validate the integration you must have at least one repository accessible to the configured user on GitHub.

  1. Go to Threat Exchange, and click Threat IoCs. You should see records from your GitHub plugin. You can filter based on Source values to check both the Netskope and GitHub plugin.
  2. In the Netskope UI, go to Policies > File > Your Custom File Profile and click File Hash.
  3. If data is not being brokered between the platforms, you can look at the audit logs in Cloud Exchange. In Cloud Exchange go to Logging and look through the logs for errors.
Share this Doc

GitHub Plugin for Threat Exchange

Or copy link

In this topic ...