Arbitrary filters through kitten? #5912
salmankhilji
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I'm not a fan of this concept. It's got a huge security footprint and a
is only useful on underpowered remote systems, which is a niche use
case.
For your specific usecase you can simply write a script that invokes the
ssh kitten while setting a env var with the lighter and darker colors
calculated on the local machine. Your remote script can use those env
vars. Or you could even just have those env vars set in bashrc and have
the ssh kitten forward them to the remote computer automatically.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What if we allow
kitten
to run an arbitrary filter on the host machine? i.e., Run the given program on the host computer with these arguments and output the result to stdout.Use Case #1
While running on embedded systems, such as Android, basic tools like
awk
andsed
are often provided bybusybox
ortoybox
. These replacements are often limited and buggy. If we could run an arbitrary filter throughkitten
, we could do:Now, we can run our local
awk
andsed
on remote machines with all the bells and whistles.Use Case #2
When running
fzf
locally, I like to specify a darker or lighter shade of the terminal background color. This is what I currently do:While this works locally on my machine, I would like to retain this capability within a script running on my Android device (or even SSH).
Luckily,
pastel
happens to provide pre-builts forarm
so I could this on Android, but what if there wasn't a pre-built binary? Or what if I didn't want to have to installpastel
on a remote host? The proposed feature inkitten
would rid the need to have to manually cross compile such tools for embedded systems.Another program that comes to mind is
column
. While this basic tool is available on most Linux systems, I have yet to find a pre-built for Android/arm.Security Risks
Running an arbitrary program on our local machines from remote hosts is obviously a security risk. By running the following on the remote host:
one could easily blow way important data on my local machine, so we may need to allow only a white-listed subset of filters that are specified in, say,
kitty.conf
. (GNUsed
allows arbitrary program execution through the-e
flag, so addingsed
to the white-list would still be a security risk.)Background
Initially, I thought of requesting a
pastel
like kitten that simply returned a subset of whatpastel
provides—primarily thelighten
anddarken
commands. Then I thought that perhaps a more generic filter may allow other use cases.Beta Was this translation helpful? Give feedback.
All reactions