-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensitive variables containing multiline values are not hidden in the build output #11465
Comments
Hi there @aram535 thanks for reaching out. This is not something that is currently possible given the implementation of sensitive variables and the Vault function. There might be something that we can do here but it does seem like a bit of special case for the Vault function that requires a little thinking. That said, I don't think that this is a feature we will be able to dive further into any time soon. Instead I recommend using a local "mypassword" {
expression = vault('kv/data/password/mypassword)
sensitive = true
} One takeaway for this issue is to add an example or two in the Vault function documentation illustrating how to mark a variable sensitive. Please let me know if the |
Thanks for that. I just looked at our code repository history and I believe the mistake was that we tried using |
Just tried it on my local machine and doing an inspect ... for some reason some of the variables are not being hidden. I have 4 variables in a
inspect output:
|
Hi @aram535 apologies for the delayed response. Thank you for updating the issue with your latest test results. It looks like we have a bug. I tested locally with a simple heredoc example and validated that local variables containing multiline values do not get hidden when marked as sensitive. I'm going to apply the bug label to this issue and retitle it to reflect the found issue. In the meantime, the use of a If you disagreed with the retitling of this issue please feel free to drop a comment and we can discuss it further. Thanks again! |
@nywilken any new on this? shouldn't a security related bug get more attention? soon 2 whole years have passed since the initial report of the bug :( |
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
any variables that use the vault() lookup function should be tagged as sensitive automatically.
Use Case(s)
locals {
mypassword = vault('kv/data/password/mypassword)
}
The text was updated successfully, but these errors were encountered: