File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/puppet/provider/base_dsc_lite Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,12 @@ def self.escape_quotes(text)
5353 end
5454
5555 def self . redact_content ( content )
56- # Redact Sensitive unwraps that appear as "'secret' # PuppetSensitive"
56+ # Note that here we match after an equals to ensure we redact the value being passed, but not the key.
57+ # This means a redaction of a string not including '= ' before the string value will not redact.
58+ # Every secret unwrapped in this module will unwrap as "'secret' # PuppetSensitive" and, currently,
59+ # always inside a hash table to be passed along. This means we can (currently) expect the value to
60+ # always come after an equals sign.
61+ # Note that the line may include a semi-colon and/or a newline character after the sensitive unwrap.
5762 content . gsub ( %r{= '.+' # PuppetSensitive;?(\\ n)?$} , "= '[REDACTED]'" )
5863 end
5964
You can’t perform that action at this time.
0 commit comments