Skip to content

Commit

Permalink
fix: do not log stdout when a credential script fails
Browse files Browse the repository at this point in the history
Thanks to MichaelKnapp for reporting
  • Loading branch information
cgrinds committed Sep 20, 2024
1 parent e8ad843 commit ba08084
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ func (c *Credentials) execScript(cmdPath string, kind string, timeout string, e
c.logger.Error().Err(err).
Str("script", lookPath).
Str("timeout", duration.String()).
Str("stderr", stderr.String()).
Str("stdout", stdout.String()).
Str("kind", kind).
Msg("Failed to start script")
return response, fmt.Errorf("script start failed script=%s kind=%s err=%w", lookPath, kind, err)
Expand All @@ -177,8 +175,6 @@ func (c *Credentials) execScript(cmdPath string, kind string, timeout string, e
c.logger.Error().Err(err).
Str("script", lookPath).
Str("timeout", duration.String()).
Str("stderr", stderr.String()).
Str("stdout", stdout.String()).
Str("kind", kind).
Msg("Failed to execute script")
return response, fmt.Errorf("script execute failed script=%s kind=%s err=%w", lookPath, kind, err)
Expand All @@ -190,8 +186,6 @@ func (c *Credentials) execScript(cmdPath string, kind string, timeout string, e
c.logger.Debug().Err(err).
Str("script", lookPath).
Str("timeout", duration.String()).
Str("stderr", stderr.String()).
Str("stdout", stdout.String()).
Str("kind", kind).
Msg("Failed to parse YAML output. Treating as plain text.")
}
Expand Down

0 comments on commit ba08084

Please sign in to comment.