mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Mask secrets in job output (#231)
Previously secrets would be shown in log output as provided. This commit updates the stepLogFormatter to replace any instance of the secret string with "***", as GitHub Actions would Known issues: If the secret is a generic string (such as "docker"), all occurances of that string will be replaced in the output Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
b9851b2453
commit
02d5cbebae
2 changed files with 10 additions and 3 deletions
|
@ -73,7 +73,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
|
|||
}
|
||||
stageExecutor = append(stageExecutor, func(ctx context.Context) error {
|
||||
jobName := fmt.Sprintf("%-*s", maxJobNameLen, rc.String())
|
||||
return rc.Executor()(WithJobLogger(ctx, jobName))
|
||||
return rc.Executor()(WithJobLogger(ctx, jobName, rc.Config.Secrets))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue