{"library":"snyk-nuget-plugin","title":"Snyk NuGet Plugin","type":"library","description":"Snyk CLI plugin for NuGet dependency analysis. Current stable version 4.2.1, released April 2026. Requires Node >=16. Ships TypeScript types. Scans project.json, packages.config, and project.assets.json to identify vulnerabilities. Key differentiator: first-class Snyk integration with dotnet restore, supports case-insensitive resolution and runtime flags. Breaking changes in v3/v4 removed legacy scanner flags. Used internally by snyk CLI; not typically installed directly.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install snyk-nuget-plugin"],"cli":null},"imports":["import { inspect } from 'snyk-nuget-plugin'","import { buildDepTreeFromProjectJson } from 'snyk-nuget-plugin'","import { buildDepTreeFromPackagesConfig } from 'snyk-nuget-plugin'","import { buildDepTreeFromProjectAssets } from 'snyk-nuget-plugin'"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/snyk/snyk-nuget-plugin","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/snyk-nuget-plugin","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import { inspect } from 'snyk-nuget-plugin';\nimport { execSync } from 'child_process';\nimport * as fs from 'fs';\n\nconst targetFile = 'path/to/project.assets.json';\n// Ensure .NET SDK is installed and restore has been run\nconst projectFolder = 'path/to/project';\ntry {\n  execSync('dotnet restore', { cwd: projectFolder, stdio: 'pipe' });\n} catch (e) {\n  console.error('dotnet restore failed:', e.stderr?.toString() || e.message);\n  process.exit(1);\n}\n\ninspect('.', targetFile)\n  .then((result) => {\n    console.log('Scanned successfully:', result.package?.name);\n    console.log('Dependencies:', JSON.stringify(result.dependencyTree, null, 2));\n  })\n  .catch((err) => console.error('Inspect failed:', err));\n","lang":"typescript","description":"Shows how to import the inspect function, run dotnet restore, and scan a NuGet project's assets file for vulnerabilities.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}