Closed idefixcert closed 2 weeks ago
I opened an pull request for it: https://github.com/anchore/syft/pull/3199
@idefixcert thanks for the issue and the PR!
We still have a couple questions before understanding the issue and reviewing the PR:
The code I think might need to be fixed is https://github.com/anchore/syft/blob/fcd5ec951de6b3fc1f1aa2a36968356d2eb22170/syft/pkg/cataloger/kernel/parse_linux_kernel_module_file.go#L124-L125
Are you able to see what's going on there? Is it possible the kernel module specifies its name in a different field or something?
I'm not sure if i'm in the exact same boat, but I was inspecting an SBOM for an image I built that was constructed with syft, and I have several instances of this for rubygems.
{
"bom-ref": "4dabbdca5e182531",
"type": "library",
"name": "",
"purl": "pkg:gem/",
"properties": [
{
"name": "syft:package:foundBy",
"value": "ruby-gemspec-cataloger"
},
{
"name": "syft:package:language",
"value": "ruby"
},
{
"name": "syft:package:type",
"value": "gem"
},
{
"name": "syft:package:metadataType",
"value": "ruby-gemspec"
},
{
"name": "syft:location:0:path",
"value": "/root/.cache/gem/specs/index.rubygems.org%443/quick/Marshal.4.8/chef-utils-18.5.0.gemspec"
}
]
},
{
"bom-ref": "b8e9734ad545ac63",
"type": "library",
"name": "",
"purl": "pkg:gem/",
"properties": [
{
"name": "syft:package:foundBy",
"value": "ruby-gemspec-cataloger"
},
{
"name": "syft:package:language",
"value": "ruby"
},
{
"name": "syft:package:type",
"value": "gem"
},
{
"name": "syft:package:metadataType",
"value": "ruby-gemspec"
},
{
"name": "syft:location:0:path",
"value": "/root/.cache/gem/specs/index.rubygems.org%443/quick/Marshal.4.8/concurrent-ruby-1.3.4.gemspec"
}
]
},
{
"bom-ref": "678cc9015e228b05",
"type": "library",
"name": "",
"purl": "pkg:gem/",
"properties": [
{
"name": "syft:package:foundBy",
"value": "ruby-gemspec-cataloger"
...
I can push the image somewhere public if it would be helpful to inspect, and/or share the full sbom. I notice in my case, each gem has the same (presumably) incomplete purl, so not 100% sure if this is the same issue as what opened this thread
This might be addressed by https://github.com/anchore/syft/pull/3257 when that is released.
We believe this was fixed by https://github.com/anchore/syft/pull/3257 release in Syft 1.14.0. If we're wrong, please let us know!
What happened: Some of the components I get on a system have an empty name like:
I looked into the code and saw that there is a IsValid function for packages (https://github.com/anchore/syft/blob/1aaa6440073db6b90673e4303c6ef5d359052f7e/syft/pkg/package.go#L83-L85). but not all of the cataloger do respect that.
What you expected to happen:
I would expect that components (packages) that are not valid would not get exported.
Steps to reproduce the issue:
I ran that on a local filesystem.
Anything else we need to know?:
NO
Environment:
Output of
syft version
: latest master, because I also tested with the source and own compilation. but also 1.11.1OS (e.g:
cat /etc/os-release
or similar):in my case the following patch helped: