package lock import ftypes "github.com/aquasecurity/trivy/pkg/fanal/types" var ( // docker run --rm -i -t mcr.microsoft.com/dotnet/sdk:latest // apt -y update && apt -y install jq // cd /usr/local/src // dotnet new mvc // dotnet add package Newtonsoft.Json // dotnet add package NuGet.Frameworks // dotnet restore --use-lock-file // cat packages.lock.json | jq -rc '.dependencies[] | keys[] as $k | "{\"\($k)\", \"\(.[$k] | .resolved)\", \"\"},"' nuGetSimple = []ftypes.Package{ { ID: "Newtonsoft.Json@12.0.3", Name: "Newtonsoft.Json", Version: "12.0.3", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 5, EndLine: 10, }, }, }, { ID: "NuGet.Frameworks@5.7.0", Name: "NuGet.Frameworks", Version: "5.7.0", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 11, EndLine: 16, }, }, }, } nuGetSimpleDeps []ftypes.Dependency // docker run --rm -i -t mcr.microsoft.com/dotnet/sdk:latest // apt -y update && apt -y install jq // cd /usr/local/src // dotnet new webapi // dotnet add package Newtonsoft.Json // dotnet add package NuGet.Frameworks // dotnet restore --use-lock-file // cat packages.lock.json | jq -rc '.dependencies[] | keys[] as $k | "{\"\($k)\", \"\(.[$k] | .resolved)\", \"\"},"' nuGetSubDependencies = []ftypes.Package{ { ID: "Microsoft.Extensions.ApiDescription.Server@3.0.0", Name: "Microsoft.Extensions.ApiDescription.Server", Version: "3.0.0", Relationship: ftypes.RelationshipIndirect, Locations: []ftypes.Location{ { StartLine: 29, EndLine: 33, }, }, }, { ID: "Microsoft.OpenApi@1.1.4", Name: "Microsoft.OpenApi", Version: "1.1.4", Relationship: ftypes.RelationshipIndirect, Locations: []ftypes.Location{ { StartLine: 34, EndLine: 38, }, }, }, { ID: "Newtonsoft.Json@12.0.3", Name: "Newtonsoft.Json", Version: "12.0.3", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 5, EndLine: 10, }, }, }, { ID: "NuGet.Frameworks@5.7.0", Name: "NuGet.Frameworks", Version: "5.7.0", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 11, EndLine: 16, }, }, }, { ID: "Swashbuckle.AspNetCore@5.5.1", Name: "Swashbuckle.AspNetCore", Version: "5.5.1", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 17, EndLine: 28, }, }, }, { ID: "Swashbuckle.AspNetCore.Swagger@5.5.1", Name: "Swashbuckle.AspNetCore.Swagger", Version: "5.5.1", Relationship: ftypes.RelationshipIndirect, Locations: []ftypes.Location{ { StartLine: 39, EndLine: 46, }, }, }, { ID: "Swashbuckle.AspNetCore.SwaggerGen@5.5.1", Name: "Swashbuckle.AspNetCore.SwaggerGen", Version: "5.5.1", Relationship: ftypes.RelationshipIndirect, Locations: []ftypes.Location{ { StartLine: 47, EndLine: 54, }, }, }, { ID: "Swashbuckle.AspNetCore.SwaggerUI@5.5.1", Name: "Swashbuckle.AspNetCore.SwaggerUI", Version: "5.5.1", Relationship: ftypes.RelationshipIndirect, Locations: []ftypes.Location{ { StartLine: 55, EndLine: 59, }, }, }, } nuGetSubDependenciesDeps = []ftypes.Dependency{ { ID: "Swashbuckle.AspNetCore.Swagger@5.5.1", DependsOn: []string{"Microsoft.OpenApi@1.1.4"}, }, { ID: "Swashbuckle.AspNetCore.SwaggerGen@5.5.1", DependsOn: []string{"Swashbuckle.AspNetCore.Swagger@5.5.1"}, }, { ID: "Swashbuckle.AspNetCore@5.5.1", DependsOn: []string{ "Microsoft.Extensions.ApiDescription.Server@3.0.0", "Swashbuckle.AspNetCore.Swagger@5.5.1", "Swashbuckle.AspNetCore.SwaggerGen@5.5.1", "Swashbuckle.AspNetCore.SwaggerUI@5.5.1", }, }, } // mcr.microsoft.com/dotnet/sdk:latest // apt -y update && apt -y install jq // cd /usr/local/src // dotnet new console // dotnet add package Newtonsoft.Json // dotnet add package AWSSDK.Core // dotnet restore --use-lock-file // cat packages.lock.json | jq -rc '.dependencies[] | keys[] as $k | "{\"\($k)\", \"\(.[$k] | .resolved)\", \"\"},"' nuGetLegacy = []ftypes.Package{ { ID: "AWSSDK.Core@3.5.1.30", Name: "AWSSDK.Core", Version: "3.5.1.30", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 5, EndLine: 10, }, }, }, { ID: "Newtonsoft.Json@12.0.3", Name: "Newtonsoft.Json", Version: "12.0.3", Relationship: ftypes.RelationshipDirect, Locations: []ftypes.Location{ { StartLine: 11, EndLine: 16, }, }, }, } nuGetLegacyDeps []ftypes.Dependency // docker run --rm -i -t mcr.microsoft.com/dotnet/sdk:latest // apt -y update && apt -y install jq // cd /usr/local/src // dotnet new classlib -f net5.0 // sed -i 's~TargetFramework>net5.0net4.0;netstandard2.0;netstandard1.0;net35;net2.0