From 105992ee20320163fd1bd050f306f41ebdc8010c Mon Sep 17 00:00:00 2001 From: Eran Turgeman Date: Wed, 17 Jun 2026 15:40:57 +0300 Subject: [PATCH 1/2] fix cocoapods OOM --- sca/bom/buildinfo/technologies/cocoapods/cocoapods.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go b/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go index 74310f53b..86c1d62ba 100644 --- a/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go +++ b/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go @@ -246,6 +246,9 @@ func parsePodDependenciesList(currNode *xrayUtils.GraphNode, dependenciesGraph m if currNode.NodeHasLoop() { return } + if uniqueDepsSet.Exists(currNode.Id) { + return + } uniqueDepsSet.Add(currNode.Id) pkgName := strings.Split(strings.TrimPrefix(currNode.Id, techutils.Cocoapods.GetXrayPackageTypeId()), ":")[0] currDepChildren := dependenciesGraph[pkgName] From 84d4e76deb4b7ad0f0475392bed916afc1ffb3dc Mon Sep 17 00:00:00 2001 From: Eran Turgeman Date: Wed, 17 Jun 2026 15:47:10 +0300 Subject: [PATCH 2/2] . --- sca/bom/buildinfo/technologies/cocoapods/cocoapods.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go b/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go index 86c1d62ba..ad50846f5 100644 --- a/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go +++ b/sca/bom/buildinfo/technologies/cocoapods/cocoapods.go @@ -243,10 +243,7 @@ func BuildDependencyTree(params technologies.BuildInfoBomGeneratorParams) (depen // Parse the dependencies into a Xray dependency tree format func parsePodDependenciesList(currNode *xrayUtils.GraphNode, dependenciesGraph map[string][]string, versionMap map[string]string, uniqueDepsSet *datastructures.Set[string]) { - if currNode.NodeHasLoop() { - return - } - if uniqueDepsSet.Exists(currNode.Id) { + if currNode.NodeHasLoop() || uniqueDepsSet.Exists(currNode.Id) { return } uniqueDepsSet.Add(currNode.Id)