feat: add cataloger for NuGet packages (#3484)

* add cataloger for dotnet packages.lock.json files

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* add entry for dotnet packages.lock files

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* add unit test for dotnet packages.lock cataloger

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* add test for faulty packages.lock.json file

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* add missing name metadata

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* ensure package appears with version

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* add example of conflicting dependencies

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>

* fix linting

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* bump json schema and fix tests

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* move section

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Kemosabert <bert.coppens14@gmail.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Bert Coppens
2025-01-16 14:57:17 -05:00
committed by GitHub
co-authored by Alex Goodman
parent 6b2d73d4b7
commit 512319337f
14 changed files with 3235 additions and 4 deletions
File diff suppressed because it is too large Load Diff
+27 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "anchore.io/schema/syft/json/16.0.18/document",
"$id": "anchore.io/schema/syft/json/16.0.19/document",
"$ref": "#/$defs/Document",
"$defs": {
"AlpmDbEntry": {
@@ -492,6 +492,29 @@
"hashPath"
]
},
"DotnetPackagesLockEntry": {
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"contentHash": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object",
"required": [
"name",
"version",
"contentHash",
"type"
]
},
"DotnetPortableExecutableEntry": {
"properties": {
"assemblyVersion": {
@@ -1648,6 +1671,9 @@
{
"$ref": "#/$defs/DotnetDepsEntry"
},
{
"$ref": "#/$defs/DotnetPackagesLockEntry"
},
{
"$ref": "#/$defs/DotnetPortableExecutableEntry"
},