Vulnerability scanners and Chainguard Libraries
Details for using vulnerability scanners with Chainguard Libraries.
Most supply chain attacks succeed the same way: malicious code is injected into a package after the source is written — either as a backdoored binary with no verifiable source, or as a malicious install-time script that runs the moment a dependency is pulled. Recent attacks on LiteLLM, Telnyx, and Axios all followed this pattern.
Chainguard Libraries are rebuilt from verified source in an isolated build environment, making them malware-resistant by design. If the source can’t be verified, the package doesn’t appear in the Chainguard Repository. They are drop-in replacements for the Python, Java, and JavaScript packages your engineers already use, with no breaking changes.
This guide covers the high-level steps to get up and running. For full reference documentation on any step, follow the links provided.
Before getting started:
If you’re not yet a Chainguard user, you must create an account.
Install chainctl and
log in:
chainctl auth loginEntitle access for yourself to Chainguard Libraries.
chainctl libraries entitlements create --ecosystems=JAVASCRIPTThe available ecosystems are JAVASCRIPT, JAVA, and PYTHON.
Learn more about this command in the chainctl documentation.
There are two ways to access Chainguard Libraries:
Artifact manager (recommended): Configure credentials once in a tool like JFrog Artifactory, Sonatype Nexus, or Cloudsmith. All projects and developers automatically inherit the configuration. This centralizes policy, logging, and fallback behavior.
Direct access: Configure authentication directly in each project’s build configuration.
Learn more about these options in Chainguard Libraries access.
Pull tokens
are required for authentication. You can create one using chainctl:
chainctl auth pull-token --repository=java --parent=example.com --ttl=720hjava with python or javascript depending on your chosen ecosystem.example.com with your organization name.720h (30 days); the maximum is 8760h (365 days).The command returns a username and password for basic authentication. Store these securely, as they won’t be shown again.
You can also create pull tokens via the Chainguard Console under Overview > Manage pull tokens > Create access token.
Once you have a pull token, you can configure your build tool. Configuration steps vary by build tool and ecosystem. See the ecosystem-specific documentation pages for instructions.
https://libraries.cgr.dev/java/ as the first repository for artifact
resolution, falling back to Maven Central for unavailable libraries.https://libraries.cgr.dev/java/. Use direct access for
small teams or evaluations, or when you have an existing repository
configuration you can’t change yet.Check out minimal example projects for Maven and Gradle to understand how to use these repositories.
Note that there are multiple repositories:
https://libraries.cgr.dev/python/ with the simple index at
https://libraries.cgr.dev/python/simplehttps://libraries.cgr.dev/python-remediated with the simple index at
https://libraries.cgr.dev/python-remediated/simple for libraries with CVE
remediationCheck out minimal example projects for uv and pip to understand how to use these repositories.
In addition to malware-resistance, Chainguard Libraries for Python includes CVE remediation for select libraries. These patched versions help reduce known risk while you plan your next major version upgrade. You can view which libraries have CVE remediation available in the Chainguard Console. CVE remediation is currently available for Python libraries only.
.npmrc to use https://libraries.cgr.dev/javascript/ as the registry.Note on upstream fallback for JavaScript: The npm upstream fallback is available as an opt-in setting for both repository manager or direct access approaches, and is turned off by default. Upstream packages are proxied directly from npm and are not rebuilt or authored by Chainguard as part of our Libraries product. The cooldown period and malware scanning provide a supplemental baseline of protection to your own security practices, but you are solely responsible for independently evaluating and validating all upstream artifacts before use in your environment.
Learn more about upstream fallback policy and controls in the JavaScript overview.
Check out minimal example projects for npm, pnpm, Yarn, Yarn Classic, and Bun to understand how to use these repositories.
After setup, you can verify that your dependencies are sourced from Chainguard using:
chainctl libraries verify /path/to/artifactLearn more in Chainguard Libraries verification.
See the Chainguard Libraries FAQ page for common questions and issues.
Last updated: 2025-03-25 00:08