From a244e40f0d99f456c2ac032590b8d8b74932bcde Mon Sep 17 00:00:00 2001 From: Romeo Rosete Date: Wed, 21 May 2025 11:27:45 -0400 Subject: [PATCH] Potential fix for code scanning alert no. 6: Clear-text logging of sensitive information Romeo Rosete Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- cmd/clef/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 575b6598f6..cca3eebb83 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -1096,10 +1096,12 @@ func GenDoc(ctx *cli.Context) error { for i := range req.Messages { req.Messages[i].Value = "[REDACTED]" // Obfuscate message content } + req.Meta = core.Metadata{} // Clear metadata to avoid leaking sensitive information case *core.ListRequest: for i := range req.Accounts { req.Accounts[i].URL.Path = "[REDACTED]" // Obfuscate account paths } + req.Meta = core.Metadata{} // Clear metadata to avoid leaking sensitive information } if data, err := json.MarshalIndent(v, "", " "); err == nil { output = append(output, fmt.Sprintf("### %s\n\n%s\n\nExample:\n```json\n%s\n```", name, desc, data))