logoalt Hacker News

wren6991yesterday at 2:17 PM1 replyview on HN

Sure, the two main approaches are revoking execute permission from the executable itself, and write-protecting the things that it would modify (like $PWD/.git). Both of these are achievable with sandbox-exec or landlock_restrict_self(2).

This works for the `bash` example too. Spawning a new shell and running arbitrary commands is not an escalation because the child shell inherits the parent's restrictions.


Replies

qarl2yesterday at 2:26 PM

And what would prevent the LLM from downloading and compiling its own version of git? But it names it "not-git".

show 2 replies