mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-14 20:03:42 +00:00
fix: prevent masking gaps in workflow command logs
Normalize displayed command payloads so partial escaping cannot bypass masking, and retain complete one-character masks. Assisted-by: Codex:GPT-6
This commit is contained in:
6 files changed
+123
-20
No files matched your search
@@ -960,7 +960,7 @@ func logRow(entry logging.Record) *runnerv1.LogRow {
|
||||
|
||||
// mask repairs the content first, so a secret the repair itself spells out is still caught.
|
||||
func (r *Reporter) mask(content string) string {
|
||||
return r.logReplacer.Replace(strings.ToValidUTF8(content, "?"))
|
||||
return runner.MaskLog(strings.ToValidUTF8(content, "?"), r.logReplacer)
|
||||
}
|
||||
|
||||
// AddMask deliberately leaves the process-wide masker alone. Its entries come from every live
|
||||
|
||||
Reference in new issue
Block a user