Masking Sensitive data like passwords when commenting to GitHub #1083
-
Feature OverviewMasking Sensitive data like passwords when commenting to GitHub. Why is the feature needed?Terraform masks sensitive data automatically but there are cases where it is still unable to do it.
Sometimes these resources as coded in such a fashion Terraform misses it or we want to check part of the resource but will only get sensitive in place. Does the feature include Breaking Changes?No, it should not have breaking changes. Tfcmt is parsing terraform output before posting to Github, we should be able to add a regex match and replace function easily, with a switch. Example Code$ Configuration ENABLE_MASKING
MASKING_REGEX
MASKING_CHAR Reference |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Thank you for your proposal. I note my several ideas of the interface.
export TFCMT_MASKED_VALUES=foo,bar
export TFCMT_MASKED_ENVS=GITHUB_TOKEN,DATADOG_API_KEY
masked_envs:
- GITHUB_TOKEN
masked_patterns:
# GitHub Access Token
- ghp_[^ ]{36} |
Beta Was this translation helpful? Give feedback.
-
Terraform sensitive input variables and outputs and sensitive functionTerraform itself has features to prevent sensitive data from being leaked.
So first you should use these features. |
Beta Was this translation helpful? Give feedback.
tfcmt v4.9.0 is out 🎉
https://github.com/suzuki-shunsuke/tfcmt/releases/tag/v4.9.0
tfcmt has supported masking sensitive data.
Please see the release note and document.
https://suzuki-shunsuke.github.io/tfcmt/mask-sensitive-data/