Skip to content

Commit 3f46873

Browse files
earl-warrenChristopherHX
authored andcommitted
fix: valueMasker concurrent map write (#825)
* valueMasker create secrets copy Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 7ed767c23a554eefb0a7563c674e7a406393b60f) <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/825): <!--number 825 --><!--line 0 --><!--description Zml4OiB2YWx1ZU1hc2tlciBjb25jdXJyZW50IG1hcCB3cml0ZQ==-->fix: valueMasker concurrent map write<!--description--> <!--end release-notes-assistant--> Co-authored-by: ChristopherHX <[email protected]> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/825 Reviewed-by: Gusted <[email protected]> Co-authored-by: Earl Warren <[email protected]> Co-committed-by: Earl Warren <[email protected]>
1 parent 4f883e9 commit 3f46873

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

act/runner/logger.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"context"
66
"fmt"
77
"io"
8+
"maps"
89
"os"
910
"strings"
1011
"sync"
@@ -158,6 +159,7 @@ func withStepLogger(ctx context.Context, stepNumber int, stepID, stepName, stage
158159
type entryProcessor func(entry *logrus.Entry) *logrus.Entry
159160

160161
func valueMasker(insecureSecrets bool, secrets map[string]string) entryProcessor {
162+
secrets = maps.Clone(secrets)
161163
return func(entry *logrus.Entry) *logrus.Entry {
162164
if insecureSecrets {
163165
return entry

0 commit comments

Comments
 (0)