-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java archives not from Maven #2217
Comments
It looks like there are some opportunities to attempt to guess if the name is a combined group-id/artifact-id and parse out these fields. For instance the package Additionally, based on the manifest: "metadata": {
"virtualPath": "/opt/atlassian/confluence/confluence/WEB-INF/atlassian-bundled-plugins/com.atlassian.gadgets.atlassian-gadgets-api-8.1.1.jar",
"manifest": {
"main": {
"Atlassian-Build-Date": "2023-06-14T08:11:33+0000",
"Bnd-LastModified": "1686730294094",
"Build-Jdk": "1.8.0_282",
"Built-By": "root",
"Bundle-Description": "Public Atlassian Gadgets API",
"Bundle-DocURL": "https://www.atlassian.com/",
"Bundle-License": "https://www.atlassian.com/customer-agreement/",
"Bundle-ManifestVersion": "2",
"Bundle-Name": "Atlassian Gadgets API",
"Bundle-SymbolicName": "com.atlassian.gadgets.atlassian-gadgets-api",
"Bundle-Vendor": "Atlassian",
"Bundle-Version": "8.1.1",
"Created-By": "Apache Maven Bundle Plugin",
"Export-Package": "com.atlassian.gadgets;version=\"8.1.1\";uses:=\"com.atlassian.gadgets.dashboard,com.atlassian.gadgets.view,com.atlassian.plugin,io.atlassian.fugue,javax.annotation,javax.servlet.http,net.jcip.annotations\",com.atlassian.gadgets.dashboard;version=\"8.1.1\";uses:=\"com.atlassian.gadgets,com.atlassian.gadgets.plugins,com.atlassian.plugin,io.atlassian.fugue,javax.annotation,net.jcip.annotations\",com.atlassian.gadgets.dashboard.view;version=\"8.1.1\";uses:=\"com.atlassian.gadgets,com.atlassian.gadgets.dashboard,com.atlassian.gadgets.view,javax.annotation\",com.atlassian.gadgets.directory;version=\"8.1.1\";uses:=\"com.atlassian.gadgets,com.atlassian.plugin,javax.annotation\",com.atlassian.gadgets.plugins;version=\"8.1.1\";uses:=\"com.atlassian.gadgets.directory,com.atlassian.plugin,com.atlassian.plugin.web,io.atlassian.fugue,javax.annotation\",com.atlassian.gadgets.spec;version=\"8.1.1\";uses:=\"com.atlassian.gadgets,com.atlassian.gadgets.view,net.jcip.annotations\",com.atlassian.gadgets.view;version=\"8.1.1\";uses:=\"com.atlassian.gadgets,net.jcip.annotations\",com.atlassian.gadgets.opensocial;version=\"8.1.1\",com.atlassian.gadgets.opensocial.model;version=\"8.1.1\";uses:=\"net.jcip.annotations\",com.atlassian.gadgets.event;version=\"8.1.1\",com.atlassian.gadgets.feed;version=\"8.1.1\"",
"Import-Package": "com.atlassian.gadgets;version=\"[8.1,9)\",com.atlassian.gadgets.directory;version=\"[8.1,9)\",com.atlassian.gadgets.plugins;version=\"[8.1,9)\",com.atlassian.gadgets.view;version=\"[8.1,9)\",com.atlassian.plugin,com.atlassian.plugin.util,com.atlassian.plugin.web,com.atlassian.plugin.web.conditions,com.google.common.base,com.google.common.collect,io.atlassian.fugue,javax.annotation,javax.servlet.http,net.jcip.annotations,org.apache.commons.lang3,org.apache.commons.lang3.builder",
"Manifest-Version": "1.0",
"Tool": "Bnd-3.5.0.201709291849"
}
}, We should take a closer look at the |
Ah, so a good catch that these are actually packaged as maven artifacts, just not from maven central but rather from Atlassian's own maven repositories, so at least trying using groupid and artifactid is still the correct way to attempt to identify them |
I also found this image that still reports a lot of the namespace package names (I tried it with this PR) docker.io/bitnami/spark:latest |
This issue is meant to be a discussion on how to handle Java archives that aren't from Maven, and Syft handles in a strange manner.
Let's use this image as our example
https://hub.docker.com/r/atlassian/confluence-server/
If I scan this with Syft
I end up with output that looks like this (it's a huge image, this is just a few lines)
Looking at the dbex finding there, here is the JSON that is generated
I want to start this discussion as these particular packages aren't part of Maven, so we can't extract the name and groupId from a remote API based on a file hash for example.
The text was updated successfully, but these errors were encountered: