security: add CT executeTemplate to default function_denylist (#24541)

This PR adds Consul Template's executeTemplate function to the denylist by
default, in order to prevent accidental or malicious infinitely recursive
execution.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
This commit is contained in:
Piotr Kazmierczak
2024-11-22 19:33:56 +01:00
committed by GitHub
parent 368241dbf2
commit f7a4ded2c0
5 changed files with 20 additions and 9 deletions

View File

@@ -73,7 +73,7 @@ var (
DefaultTemplateMaxStale = 87600 * time.Hour
DefaultTemplateFunctionDenylist = []string{"plugin", "writeToFile"}
DefaultTemplateFunctionDenylist = []string{"executeTemplate", "plugin", "writeToFile"}
)
// RPCHandler can be provided to the Client if there is a local server