mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
fix(dotnet): improve forming dotnet package names
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
This commit is contained in:
parent
31e0fc36e3
commit
3263f1105f
1 changed files with 4 additions and 1 deletions
|
@ -175,7 +175,7 @@ var (
|
|||
func findName(versionResources map[string]string) string {
|
||||
// PE files found in the wild _not_ authored by Microsoft seem to use ProductName as a clear
|
||||
// identifier of the software
|
||||
nameFields := []string{"ProductName", "FileDescription", "InternalName", "OriginalFilename"}
|
||||
nameFields := []string{"InternalName", "OriginalFilename", "ProductName", "FileDescription"}
|
||||
|
||||
if isMicrosoft(versionResources) {
|
||||
// Microsoft seems to be consistent using the FileDescription, with a few that are blank and have
|
||||
|
@ -188,6 +188,9 @@ func findName(versionResources map[string]string) string {
|
|||
if value == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
value = strings.TrimSuffix(strings.ReplaceAll(value, " ", "."), ".dll")
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue