Cake.Powershell icon indicating copy to clipboard operation
Cake.Powershell copied to clipboard

Disable logging for Powershell command (sensitive) parameters

Open javicrespo opened this issue 7 years ago • 1 comments

Hi,

This method

https://github.com/SharpeRAD/Cake.Powershell/blob/25d002311fb2566f7cf5be9ea6fcb44445fa41bf/src/Cake.Powershell/Runner/PowershellRunner.cs#L221

logs powershell commands including parameters... I'm passing an api key as a plain string to a powershell function (not as a SecureString, can I do that with Cake?) and because of the LogExecutingCommand I see the apikey in the cake output log... Do you think it'd make sense to add an option to disable command/parameter logging? If I bump the global cake log level above debug then I'll be missing insights from other tasks in the build process...

javicrespo avatar Sep 30 '18 15:09 javicrespo

Simple work around would be to get the API key from an environment variable inside the Powershell script rather than pass it in as an argument.

SharpeRAD avatar Oct 06 '18 15:10 SharpeRAD