Skip to content

Commit

Permalink
comment false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze committed Oct 2, 2020
1 parent 603efe2 commit 10c3e33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crypto/keyring/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,10 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {
buf := bufio.NewReader(buf)
pass, err := input.GetPassword("Enter keyring passphrase:", buf)
if err != nil {
// NOTE: LGTM.io reports a false positive alert that states we are printing the password,
// but we only log the error.
//
// lgtm [go/clear-text-logging]
fmt.Fprintln(os.Stderr, err)
continue
}
Expand All @@ -658,6 +662,10 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {

reEnteredPass, err := input.GetPassword("Re-enter keyring passphrase:", buf)
if err != nil {
// NOTE: LGTM.io reports a false positive alert that states we are printing the password,
// but we only log the error.
//
// lgtm [go/clear-text-logging]
fmt.Fprintln(os.Stderr, err)
continue
}
Expand Down

0 comments on commit 10c3e33

Please sign in to comment.