Conversation

Jarkko Sakkinen

pi-landstrip sandboxes per tool command making it possible to re-evaluate Landlock policy also in that granularity. This allows permission dialogs, which are quite useful :-)

I find this tool command concept and related sandboxing a good one, and would use it outside of this context e.g., to limit external commands in email application or file manager.

And despite inheriting from such an unorthodox reality, Landstrip itself is just a polished sandboxing tool with real and relevant use cases.
1
0
0

@jarkko but is landlock any good yet? Last time I looked (around 6 months ago) it was full of holes that would leave a lot of things unchecked.

1
0
0
@zygoon I don't really know where to balance that question.
1
0
0
@zygoon It fits my use case at least, it as far as I can tell. And I understand what it is doing in my code too (which is becoming more rare) :-) Nothing is great in the void ... i.e., must be relative to a use case.
1
0
0

@jarkko right but my point is on the sandbox itself. When we looked at it, it was very hard to use it as a replacement for apparmor that works regardless if you have a certain directory or if you don't. With landlock you need to pre-create everything and hoping nothing gets mounted over or removed. With apparmor it was just a non-issue.

1
0
0
@zygoon One thing that is sort of "racy" but I find it more like security property is that I do recursive sweep to address "deny list" policy. When Landlock activates obviously anything done to subtree done outside of scan will not reflect and that is great.

As far ar AppArmor goes I don't really see benefit of using Landlock as system MAC. For my use case it is easiest tool available., AppArmor is much better for what AppArmor does.

So for that use case, not it's not a great choice :-)
2
0
1

@jarkko landlock does seem nice for an opt-in internal sandbox for something you maintain.

1
0
1
@zygoon My use use case more generically, outside of AI slop:

1. You have program, let's say file manager.
2. It has external commands.
3. You might give each a differnet permission to do shit.
4. Landlock is perfect from on-the-fly wrap that external command run into a sandbox.
0
0
0
@zygoon yeah and for sandbox like Landstrip it is best size-fit with macOS's Seatbelt and Win32 AppContainer profiles. I.e., same policy can be mapped to in the ballpark to same restrictions.
1
0
1

@jarkko Yes that does seem nice. I didn't know macos sandbox has become public API

1
0
1
@zygoon Yeah I use FFI in Rust to access those API calls in macOS :-)
1
0
0

Jarkko Sakkinen

Edited 5 days ago
@zygoon And while I don't likeAnthropic at all, I thought its JSON policy is useful to base tool level sandboxing. It's the most wide spread format that people most likely can cope with. Much better for adaptation than making my own perfect security policy format :-) And it gives limitations so that project does not blow out of proportions.
1
0
0

@jarkko the front end being readable is very important. I worry about the back end being enforced correctly.

1
0
0
@zygoon Yeah so how you actually should wrap these coding agent bastards is with at least two layers.

1. Within agent a working tool sandboxing implementation (Claude Code has broken).
2. Wrap the environment into a container or VM with disposable rootfs.

Most people will never implement 2 :-) It does not play with AI psychosis in yolo mode but yeah that is the safe play.

Google's gVisor (runsc) is a great option for wrap 2 when used together with Docker or Podman.
1
0
0

@jarkko have you seen openshell?

0
0
0