NuGet (packages.lock.json) parser.#14
Conversation
…sources. Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
|
Reference: Issue with feature request can be found here aquasecurity/trivy#681 |
|
thanks for the PR @Johannestegner – I'll be taking a look at it and making comments as I go through it. |
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
…ded). Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
… a read not write operation). Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
|
Thank you for the review @simar7 ! Fixed the issues you mentioned, let me know if there is anything else you wish me to fix! :) |
|
Not sure yet, but depending on how the version should be handled in Trivy (aquasecurity/trivy#686 (comment)) I guess that this part should use a similar approach to convert the version. |
|
Actually, I guess this should not be used in the dependency parser, but rather when checking in Trivy or similar. |
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
knqyf263
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
…(added comments on generation steps). Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
…ally with package resolving. Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
…get parser. Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
b4cd964 to
321ced0
Compare
…r sub-packages, as they are added in top-level as Transitive type. Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
|
Let me know if you want me to squash some (or all) commits :) |
|
I'll squash all commits when merging this PR, so you don't have to care about it. We should keep the history in the PR. |
|
I left one more comment, but it looks almost good! Thank you, again! |
…!), updated parse to again use version. Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
Good catch! Updated the parser to use name + version again (tried with the code in an earlier note, but it didn't work out at all as I expected! hehe). |
|
Thank you for adding multiple targets file! I've refactored a bit. It looks good to me now. |
This pull request includes a parser which parses lockfiles created by nuget/dotnet when using a lockfile.
NuGet does not force (or auto) create a lock file, so a *.csproj file parser might also be a good idea, as a fallback.
As a first stage, this should be good enough though.