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.
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What if we allow
kittento 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
awkandsedare often provided bybusyboxortoybox. These replacements are often limited and buggy. If we could run an arbitrary filter throughkitten, we could do:Now, we can run our local
awkandsedon remote machines with all the bells and whistles.Use Case #2
When running
fzflocally, 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,
pastelhappens to provide pre-builts forarmso 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 installpastelon a remote host? The proposed feature inkittenwould 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. (GNUsedallows arbitrary program execution through the-eflag, so addingsedto the white-list would still be a security risk.)Background
Initially, I thought of requesting a
pastellike kitten that simply returned a subset of whatpastelprovides—primarily thelightenanddarkencommands. Then I thought that perhaps a more generic filter may allow other use cases.All reactions