Fix(UV): returning empty sbom when only and excluded groups fully overlap - #1822
Open
bd-spratikbharti wants to merge 1 commit into
Open
Fix(UV): returning empty sbom when only and excluded groups fully overlap#1822bd-spratikbharti wants to merge 1 commit into
bd-spratikbharti wants to merge 1 commit into
Conversation
bd-spratikbharti
requested review from
bd-samratmuk,
Copilot,
dterrybd and
zahidblackduck
July 22, 2026 19:17
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes UV dependency-group filtering so that when detect.uv.dependency.groups.only and detect.uv.dependency.groups.excluded fully overlap, Detect returns an intentionally empty SBOM (rather than ignoring both settings and scanning all dependencies).
Changes:
- Update
UVBuildExtractorto detect when no effectiveonlygroups remain after exclusions and return a successful extraction with an empty dependency graph instead of executinguv tree. - Adjust argument-building logic to signal the “no effective groups” scenario via
Optional<List<String>>. - Update unit tests to assert
uv treeis not executed and that an empty BOM (single code location, zero root dependencies) is produced.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| detectable/src/main/java/com/blackduck/integration/detectable/detectables/uv/buildexe/UVBuildExtractor.java | Returns an empty BOM when only - excluded yields no groups, avoiding an unintended full dependency scan. |
| detectable/src/test/java/com/blackduck/integration/detectable/detectables/uv/unit/UVBuildExtractorTest.java | Updates the overlap test to validate no CLI execution and an empty dependency graph result. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zahidblackduck
approved these changes
Jul 24, 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.
Description
When
detect.uv.dependency.groups.onlyanddetect.uv.dependency.groups.excludedcontained the same values, the effective group list became empty but the detector would ignore both settings and scan everything.After the fix, It instead produces an empty BOM, since the user explicitly asked to scan only those groups but also excluded all of them — leaving nothing to scan.