redacting with stars

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2022-01-13 15:21:30 -07:00
parent 63e092c3b1
commit d7731fdc19
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C

View File

@ -41,7 +41,7 @@ func (c *transformSecretTask) Run(ctx context.Context, pctx *plancontext.Context
for _, diff := range diffs { for _, diff := range diffs {
if diff.Type == diffmatchpatch.DiffEqual { if diff.Type == diffmatchpatch.DiffEqual {
// diffText := strings.ReplaceAll(diff.Text, ":", "") // colons are tricky. Yaml keys end with them but if a secret contained one that got replaced, the secret wouldn't get redacted // diffText := strings.ReplaceAll(diff.Text, ":", "") // colons are tricky. Yaml keys end with them but if a secret contained one that got replaced, the secret wouldn't get redacted
errStr = strings.ReplaceAll(errStr, diff.Text, "<redacted>") errStr = strings.ReplaceAll(errStr, diff.Text, "***")
} }
} }