Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add syft v0.46.0 Dotnet support (#747)
- Loading branch information
1 parent
d6196b6
commit 731abaa
Showing
13 changed files
with
263 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package dotnet | ||
|
||
import ( | ||
"github.com/anchore/grype/grype/distro" | ||
"github.com/anchore/grype/grype/match" | ||
"github.com/anchore/grype/grype/pkg" | ||
"github.com/anchore/grype/grype/search" | ||
"github.com/anchore/grype/grype/vulnerability" | ||
syftPkg "github.com/anchore/syft/syft/pkg" | ||
) | ||
|
||
type Matcher struct { | ||
} | ||
|
||
func (m *Matcher) PackageTypes() []syftPkg.Type { | ||
return []syftPkg.Type{syftPkg.DotnetPkg} | ||
} | ||
|
||
func (m *Matcher) Type() match.MatcherType { | ||
return match.DotnetMatcher | ||
} | ||
|
||
func (m *Matcher) Match(store vulnerability.Provider, d *distro.Distro, p pkg.Package) ([]match.Match, error) { | ||
return search.ByCriteria(store, d, p, m.Type(), search.CommonCriteria...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 153 additions & 0 deletions
153
test/integration/test-fixtures/image-debian-match-coverage/dotnet/TestLibrary.deps.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
{ | ||
"runtimeTarget": { | ||
"name": ".NETCoreApp,Version=v6.0", | ||
"signature": "" | ||
}, | ||
"compilationOptions": {}, | ||
"targets": { | ||
".NETCoreApp,Version=v6.0": { | ||
"TestLibrary/1.0.0": { | ||
"dependencies": { | ||
"Microsoft.Extensions.DependencyInjection": "6.0.0", | ||
"Microsoft.Extensions.Logging": "6.0.0", | ||
"Newtonsoft.Json": "13.0.1", | ||
"Serilog": "2.10.0", | ||
"Serilog.Sinks.Console": "4.0.1", | ||
"TestCommon": "1.0.0" | ||
}, | ||
"runtime": { | ||
"TestLibrary.dll": {} | ||
} | ||
}, | ||
"AWSSDK.Core/3.7.10.6": { | ||
"runtime": { | ||
"lib/netcoreapp3.1/AWSSDK.Core.dll": { | ||
"assemblyVersion": "3.3.0.0", | ||
"fileVersion": "3.7.10.6" | ||
} | ||
} | ||
}, | ||
"Microsoft.Extensions.DependencyInjection/6.0.0": { | ||
"dependencies": { | ||
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", | ||
"System.Runtime.CompilerServices.Unsafe": "6.0.0" | ||
}, | ||
"runtime": { | ||
"lib/net6.0/Microsoft.Extensions.DependencyInjection.dll": { | ||
"assemblyVersion": "6.0.0.0", | ||
"fileVersion": "6.0.21.52210" | ||
} | ||
} | ||
}, | ||
"Microsoft.Extensions.DependencyInjection.Abstractions/6.0.0": { | ||
"runtime": { | ||
"lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": { | ||
"assemblyVersion": "6.0.0.0", | ||
"fileVersion": "6.0.21.52210" | ||
} | ||
} | ||
}, | ||
"Microsoft.Extensions.Logging/6.0.0": { | ||
"dependencies": { | ||
"Microsoft.Extensions.DependencyInjection": "6.0.0", | ||
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", | ||
"Microsoft.Extensions.Logging.Abstractions": "6.0.0", | ||
"Microsoft.Extensions.Options": "6.0.0", | ||
"System.Diagnostics.DiagnosticSource": "6.0.0" | ||
}, | ||
"runtime": { | ||
"lib/netstandard2.1/Microsoft.Extensions.Logging.dll": { | ||
"assemblyVersion": "6.0.0.0", | ||
"fileVersion": "6.0.21.52210" | ||
} | ||
} | ||
}, | ||
"Microsoft.Extensions.Logging.Abstractions/6.0.0": { | ||
"runtime": { | ||
"lib/net6.0/Microsoft.Extensions.Logging.Abstractions.dll": { | ||
"assemblyVersion": "6.0.0.0", | ||
"fileVersion": "6.0.21.52210" | ||
} | ||
} | ||
}, | ||
"Microsoft.Extensions.Options/6.0.0": { | ||
"dependencies": { | ||
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", | ||
"Microsoft.Extensions.Primitives": "6.0.0" | ||
}, | ||
"runtime": { | ||
"lib/netstandard2.1/Microsoft.Extensions.Options.dll": { | ||
"assemblyVersion": "6.0.0.0", | ||
"fileVersion": "6.0.21.52210" | ||
} | ||
} | ||
}, | ||
"Microsoft.Extensions.Primitives/6.0.0": { | ||
"dependencies": { | ||
"System.Runtime.CompilerServices.Unsafe": "6.0.0" | ||
}, | ||
"runtime": { | ||
"lib/net6.0/Microsoft.Extensions.Primitives.dll": { | ||
"assemblyVersion": "6.0.0.0", | ||
"fileVersion": "6.0.21.52210" | ||
} | ||
} | ||
}, | ||
"Newtonsoft.Json/13.0.1": { | ||
"runtime": { | ||
"lib/netstandard2.0/Newtonsoft.Json.dll": { | ||
"assemblyVersion": "13.0.0.0", | ||
"fileVersion": "13.0.1.25517" | ||
} | ||
} | ||
}, | ||
"Serilog/2.10.0": { | ||
"runtime": { | ||
"lib/netstandard2.1/Serilog.dll": { | ||
"assemblyVersion": "2.0.0.0", | ||
"fileVersion": "2.10.0.0" | ||
} | ||
} | ||
}, | ||
"Serilog.Sinks.Console/4.0.1": { | ||
"dependencies": { | ||
"Serilog": "2.10.0" | ||
}, | ||
"runtime": { | ||
"lib/net5.0/Serilog.Sinks.Console.dll": { | ||
"assemblyVersion": "4.0.1.0", | ||
"fileVersion": "4.0.1.0" | ||
} | ||
} | ||
}, | ||
"System.Diagnostics.DiagnosticSource/6.0.0": { | ||
"dependencies": { | ||
"System.Runtime.CompilerServices.Unsafe": "6.0.0" | ||
} | ||
}, | ||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {}, | ||
"TestCommon/1.0.0": { | ||
"dependencies": { | ||
"AWSSDK.Core": "3.7.10.6" | ||
}, | ||
"runtime": { | ||
"TestCommon.dll": {} | ||
} | ||
} | ||
} | ||
}, | ||
"libraries": { | ||
"TestLibrary/1.0.0": { | ||
"type": "project", | ||
"serviceable": false, | ||
"sha512": "" | ||
}, | ||
"AWSSDK.Core/3.7.10.6": { | ||
"type": "package", | ||
"serviceable": true, | ||
"sha512": "sha512-kHBB+QmosVaG6DpngXQ8OlLVVNMzltNITfsRr68Z90qO7dSqJ2EHNd8dtBU1u3AQQLqqFHOY0lfmbpexeH6Pew==", | ||
"path": "awssdk.core/3.7.10.6", | ||
"hashPath": "awssdk.core.3.7.10.6.nupkg.sha512" | ||
} | ||
} | ||
} |