The `snyk-mvn-plugin` is an internal JavaScript/TypeScript component primarily designed to be used by the Snyk CLI tool. Its core function is to analyze Maven project dependencies by inspecting `pom.xml` files and archive files (like JAR/WAR) to build detailed dependency graphs. It supports optional inclusion of test-scoped dependencies, provides verbose output for comprehensive version resolution, and can generate cryptographic artifact fingerprints for supply chain integrity. The current stable version is 4.6.1, released on 2026-03-23, with a frequent release cadence indicating active development and continuous feature enhancements and bug fixes. This plugin is distinct from the `snyk-maven-plugin`, which is a native Maven plugin for integrating Snyk tasks directly into a Maven build process. This package specifically focuses on providing dependency metadata to the Snyk CLI for vulnerability scanning and requires Node.js 20 or higher for execution.
npm install snyk-mvn-pluginVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the `inspect` function to analyze a Maven `pom.xml` file, including options for provenance and algorithm selection.
Ensure the Snyk CLI is installed and configured if attempting to perform security analysis. If integrating with Maven builds, consider using `io.snyk:snyk-maven-plugin` directly in your `pom.xml`.
Upgrade your Node.js environment to version 20 or newer. Use a Node.js version manager like `nvm` to easily switch versions.
Ensure Maven is installed and configured in your system's PATH, or that a `mvnw` executable exists and is runnable in your project's root directory.
Run a standard Maven build command (e.g., `mvn install` or `mvn dependency:resolve`) beforehand to ensure all necessary artifacts are present in your local Maven repository.
Upgrade to `snyk-mvn-plugin` version `2.31.3` or higher immediately. For CI/CD environments, ensure Snyk Docker images are updated as of 2022-11-29 or later.
Install the package using `npm install snyk-mvn-plugin` or `yarn add snyk-mvn-plugin`. Verify the import path is exactly `snyk-mvn-plugin`.
Upgrade your Node.js environment to version 20 or newer. Use a Node.js version manager (like `nvm` or `volta`) to manage different Node.js versions.
Ensure that Maven is installed on your system and its binary directory is added to your system's PATH environment variable. Alternatively, ensure `mvnw` is present and executable in the project root.
Use ESM `import { inspect } from 'snyk-mvn-plugin';` syntax. Ensure your project's `package.json` specifies `"type": "module"` if it's a pure ESM project, or use a bundler that correctly handles ESM/CJS interop.No dependency data recorded yet.