Can anyone please tell me how to prevent logging of secrets in custom
plugins? I looked at packer codebase and tried
`packer.LogSecretFilter.Set(Secret_String)` but it's not working.

Packer version - 1.4.2

Thanks
Udbhav

On Fri 2 Aug, 2019, 11:34 AM Udbhav, <[email protected]> wrote:

> Hi,
>
> In my plugin I have added following code to avoid logging secrets
> `packer.LogSecretFilter.Set(secretResp)`
> just before executing the remote command. Secret is part of the remote
> command argument.
>
> Unfortunately, it is still getting logged.
>
> Output -
> 2019/08/02 11:27:22 packer.exe: 2019/08/02 11:27:22 [INFO] command
> 'powershell.exe -executionpolicy bypass -file
> C:\Users\Public\Documents\test.ps1 -CertU Base64Secret
>
> Expected
> 2019/08/02 11:27:22 packer.exe: 2019/08/02 11:27:22 [INFO] command
> 'powershell.exe -executionpolicy bypass -file
> C:\Users\Public\Documents\test.ps1 -CertU <Sensitive>
>
> Thanks
> Udbhav
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/b47d23db-841e-47ef-8cbf-2ae6b94acee0%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/b47d23db-841e-47ef-8cbf-2ae6b94acee0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CACjz45dzvoDofgH3x%3DaVkhp%2BM5opFMucL9-vpGy7RS3aODzfaw%40mail.gmail.com.

Reply via email to