Links

npm Teams & npm Enterprise

Overview

Feature availability This feature is available with Enterprise plans. See pricing plans for more details.
Snyk can use custom npm Teams & npm Enterprise repositories with npm and Yarn projects.
This enables Snyk to resolve all direct and transitive dependencies of packages hosted on the custom registry and calculate a more complete, accurate dependency graph and related vulnerabilities.
Once configured, Snyk will also use this information to access private dependencies when creating Pull/Merge Requests, by allowing npm and yarn to reach those deps in order to regenerate the lockfile.
You can add configuration to tell Snyk where your private npm Teams and npm Enterprise Node.js packages are hosted and what scope they are under.
This is the same information you would normally add in your .yarnrc or .npmrc
This guide is relevant for Snyk Web UI integrations only, the Snyk CLI already supports yarn and npm projects with private npm Teams and npm Enterprise registries.

JavaScript Language Settings

  1. 1.
    Go to settings
    > Languages > JavaScript and either the npm or yarn settings depending on your project types (yarn shown in screenshots below)
  2. 2.
    If you have not previously connected to npm Teams or npm Enterprise you will be asked to configure an integration first, see npm Teams & npm Enterprise Registry Settings below
  3. 3.
    Once you have set up the integration, select Add registry configuration
    1. 1.
      Select "npm" as the Package source
    2. 2.
      If you want to configure this registry as default registry url, then leave scope blank
    3. 3.
      If you want to configure only scoped packages to use this registry then add a scope
    4. 4.
      If you want to add a mix of default registry url and scoped packages, add multiple configurations - one for the default and one per scope.
  4. 4.
    When you have added all the registries and scopes you want, click Update settings.
  5. 5.
    Now test it out - open a Pull/Merge Request on a project that contains private dependencies to see a lockfile updated and included in the Snyk Fix Pull Request where previously none was generated.

npm Teams & npm Enterprise Registry Settings

You can configure token based authentication for npm Teams and npm Enterprise integrations.

Getting started

  1. 1.
    Go to settings
    > Integrations > Package Repositories > npm
  2. 2.
    You should see the Credentials screen at the beginning (see below)
  3. 3.
    Enter Public URL and Token values.
  4. 4.
    Click Save.
© 2023 Snyk Limited | All product and company names and logos are trademarks of their respective owners.