habitat icon indicating copy to clipboard operation
habitat copied to clipboard

hab studio -q leaks origin key operation output to STDOUT

Open themightychris opened this issue 5 years ago • 5 comments

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)

themightychris avatar Dec 08 '18 17:12 themightychris

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] avatar Apr 02 '20 23:04 stale[bot]

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] avatar Jul 25 '21 11:07 stale[bot]

this is still an issue

themightychris avatar Jul 25 '21 12:07 themightychris

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] avatar Jul 31 '22 10:07 stale[bot]

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] avatar Aug 12 '23 18:08 stale[bot]