| ▲ | sargstuff 4 hours ago | |
Use sql to create table views & only populate with data llm should have access to. for 'command line' stuff: If just shell text (aka, a-z,A-Z,0-9), then crude way would have a program sit between inbound ssh and database. Would need to determine how to send back error notice if something not allow. aka in "not OK" set (rm, move, chmod, etc). May need to break-up 'single line grouped commands' aka using end of line as marker, can send multiple sequences of shell commands per "new line" aka echo "example"; ls *; etc. awk/gawk works nicely in this role. see awk filtering standard input concept -- demo concept[0]. Perhaps use ncat[4] instead of 'pipe'. Perhaps make default shell rsh[5] used in sshfs[6] setup and set up rsh restrictions. More technical, would make use of ebpf -- demo concept [1]. This would be able to handle non-ascii input. Total overkill would be making use of kernel capabilities or pseudo-kernel capabilities via ptrace related things[2]. humor ip : Should the TV program Stargate's security door covering the portal have been called 'ncat' or '/dev/null'? ----------------------- [0] : awk/gawk : https://www.tecmint.com/read-awk-input-from-stdin-in-linux/ [1] : ebpf : https://medium.com/@yunwei356/ebpf-tutorial-by-example-4-cap... [2] : ptrace : https://events.linuxfoundation.org/wp-content/uploads/2022/1... [4] : ncat : https://nc110.sourceforge.io/ [5] : rsh : https://www.gnu.org/software/bash/manual/html_node/The-Restr... [6] : https://stackoverflow.com/questions/35830509/sshfs-linux-how... | ||