Skip to content

Commit

Permalink
fix(stream): add netrc password to mask targets (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored Sep 27, 2024
1 parent 7ec1fe1 commit 9828b2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions executor/linux/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,12 @@ func (c *client) ExecBuild(ctx context.Context) error {
continue
}

// add netrc to secrets for masking in logs
sec := &pipeline.StepSecret{
Target: "VELA_NETRC_PASSWORD",
}
_step.Secrets = append(_step.Secrets, sec)

// load any lazy secrets into the container environment
c.err = loadLazySecrets(c, _step)
if c.err != nil {
Expand Down
6 changes: 6 additions & 0 deletions executor/linux/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ func (c *client) ExecStage(ctx context.Context, s *pipeline.Stage, m *sync.Map)
continue
}

// add netrc to secrets for masking in logs
sec := &pipeline.StepSecret{
Target: "VELA_NETRC_PASSWORD",
}
_step.Secrets = append(_step.Secrets, sec)

// load any lazy secrets and inject them into container environment
err = loadLazySecrets(c, _step)
if err != nil {
Expand Down

0 comments on commit 9828b2a

Please sign in to comment.