habitat-sh / habitat

Modern applications with built-in automation
https://www.habitat.sh
Apache License 2.0
2.61k stars 315 forks source link

hab studio -q leaks origin key operation output to STDOUT #5946

Open themightychris opened 5 years ago

themightychris commented 5 years ago

The -q option to hab-studio is advertised as suppressing hab output so you can get the output of the command, but currently fails to suppress 4 lines about origin keys, and there is no way to disable key import entirely via -k:

hab studio -q -t busybox run ls -l /
» Importing origin key from standard input
★ Imported secret origin key jarvus-20170820000144.
» Importing origin key from standard input
★ Imported public origin key jarvus-20170820000144.
total 52
drwxr-xr-x   2 root root 4096 Dec  8 17:19 bin
drwxr-xr-x  22 root root 4560 Dec  7 16:16 dev
drwxr-xr-x   2 root root 4096 Dec  8 17:49 etc
drwxr-xr-x   7 root root 4096 Dec  8 17:19 hab
drwxr-xr-x   3 root root 4096 Dec  8 17:19 home
drwxr-xr-x   2 root root 4096 Dec  8 17:49 lib
lrwxrwxrwx   1 root root    3 Dec  8 17:18 lib64 -> lib
drwxr-xr-x   2 root root 4096 Dec  8 17:18 mnt
drwxr-xr-x   2 root root 4096 Dec  8 17:18 opt
dr-xr-xr-x 592 root root    0 Nov  7 02:51 proc
drwxr-x---   2 root root 4096 Dec  8 17:20 root
drwxrwxrwt   2 root root   40 Dec  8 17:49 run
drwxr-xr-x   2 root root 4096 Dec  8 17:18 sbin
drwx--x--x  15 1000 1000 4096 Dec  8 08:01 src
dr-xr-xr-x  13 root root    0 Dec  8 17:26 sys
drwxrwxrwt   2 root root 4096 Dec  8 17:46 tmp
drwxr-xr-x   8 root root 4096 Dec  8 17:18 usr
drwxr-xr-x  11 root root 4096 Dec  8 17:18 var

When run without -q, the same command prints additional lines related to the leaked lines, so this seems to confirm it is a mistake for the nested command output to be passing through:

hab studio -t busybox run ls -l /
   hab-studio: Creating Studio at /hab/studios/mnt--chris-backup (default)
   hab-studio: Importing 'jarvus' secret origin key
» Importing origin key from standard input
★ Imported secret origin key jarvus-20170820000144.
   hab-studio: Importing 'jarvus' public origin key
» Importing origin key from standard input
★ Imported public origin key jarvus-20170820000144.
   hab-studio: Running 'ls -l /' in Studio at /hab/studios/mnt--chris-backup (default)
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

themightychris commented 3 years ago

this is still an issue

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.