Don't look at the credentials on the screen. - me, sometimes
Sharing one's terminal is a great way to explain, help, contribute.
It's possible to display secrets inadvertently, cat
ing a configuration file.
This simple binary helps to prevent this from happening.
Running safe
in shell mode opens up a new shell which will filter out all output.
E.g.
$ safe
$ cat config.yml
node-dev:
hostname: mynode-dev.local
username: node-user
password: XXXXXXXXXXXXXXXX
Warning: Dynamic program might not work as expected. For instance, top
, vim
, nano
will fail to run properly. This is due to the underlying parsing of the input.
Running safe
in pipe mode reads from stdin
and filter out the output to stdout
.
E.g.
$ cat config.yml | safe
node-dev:
hostname: mynode-dev.local
username: node-user
password: XXXXXXXXXXXXXXXX
This is the prefered way.
Check the lastest release.
Note: If you use the macOs binary, they are not currently signed. You need to right-click
and open
first (ref).
Currently you can git pull
and run make
.
$ go get github.com/nobe4/safe/tree/master/cmd/safe
Note: This method doesn't embed version information in the binary, prefer the release.
Feel free to open issues/PR.
Improvement ideas in no particular order:
- Write tests
- Support dynamic programs (
vim
,top
, ...) - Add signal handler when terminal closes
- Support windows
- Improve logger formatting
- Sign apple binary