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

[pkg] implement NuGet ecosystem parser #98

Merged
merged 4 commits into from
Jan 5, 2023
Merged

[pkg] implement NuGet ecosystem parser #98

merged 4 commits into from
Jan 5, 2023

Conversation

shawnfunke
Copy link
Contributor

@shawnfunke shawnfunke commented Dec 22, 2022

Adds support to scan packages.lock.json files which are lock files
for the NuGet ecosystem.

Closes #51

Adds support to scan `packages.lock.json` files which are lock files for
the NuGet ecosystem
@shawnfunke
Copy link
Contributor Author

Closes #51

@G-Rath G-Rath self-requested a review December 22, 2022 18:22
@G-Rath

This comment was marked as resolved.

@shawnfunke
Copy link
Contributor Author

Sure, done!

@inferno-chromium
Copy link
Contributor

Thank you for your PR. The current committers are on vacation and we will review it early next year and then release as part of the the next minor release 1.0.x release.

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you very much for the contribution!

pkg/lockfile/parse-nuget-lock.go Show resolved Hide resolved
@oliverchang
Copy link
Collaborator

/gcbrun

@oliverchang
Copy link
Collaborator

/gcbrun

@shawnfunke
Copy link
Contributor Author

@oliverchang I thought about the version verification as well already, for now I've added a check to ensure it's version 1. This isn't optimal since the error the user sees now is: Attempted to scan lockfile but failed: /Users/shawnfunke/tmp/nuget/packages.lock.json, it doesn't tell the user that the lock file version is unsupported.

Also there should probably be dedicated utilities for the parsers since right now the NuGet and Go parser makes use of the pkgDetailsMapToSlice function which is located in the NPM parser file.

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@oliverchang
Copy link
Collaborator

/gcbrun

@oliverchang oliverchang merged commit 7bd7c17 into google:main Jan 5, 2023
julieqiu pushed a commit to julieqiu/osv-scanner that referenced this pull request May 2, 2023
* [pkg] implement NuGet ecosystem parser

Adds support to scan `packages.lock.json` files which are lock files for
the NuGet ecosystem

* [pkg] add NuGet lock file format source as comment

* [pkg] verify NuGet lock file version

Co-authored-by: Oliver Chang <[email protected]>
julieqiu pushed a commit to julieqiu/osv-scanner that referenced this pull request May 2, 2023
* [pkg] implement NuGet ecosystem parser

Adds support to scan `packages.lock.json` files which are lock files for
the NuGet ecosystem

* [pkg] add NuGet lock file format source as comment

* [pkg] verify NuGet lock file version

Co-authored-by: Oliver Chang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scan nuget
4 participants