Artifactory Registry for npm

Overview

Feature availability This feature is available with Enterprise plans. See pricing plans for more details.
Snyk can use Artifactory Package Repositories with npm and Yarn projects.
This enables Snyk to regenerate lockfiles with the correct URLs when creating Pull/Merge Requests.
You can add configuration to tell Snyk where your private Artifactory 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
Note This guide is relevant for Snyk UI integrations only, the CLI already supports yarn and npm projects with private Artifactory registries.

JavaScript Language Settings

  1. 1.
    Go to settings
    > Languages > JavaScript and either the npm or yarn settings depending on your project types
  2. 2.
    If you have not previously connected to Artifactory you will be asked to configure an integration first, see Artifactory Registry Setup.
  3. 3.
    Select “Add registry configuration”
    1. 1.
      Select "Artifactory" 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.

Now test it out

Open a Pull/Merge Request on a project that contains private dependencies that are hosted in Artifactory to see a lockfile updated and included in the Snyk Fix Pull Request with the correct URL to your repository
Export as PDF
Copy link
Edit on GitHub