Configure Endor Labs to integrate with private npm repositories to access proprietary dependencies during security scanning and analysis. When your JavaScript or Node.js projects depend on packages in private or corporate repositories, Endor Labs needs authentication credentials. These credentials let Endor Labs resolve dependencies and generate a complete bill of materials. This integration enables Endor Labs to:Documentation Index
Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
Use this file to discover all available pages before exploring further.
- Access private npm packages during dependency resolution
- Generate comprehensive security analysis including private dependencies
- Maintain complete visibility into your software supply chain
- Use package manager integrations to simplify scanning when authentication to private repositories is not part of standard manifest or settings files.
- Package manager integrations allow you to set custom repositories for each package ecosystem and the priority of each repository for scanning.
- Sign in to Endor Labs and select Integrations from the left sidebar.
- Click Add next to the package manager configuration you want to add.
- Click Add Package Manager.
- Enter the name of the package manager.
- Select either Basic or AWS Code Artifactory as Authentication Type. See AWS authentication for more information.
Authenticate to npm private package repositories
To connect to private repositories of npm enter the package manager URL and the package registry credentials such as username and password.
Test package manager integration
You can test the connection to a configured package manager to verify that Endor Labs can reach the repository. To test the connection:- Select Integrations from the left sidebar.
- Click Manage in the package manager configuration you want to customize.
- Click the vertical three dots of the package manager configured and select Test Connection.
The integration does not perform authentication or authorization checks on the package manager repository.
Edit package manager integration
You can edit an existing package manager integration to update the name, repository URL, or authentication credentials. To edit a package manager integration:- Select Integrations from the left sidebar.
- Click Manage next to the package manager you want to edit.
- Click the vertical three dots on the configured integration you want to edit and select Edit.
- You can modify the name, package manager URL, and credentials.
- Click Save Changes.
Package manager integration for npm using API
Use endorctl to create a package manager resource for your private npm registry and authenticate using one of the following tokens:- Base64-encoded username and password
- Basic authentication token
You can configure multiple npm package managers only if each configuration has its own scope.
Base64-encoded authentication token
-
Generate base64 token
To generate the base64 encoded username and password, run the following command. Copy the token generated and store it in a secure place.
-
Create package manager resource
Run the following command to create a package manager resource and authenticate to npm registry using base64 token without scope.
Replace:
base64 tokenwith the generated base64 encoded username and password in the previous step.namespacewith your namespace.
Basic authentication token
Run the following command to create a package manager resource and authenticate to npm registry using basic authentication token with scope. Replace:xxxwith your authentication token.namespacewith your namespace.@scopewith your scope. For example,"scope":"@abc-corp".