You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launch the user interface for searching and managing your module catalog.
10
12
11
13
```bash
@@ -31,6 +33,8 @@ catalog {
31
33
"github.com/gruntwork-io/terraform-aws-lambda", # url to remote repository
32
34
"http://github.com/gruntwork-io/terraform-aws-lambda", # same as above
33
35
]
36
+
no_shell = true # Optional: disable shell commands in boilerplate templates for security
37
+
no_hooks = true # Optional: disable hooks in boilerplate templates for security
34
38
}
35
39
```
36
40
@@ -41,6 +45,30 @@ This will recursively search for OpenTofu/Terraform modules in the root of the r
41
45
1. See the docs for a selected module: `ENTER`.
42
46
1. Use [`terragrunt scaffold`](/docs/features/scaffold/) to render a `terragrunt.hcl` for using the module: `S`.
43
47
48
+
## Security Configuration
49
+
50
+
The `catalog` block supports security-related configuration options:
51
+
52
+
-`no_shell` (bool): When set to `true`, disables shell command execution in boilerplate templates during scaffolding. This is useful for organizations that want to prevent the use of shell commands in templates for security reasons.
53
+
-`no_hooks` (bool): When set to `true`, disables hook execution in boilerplate templates during scaffolding. This is useful for organizations that want to prevent the use of hooks in templates for security reasons.
54
+
55
+
<Asidetype="caution">
56
+
57
+
Do not use catalog/scaffold to scaffold untrusted templates. IaC configurations are inherently powerful, as they
58
+
can run arbitrary code on your system, so make sure to only use trusted templates you have reviewed and approved.
59
+
60
+
</Aside>
61
+
62
+
These configuration values can be overridden by their corresponding CLI flags:
63
+
64
+
```bash
65
+
terragrunt catalog --no-shell --no-hooks
66
+
67
+
terragrunt scaffold module-url --no-shell
68
+
```
69
+
70
+
**Priority order**: CLI flags > catalog configuration > defaults (both default to `false`, allowing `shell` and `hooks` to be used by default)
71
+
44
72
## Custom templates for scaffolding
45
73
46
74
Terragrunt has a basic template built-in for rendering `terragrunt.hcl` files, but you can provide your own templates to customize how code is generated! Scaffolding is done via [boilerplate](https://github.com/gruntwork-io/boilerplate), and Terragrunt allows you to specify custom boilerplate templates via two mechanisms while using catalog:
0 commit comments