Replies: 4 comments 9 replies
-
@setchy, is the BOM missing dependencies, or is the dependency track not showing the tree? They are two different things since the dependency track doesn't support dangling trees. |
Beta Was this translation helpful? Give feedback.
-
I'm experiencing the same problem, used cdxgen.exe -t java -o output_bom.xml,the file uploaded to dependency-track platform. there's no dependency tree... don't have information about primary dependency or subsidiary dependency. |
Beta Was this translation helpful? Give feedback.
-
So I don't want to hijack this to talk about my issues with Java and dependencies, but this seems to be a fairly related issue to what I'm currently seeing with Java based repositories (and specifically for our env, Gradle/Spring based). I also want to be clear I'm not a Java dev so this is all what I'm understanding from a particular environment with what research I've done on it, none of this may be standard convention or best practice. We have a couple of "fun" decisions that were made:
Running cdxgen against these projects gives some pretty similar results:
So after this stacktrace, cdxgen fails and doesn't continue on, I think this is the first problem here is that when it stacktraces and fails to build, we don't try other components within that same repo. The second is that if we want to build the project in order to better and more accurately identify the components, there's a lot more that goes around that then just running a basic command, especially when folks have all sorts of weirdness in their environment. I know there's a issue that was recently(ish) opened that talks about this, but especially if we have wrappers going on, or don't specify the version of Spring or Java to use, how do you even begin to successfully build the component? So, at least in our particular case, we do have a fairly decent set of dependencies being used between In our environment, we'd have to do the following:
The TL;DR: here is that while building the Java project(s) might be the most accurate for determining dependencies, I don't think it's the easiest, simplest, or most reliable. Especially when the build is setup for failure by having unspecified dependencies/versions or super complex wrappers that do a lot of heavy lifting. We run into all sorts of fun stuff like different projects needing very specific versions of Java or some weird combo of Java/Spring/Other Things. This is likely to be very expensive time and processing wise as we'd have to install/uninstall lots of stuff for each run as there's likely to be conflicts and other problems with one component/project and the next one (even inside a single repo). A flag to set whether to do a full on build of Java or simply scan the files for possible dependencies might be a way to go, with the ability to do a full build being the way to go if you need a super in depth BOM, and those who just want to get a grasp on their basic dependencies go with the "scan my files and see what I reference" route. I think if we want to go the build route we're going to need a lot more customizability/configuration in cdxgen as there's all sorts of fun things there, and the current setup of passing gradle dependency tasks or extra args isn't going to work for a lot of projects, unless you're creating a cdxgen env specific for each individual project (which isn't terribly reusable). |
Beta Was this translation helpful? Give feedback.
-
Are there any other problems in the "dependencies" section? I heard recently that for dotnet, there are entries, but all of the |
Beta Was this translation helpful? Give feedback.
-
I'm noticing that for many of our java repositories, that the dependencies array is empty.
Wanted to seek feedback from others to see if this is localized to my environment, or wider spread
I'd really like to visualize the Dependency Graph within Dependency Track
Beta Was this translation helpful? Give feedback.
All reactions