From be5e036794407c9a18bf74db9104270dae6035cc Mon Sep 17 00:00:00 2001 From: Erhan Cagirici <105722117+erhancagirici@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:06:40 +0300 Subject: [PATCH] fix unintentional modification of slice in GetSensitiveParameters (#449) Signed-off-by: Erhan Cagirici --- pkg/resource/sensitive.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/resource/sensitive.go b/pkg/resource/sensitive.go index f8447b2a..ba46e2c7 100644 --- a/pkg/resource/sensitive.go +++ b/pkg/resource/sensitive.go @@ -168,9 +168,8 @@ func GetSensitiveParameters(ctx context.Context, client SecretClient, from runti return err } pavedTF := fieldpath.Pave(into) - prefixes := []string{"spec.initProvider.", "spec.forProvider."} - for tfPath, jsonPath := range mapping { + prefixes := []string{"spec.initProvider.", "spec.forProvider."} jp := jsonPath groups := reFieldPathSpec.FindStringSubmatch(jsonPath) if len(groups) == 3 {