Multi variant#178
Merged
Merged
Conversation
Signed-off-by: Appu <appu@google.com>
mathjeff
approved these changes
Jul 8, 2026
mathjeff
left a comment
Collaborator
There was a problem hiding this comment.
(Unrelated: we're back from Singapore so I'm approximately in the same time zone again)
loosebazooka
force-pushed
the
multi-variant
branch
2 times, most recently
from
July 8, 2026 19:19
8912f57 to
45d988b
Compare
Collaborator
Author
|
I actually think I might want to this differently by creating a logical grouping for each component type: "xmlresolver" and then adding a contains relationship on each of variants "xmlresolver.java" and "xmlresolver-data.jar". BRB with new impl. |
loosebazooka
force-pushed
the
multi-variant
branch
3 times, most recently
from
July 8, 2026 20:06
3e660b8 to
b1a36c8
Compare
Collaborator
Author
|
The classifier problem is a bit weird because it's a weird pattern:
In the end, variants seem to be bad but we can kind of handle them here. |
If a component is represented by multiple artifacts, create a logical component for it and add in all artifacts via a "CONTAINS" relationship -- according to gemini, analysis tools should use this as a signal that it's a local parent of multiple files. Also modify purl extraction to include classifier and type Signed-off-by: Appu <appu@google.com>
loosebazooka
force-pushed
the
multi-variant
branch
from
July 8, 2026 20:53
b1a36c8 to
9f3c8b0
Compare
mathjeff
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #177
fixes #115
We have to keep track of all the files that are referenced from a single component. Unlike maven, gradle treats them all as a single "component" -- so differentiating them is a bit weird. But even maven does it a bit weird -- potentially assigning dependencies to a variant that does not explicitly define any.
If a component is represented by multiple artifacts, create a logical component for it and add in all artifacts via a "CONTAINS" relationship. According to gemini, analysis tools should use this as a signal that it's a local parent of multiple files.
I don't think this behavior is ideal in the case where a subproject is bringing in a different variant of module that the root project is, as we lose some information about which project truly depends on a component. But for security analysis, at worst, this might attribute the dependency to an extra project (but configuring a project like this is probably weird anyway).