Audits existing .NET/NuGet dependencies for known vulnerabilities, support, licensing, version drift, and reproducible builds. Use for dependency inventory and risk; use nuget-package-development for authoring a package and dotnet-migration for framework upgrades.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Dependency Audit?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/k4ndev-dependency-audit)
---
name: dependency-audit
description: Audits existing .NET/NuGet dependencies for known vulnerabilities, support, licensing, version drift, and reproducible builds. Use for dependency inventory and risk; use nuget-package-development for authoring a package and dotnet-migration for framework upgrades.
---
# Dependency Audit
## Purpose
Assess dependency risk using repository evidence and current package metadata without guessing licenses, advisories, or compatibility.
## Scope
Direct/transitive NuGet packages, lockfiles, SDK/TFM support, vulnerabilities, deprecation, licenses, and reproducibility.
## When to use
- User asks for a dependency/SBOM audit, vulnerability check, package update assessment, or license risk review.
- Package restore/build changes need reproducibility analysis.
## Do not use for
- Creating/publishing a NuGet library: use `nuget-package-development`.
- Runtime/TFM upgrade plan: use `dotnet-migration`.
- Security analysis of application code: use `security-audit`.
## Required context
Inspect `global.json`, target frameworks, `Directory.Packages.props`, project files, lockfiles, SDK/source configuration, CI, transitive graph, license policy, and target deployment constraints.
## Workflow
1. Inventory package versions and direct/transitive path; note SDK and target framework support lifecycle.
2. Run, when available, `dotnet list package --vulnerable --include-transitive` and, as a separate command, `dotnet list package --outdated --include-transitive` using the installed SDK's supported syntax; record exact command/result/date. Without `--include-transitive` only top-level packages are reported. `NuGetAuditMode=all` makes restore-time NuGetAudit cover transitive packages too.
3. Verify advisory severity/fixed versions and package release notes from authoritative sources; distinguish vulnerability from outdated status.
4. Check deprecation, package provenance, license changes between current and candidate versions, and transitive dependencies.
5. Assess compatibility across all TFMs, provider/plugin constraints, source package feeds, and lockfile behavior.
6. Recommend a minimal pinned upgrade or alternative, then validate restore/build/tests; do not rewrite lockfiles or update automatically without authorization.
## Decision rules
- Never claim an advisory/license fact without a source and version context; package license policy belongs to the project/legal owner.
- Avoid floating versions for reproducible applications; distinguish central version declaration from transitive resolution.
- Do not assume a direct package's license describes the full dependency tree.
## Severity classification
Prioritize known exploitable vulnerabilities in shipped reachable dependencies, license incompatibility, unsupported runtime exposure, then drift. State affected version/path, severity source, and confidence; do not invent CVSS scores.
## Expected output format
Table of package, resolved version/path, issue/source/date, affected target, recommended action, and verification state; separate observed facts from commands not run.
## Common mistakes
- Auditing direct references only, calling every outdated package vulnerable, ignoring license transitions, or claiming restore/build success without execution.
## Edge cases
- A vulnerable transitive package may be overridden or unreachable at runtime; document actual graph and mitigation.
- Advisory databases may be unavailable/offline; report stale/incomplete scan rather than “clean”.
- SDK CLI output syntax changes; check `dotnet --version` and help before relying on newer flags.
- The rulebook's `TECH-07` shows `dotnet list package --vulnerable --outdated` as one command, but the CLI rejects that combination (`--outdated`, `--deprecated` and `--vulnerable` cannot be combined). Preserve the supplied text; run the vulnerable and outdated checks as separate commands.
## Examples
See [dependency examples](examples.md) for pinned central versions and a careful audit report.
## Test scenarios
- Positive: “Check the resolved transitive graph for a vulnerable package and whether a patched compatible release exists.”
- Negative: “Add a new public NuGet package README” routes to `nuget-package-development`.
- Boundary: an upgrade from net8.0 to net10.0 selects `dotnet-migration` with this skill only for package inventory.
## Related skills
`nuget-package-development`, `dotnet-migration`, `security-audit`, `testing-quality`.