commented out replace colons
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
parent
05820f3a67
commit
63e092c3b1
@ -40,8 +40,8 @@ func (c *transformSecretTask) Run(ctx context.Context, pctx *plancontext.Context
|
|||||||
diffs := dmp.DiffMain(inputSecretPlaintext, err.Error(), false)
|
diffs := dmp.DiffMain(inputSecretPlaintext, err.Error(), false)
|
||||||
for _, diff := range diffs {
|
for _, diff := range diffs {
|
||||||
if diff.Type == diffmatchpatch.DiffEqual {
|
if diff.Type == diffmatchpatch.DiffEqual {
|
||||||
diffText := strings.ReplaceAll(diff.Text, ":", "")
|
// 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, diffText, "<redacted>")
|
errStr = strings.ReplaceAll(errStr, diff.Text, "<redacted>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user