-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Name and Version empty for Java package when scanning provided image #2132
Comments
Alright - I’ve hit the end of investigating this and have this update - Currently the behavior is correct in that syft is identifying the main parent jar enterprise-server . A package does exist in the SBOM for that main package along with the manifest information. Potential solutions:
{
"id": "e82d211f6cc65681",
"location": {
"path": "/opt/enterprise-server.jar:BOOT-INF/lib/1-555680818.jar",
"layerID": "sha256:4693057ce2364720d39e57e85a5b8e0bd9ac3573716237736d6470ec5b7b7230"
}
}, Let me know in this thread comments or thoughts 😃 but I've put this into our backlog for future discussion during community/team sync |
@spiffcs I think this has come up with a couple of other users as well, so probably worth restarting the discussion on what the correct answer is for Syft here. My (current) 2c is that a jar without metadata or any other identifiers as a java artifact is really just the same as a tar file or zip file. In terms of artifact relationships it should be treated like an archive that is recursed into by the cataloger to find other artifacts rather than an identified package. The file cataloger can gather digests etc, but the java cataloger should probably skip if it cannot identify the actual java software in the jar file. This would also be a good candidate for any "known-unknown" classification logic, to identify to the SBOM reader that theres is content that is known to be likely a part of an application or artifact but that cannot be identified. |
What happened:
When using syft from the tip of main for image
caphill4/syft-manifest-bug:latest
the following behavior was experienced:Example package below - note there were multiple of these:
What you expected to happen:
Syft should have an option or config to eliminate packages after the fact if there is not enough identifying information.
Alternatively, the file cataloger could be enhanced to show nested jar information so this information is not lost, but instead moved from package information to file information.
Example:
The offending jars also had some warnings, but these seem to be related to regex matching. Packages are still being created for these jars, but given they have almost no identifying information the package is blank besides the
path
andvirtualPath
fields showing their locationSteps to reproduce the request:
syft -o json caphill4/syft-manifest-bug:latest
Inspect the output for the above characteristics
Anything else we need to know?:
Built from syft main as of - a46d122
Environment:
syft version
: a46d122cat /etc/os-release
or similar): OSXThe text was updated successfully, but these errors were encountered: