Provider secrets leak to debug logs if the provider has secrets that are not string-valued and set at the provider block root level
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
### What happened?
Sometimes, e.g if a resource is erroring, upjet logs the contents of `main.tf.json` to stdout. This is attempted redacted in https://github.com/upbound/upjet/blob/main/pkg/terraform/store.go#L314, but it only redacts string values in the provider configuration.
Providers may have configuration in nested blocks, or in arrays etc, and these will not be redacted.
- https://registry.terraform.io/providers/hashicorp/helm/latest/docs
- https://registry.terraform.io/providers/elastic/elasticstack/latest/docs
- https://registry.terraform.io/providers/hashicorp/nomad/latest/docs (e.g headers may be sensitive)
- https://registry.terraform.io/providers/Mastercard/restapi/latest/docs (again, headers with tokens)
I think this comment https://github.com/upbound/upjet/pull/62#discussion_r942242199 in the PR that fixed the issue for "flat" provider blocks (for lack of a better term) calls out one potential solution in letting providers add more filter functions.
Contributor guide
Assessment
This issue has not been assessed yet.