Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-10493

SSHAction Plugin writes to logs directly without control

    XMLWordPrintableJSON

    Details

    • Rank:
      1|hzzi5r:

      Description

      The SSHAction plugin writes the results of standard out from the script it runs directly into the log. I was testing using ls -l / as the command:

      2016-07-27 15:16:11,875 - DEBUG [fork-0-0:c.c.h.p.b.a.SSHAction@87] - Stdout: total 7816
      dr-xr-xr-x.  2 root root   4096 Jun 29 20:06 .
      dr-xr-xr-x. 22 root root   4096 Jun 29 19:43 ..
      -rwxr-xr-x.  1 root root  27776 May 11 08:59 arch
      lrwxrwxrwx.  1 root root      4 May 26 19:49 awk -> gawk
      -rwxr-xr-x.  1 root root  26264 May 11 08:59 basename
      -rwxr-xr-x.  1 root root 941880 May 10 23:21 bash
      -rwxr-xr-x.  1 root root  48568 May 11 08:59 cat
      -rwxr-xr-x.  1 root root  55472 May 11 08:59 chgrp
      -rwxr-xr-x.  1 root root  52472 May 11 08:59 chmod
      -rwxr-xr-x.  1 root root  57464 May 11 08:59 chown
      -rwxr-xr-x.  1 root root 122896 May 11 08:59 cp
      -rwxr-xr-x.  1 root root 135808 Sep  4  2014 cpio
      lrwxrwxrwx.  1 root root      4 May 26 19:50 csh -> tcsh
      -rwxr-xr-x.  1 root root  45536 May 11 08:59 cut
      -rwxr-xr-x.  1 root root 109672 Oct 17  2012 dash
      -rwxr-xr-x.  1 root root  59392 May 11 08:59 date
      -rwxr-xr-x.  1 root root  12600 Apr 22  2015 dbus-cleanup-sockets
      -rwxr-xr-x.  1 root root 339080 Apr 22  2015 dbus-daemon
      -rwxr-xr-x.  1 root root  18560 Apr 22  2015 dbus-monitor
      -rwxr-xr-x.  1 root root  22456 Apr 22  2015 dbus-send
      -rwxr-xr-x.  1 root root  11008 Apr 22  2015 dbus-uuidgen
      -rwxr-xr-x.  1 root root  55256 May 11 08:59 dd
      -rwxr-xr-x.  1 root root  94224 May 11 08:59 df
      -rwxr-xr-x.  1 root root   9944 May 10 22:58 dmesg
      lrwxrwxrwx.  1 root root      8 May 26 19:45 dnsdomainname -> hostname
      lrwxrwxrwx.  1 root root      8 May 26 19:45 domainname -> hostname
      -rwxr-xr-x.  1 root root  81120 Nov 11  2010 dumpkeys
      -rwxr-xr-x.  1 root root  28176 May 11 08:59 echo
      -rwxr-xr-x.  2 root root  53400 Nov 11  2010 ed
      lrwxrwxrwx.  1 root root      4 May 26 19:49 egrep -> grep
      -rwxr-xr-x.  1 root root  26368 May 11 08:59 env
      lrwxrwxrwx.  1 root root      2 May 26 19:45 ex -> vi
      -rwxr-xr-x.  1 root root  25120 May 11 08:59 false
      lrwxrwxrwx.  1 root root      4 May 26 19:49 fgrep -> grep
      -rwxr-xr-x.  1 root root 239000 Mar  1 12:25 find
      -rwxr-xr-x.  1 root root  41896 May 10 22:58 findmnt
      -rwxr-xr-x.  1 root root 382752 Nov 10  2015 gawk
      -rwxr-xr-x.  1 root root  33488 Jun  2  2014 gettext
      -rwxr-xr-x.  1 root root 167744 Nov 10  2015 grep
      lrwxrwxrwx.  1 root root      3 May 26 19:49 gtar -> tar
      -rwxr-xr-x.  1 root root     61 Mar 17  2014 gunzip
      -rwxr-xr-x.  1 root root  68704 Mar 17  2014 gzip
      -rwxr-xr-x.  1 root root  17872 May 10  2012 hostname
      -rwxr-xr-x.  1 root root  15320 May 11 19:34 ipcalc
      lrwxrwxrwx.  1 root root     41 May 26 19:45 iptables-xml -> /etc/alternatives/bin-iptables-xml.x86_64
      lrwxrwxrwx.  1 root root     20 May 26 19:45 iptables-xml-1.4.7 -> /sbin/iptables-multi
      -rwxr-xr-x.  1 root root  11296 Nov 11  2010 kbd_mode
      -rwxr-xr-x.  1 root root  15240 May 10 22:58 kill
      -rwxr-xr-x.  1 root root  26256 May 11 08:59 link
      -rwxr-xr-x.  1 root root  49504 May 11 08:59 ln
      -rwxr-xr-x.  1 root root 112208 Nov 11  2010 loadkeys
      -rwxr-xr-x.  1 root root  15048 May 10 22:58 logger
      -rwxr-xr-x.  1 root root  31552 May 10 22:58 login
      -rwxr-xr-x.  1 root root 117048 May 11 08:59 ls
      -rwxr-xr-x.  1 root root  62656 May 10 22:58 lsblk
      lrwxrwxrwx.  1 root root     22 May 26 19:45 mail -> /etc/alternatives/mail
      -rwxr-xr-x.  1 root root 390744 Dec 16  2014 mailx
      -rwxr-xr-x.  1 root root  50056 May 11 08:59 mkdir
      -rwxr-xr-x.  1 root root  33144 May 11 08:59 mknod
      -rwxr-xr-x.  1 root root  38048 May 11 08:59 mktemp
      -rwxr-xr-x.  1 root root  41216 May 10 22:58 more
      -rwsr-xr-x.  1 root root  77336 May 10 22:58 mount
      -rwxr-xr-x.  1 root root   9848 Jul 23  2015 mountpoint
      -rwxr-xr-x.  1 root root 113392 May 11 08:59 mv
      -rwxr-xr-x.  1 root root 178896 Nov 12  2010 nano
      -rwxr-xr-x.  1 root root 128216 May 10  2012 netstat
      -rwxr-xr-x.  1 root root  28784 May 11 08:59 nice
      lrwxrwxrwx.  1 root root      8 May 26 19:45 nisdomainname -> hostname
      -rwsr-xr-x.  1 root root  38264 May 10 18:32 ping
      -rwsr-xr-x.  1 root root  36488 May 10 18:32 ping6
      -rwxr-xr-x.  1 root root  36808 Aug 11  2014 plymouth
      -rwxr-xr-x.  1 root root  89504 May 10 23:23 ps
      -rwxr-xr-x.  1 root root  31656 May 11 08:59 pwd
      -rwxr-xr-x.  1 root root  11576 May 10 22:58 raw
      -rwxr-xr-x.  1 root root  40056 May 11 08:59 readlink
      -rwxr-xr-x.  2 root root  53400 Nov 11  2010 red
      -rwxr-xr-x.  1 root root  57440 May 11 08:59 rm
      -rwxr-xr-x.  1 root root  40480 May 11 08:59 rmdir
      lrwxrwxrwx.  1 root root      4 May 26 19:46 rnano -> nano
      -rwxr-xr-x.  1 root root  30648 May 10 23:49 rpm
      lrwxrwxrwx.  1 root root      2 May 26 19:45 rvi -> vi
      lrwxrwxrwx.  1 root root      2 May 26 19:45 rview -> vi
      -rwxr-xr-x.  1 root root  72248 Jun 22  2012 sed
      -rwxr-xr-x.  1 root root  42384 Nov 11  2010 setfont
      -rwxr-xr-x.  1 root root  23672 Aug 22  2010 setserial
      lrwxrwxrwx.  1 root root      4 May 26 19:48 sh -> bash
      -rwxr-xr-x.  1 root root  27848 May 11 08:59 sleep
      -rwxr-xr-x.  1 root root  98872 May 11 08:59 sort
      -rwxr-xr-x.  1 root root  65032 May 11 08:59 stty
      -rwsr-xr-x.  1 root root  34904 May 11 08:59 su
      -rwxr-xr-x.  1 root root  25432 May 11 08:59 sync
      -rwxr-xr-x.  1 root root 395496 May 10 18:33 tar
      -rwxr-xr-x.  1 root root  14880 May 10 22:58 taskset
      -rwxr-xr-x.  1 root root 388064 May 11 00:30 tcsh
      -rwxr-xr-x.  1 root root  52560 May 11 08:59 touch
      -rwxr-xr-x.  1 root root  11440 May 10 18:32 tracepath
      -rwxr-xr-x.  1 root root  12304 May 10 18:32 tracepath6
      -rwxr-xr-x.  1 root root  57480 Nov 11  2010 traceroute
      lrwxrwxrwx.  1 root root     10 May 26 19:46 traceroute6 -> traceroute
      -rwxr-xr-x.  1 root root  25120 May 11 08:59 true
      -rwsr-xr-x.  1 root root  53472 May 10 22:58 umount
      -rwxr-xr-x.  1 root root  27776 May 11 08:59 uname
      -rwxr-xr-x.  1 root root   2555 Nov 11  2010 unicode_start
      -rwxr-xr-x.  1 root root    363 Nov 11  2010 unicode_stop
      -rwxr-xr-x.  1 root root  25760 May 11 08:59 unlink
      -rwxr-xr-x.  1 root root  10256 May 11 19:34 usleep
      -rwxr-xr-x.  1 root root 913080 Jul 24  2015 vi
      lrwxrwxrwx.  1 root root      2 May 26 19:45 view -> vi
      lrwxrwxrwx.  1 root root      8 May 26 19:45 ypdomainname -> hostname
      -rwxr-xr-x.  1 root root     62 Mar 17  2014 cat
      

      That's great for debuting, but what if the result of the script is suppose to be confidential, and used for the run only and then discarded? This could add a lot of stuff to the log that either should not be there or that adds clutter.

        Attachments

          Activity

            People

            • Assignee:
              nitin Nitin Motgi
              Reporter:
              John John Jackson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: