Find and fix vulnerable Nuget dependencies
ProprietaryThis software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. Both direct and transitive dependencies are checked using the full dependency graph captured when the project's LST was built. Vulnerable direct dependencies are upgraded in place; vulnerable transitive dependencies are added as direct dependencies pinned to a fixed version. The target version is controlled with the versionSelection option, and the maximumUpgradeDelta option limits how far it may be from the version currently in use. Set overrideTransitive to false to only upgrade dependencies declared in the project and report vulnerable transitive dependencies without pinning them. Before any change, the version constraints declared by every other package in the dependency graph are validated; when an upgrade would violate a constraint, an error marker describing the conflicting dependency path is added instead and no change is made. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Last updated: 2026-11-13T1848.
org. openrewrite. csharp. dependencies. DependencyVulnerabilityCheckOptional
Report vulnerabilities that could not be fixed as search result markers on the project. By default these markers are omitted, making it easier to see version upgrades within the diff.
Which version to select when upgrading a vulnerable dependency or adding a vulnerable transitive dependency as a direct dependency. min selects the exact version in which the vulnerability was fixed. patch selects the highest available patch version of the release line in which the vulnerability was fixed. minor selects the highest available minor version within the major version in which the vulnerability was fixed. latest selects the highest available stable version that is compatible with the version constraints of all other packages in the dependency graph. none only reports vulnerabilities without making any changes. Default is patch.
When enabled, vulnerable transitive dependencies are pinned to a fixed version by adding them as direct PackageReferences. When disabled, only dependencies declared in the project are upgraded and vulnerable transitive dependencies are only reported. Default is true.
The maximum difference from the version currently in use that an upgrade may introduce. patch only allows upgrades within the same major and minor version, minor only allows upgrades within the same major version, major places no limit on the upgrade. none only reports vulnerabilities without making any changes. Vulnerabilities whose fix lies outside this limit are reported but not fixed. The versionSelection option chooses the target version among those within the limit. Default is major.
Only fix vulnerabilities with a severity level equal to or higher than the specified minimum. Vulnerabilities are classified as low, moderate, high, or critical based on their potential impact. Default is low, which includes all severity levels.
Only fix vulnerabilities matching this regular expression pattern. This allows filtering to specific CVEs or CVE ranges. For example, CVE-2023-.* will only check for CVEs from 2023, CVE-(2022|2023)-.* will check for CVEs from 2022 or 2023, CVE-2021-44228|CVE-2022-23305 will check for those specific CVEs. If not specified, all CVEs will be checked (subject to other filters).
mod run . --recipe= org. openrewrite. csharp. dependencies. DependencyVulnerabilityCheckInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.