From 3a5d091759564496992a83fb2015a21c84a22213 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Fri, 30 Aug 2024 12:18:15 +0600 Subject: [PATCH] fix(misconf): do not recreate filesystem map (#7416) Signed-off-by: nikpivkin --- pkg/iac/scanners/terraform/parser/evaluator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/iac/scanners/terraform/parser/evaluator.go b/pkg/iac/scanners/terraform/parser/evaluator.go index 811f618787b5..809498f35c63 100644 --- a/pkg/iac/scanners/terraform/parser/evaluator.go +++ b/pkg/iac/scanners/terraform/parser/evaluator.go @@ -175,7 +175,9 @@ func (e *evaluator) evaluateSubmodules(ctx context.Context, fsMap map[string]fs. var modules terraform.Modules for _, sm := range submodules { modules = append(modules, sm.modules...) - fsMap = lo.Assign(fsMap, sm.fsMap) + for k, v := range sm.fsMap { + fsMap[k] = v + } } e.logger.Debug("Finished processing submodule(s).", log.Int("count", len(modules)))