nk3 secrets: informational output should go to stderr

Open Beginner friendly
#484 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
cli, security

Research direction

Start in pynitrokey/cli/nk3/secrets.py at the linked line and inspect the informational output in the secrets commands, especially get-password. Reproduce the issue with the documented --password and xclip pipeline. Done means informational messages go to stderr while the password remains the only stdout output.

Written by the indexing model from the issue text.

Description

Some informational output like the one below is printed to standard out instead of standard error.

https://github.com/Nitrokey/pynitrokey/blob/c88030e050f9d567075f7731a3c69b42c0e53b45/pynitrokey/cli/nk3/secrets.py#L64

When used together with the --password option, it impacts its usefulness in scenarios like the following, where the password shall be copied to the clipboard:

nitropy nk3 secrets get-password --password myPass | xclip

From the code I infer that this might affect other informational lines as well.

Version: 0.4.40

Dominant language
Python
Stars
123
Forks
37
Avg merge
8h 47m
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Nitrokey/pynitrokey

All issues in Nitrokey/pynitrokey

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.