Skip to content

Commit 9828b2a

Browse files
authored
fix(stream): add netrc password to mask targets (#603)
1 parent 7ec1fe1 commit 9828b2a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

executor/linux/build.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,12 @@ func (c *client) ExecBuild(ctx context.Context) error {
504504
continue
505505
}
506506

507+
// add netrc to secrets for masking in logs
508+
sec := &pipeline.StepSecret{
509+
Target: "VELA_NETRC_PASSWORD",
510+
}
511+
_step.Secrets = append(_step.Secrets, sec)
512+
507513
// load any lazy secrets into the container environment
508514
c.err = loadLazySecrets(c, _step)
509515
if c.err != nil {

executor/linux/stage.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ func (c *client) ExecStage(ctx context.Context, s *pipeline.Stage, m *sync.Map)
151151
continue
152152
}
153153

154+
// add netrc to secrets for masking in logs
155+
sec := &pipeline.StepSecret{
156+
Target: "VELA_NETRC_PASSWORD",
157+
}
158+
_step.Secrets = append(_step.Secrets, sec)
159+
154160
// load any lazy secrets and inject them into container environment
155161
err = loadLazySecrets(c, _step)
156162
if err != nil {

0 commit comments

Comments
 (0)