Skip to content

Commit 8a96751

Browse files
timbastinCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tim Bastin <38261809+timbastin@users.noreply.github.com>
1 parent e905530 commit 8a96751

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

normalize/sbom_graph.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,9 +933,7 @@ func (g *SBOMGraph) FindAllComponentOnlyPathsToPURL(purl string, limit int) []Pa
933933
slog.Warn("Info source has multiple parents, which should not happen in a well-formed graph. This may lead to incorrect path results.", "infoSourceID", parentID, "parentArtifacts", parentArtifact)
934934
}
935935

936-
if !slices.ContainsFunc(parentArtifact, func(artifact string) bool {
937-
return artifact == g.ScopeID
938-
}) {
936+
if !slices.Contains(parentArtifact, g.ScopeID) {
939937
// parent artifact is not the one we scoped to, so skip this path
940938
continue
941939
}

0 commit comments

Comments
 (0)