Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support package.lock.json for dotnet #7119

Open
scrocquesel-ml150 opened this issue Oct 30, 2024 · 0 comments
Open

Support package.lock.json for dotnet #7119

scrocquesel-ml150 opened this issue Oct 30, 2024 · 0 comments

Comments

@scrocquesel-ml150
Copy link

Is your feature request related to a problem? Please describe.
Currently, it seems that ODC scans only the csproj files. Doing so, it is blind to transitive dependencies. For exemple, there is a CVE for the package System.Text.Json but you rarely reference it directly as it part of meta package..

Describe the solution you'd like
Since .net 2.1, one can enable RestorePackagesWithLockFile. This produces a packages.lock.json file alongisde each csproj with the full dependency tree. This file is usually commited to enable a repeatable build process.
When a package lock file is found, the MSbuild analyser should use it instead of resolving package references from the csproj.

Describe alternatives you've considered
N/A

Additional context
An exemple of implementation in a sbom tools : https://github.com/CycloneDX/cdxgen/blob/ab161c3561eeac2447a2902fb3d15b60610d6a33/lib/helpers/utils.js#L8316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant