diff --git a/pkg/iac/scanners/terraform/parser/funcs/collection.go b/pkg/iac/scanners/terraform/parser/funcs/collection.go index aea716d1c9b2..4f9c3ecaedf9 100644 --- a/pkg/iac/scanners/terraform/parser/funcs/collection.go +++ b/pkg/iac/scanners/terraform/parser/funcs/collection.go @@ -509,7 +509,8 @@ var SumFunc = function.New(&function.Spec{ ty := args[0].Type() if !ty.IsListType() && !ty.IsSetType() && !ty.IsTupleType() { - return cty.NilVal, function.NewArgErrorf(0, fmt.Sprintf("argument must be list, set, or tuple. Received %s", ty.FriendlyName())) + return cty.NilVal, function.NewArgErrorf(0, "argument must be list, set, or tuple. Received %s", ty.FriendlyName()) + } if !args[0].IsWhollyKnown() { diff --git a/pkg/iac/scanners/terraform/parser/funcs/crypto.go b/pkg/iac/scanners/terraform/parser/funcs/crypto.go index 76e5a7c13cfe..537d976706f4 100644 --- a/pkg/iac/scanners/terraform/parser/funcs/crypto.go +++ b/pkg/iac/scanners/terraform/parser/funcs/crypto.go @@ -175,7 +175,7 @@ var RsaDecryptFunc = function.New(&function.Spec{ default: errStr = fmt.Sprintf("invalid private key: %s", e) } - return cty.UnknownVal(cty.String), function.NewArgErrorf(1, errStr) + return cty.UnknownVal(cty.String), function.NewArgErrorf(1, "%s", errStr) } privateKey, ok := rawKey.(*rsa.PrivateKey) if !ok {