Remix.run Logo
zingar an hour ago

Were you following any patterns/standards/advice on what you needed to protect against? Anything you can point the rest of us to?

matheusmoreira an hour ago | parent | next [-]

> Were you following any patterns/standards/advice on what you needed to protect against?

Just the general knowledge that sharing a kernel with untrusted software is too dangerous, that hardware virtualization is an infinitely smaller attack surface and that the entire industry will be in deep shit if people or AI breaks hypervisors.

Initial threat model was supply chain attacks but eventually grew to include AI harnesses as well. Not very worried about them hacking me, more about accident prevention.

So that means each VM must be running a completely independent kernel that's fully isolated from the host's file system. They must also have fail closed network filtering built in.

> Anything you can point the rest of us to?

I have published my virtdev's design document.

https://github.com/matheusmoreira/virtdev/blob/master/DESIGN...

Yes, it is AI generated.

In summary, it's a QEMU VM orchestrator with a base OS image and project specific delta images. VM lifecycle is managed by systemd. System level isolation is already pretty good and it already solves the "AI wiped out my $HOME" problem. I'm currently working on a custom network stack to replace the nftables based firewall.

embedding-shape an hour ago | parent | prev | next [-]

You want to prevent the agent/others from reaching your home directory and other things. As long as you don't mount/sync directories/files from/to the container, so no mounting like "-v $(pwd):/app", but instead copy in, then when done, copy out.

And of course, instead of doing the "copy in > copy out" process manually, get your local agent to write a bash script that does that for you, given what directory you're in, and you're basically G2G.

tjoff an hour ago | parent [-]

What is the advantage of copying rather than a bind-mount?

hvb2 an hour ago | parent | prev [-]

What specifically are you looking for? If you start from the premise that it runs as you right now, then that's something you can easily improve upon.

Start by mounting just your repo and passing in the keys for the agent. Take it from there, it's like software engineering, you iterate.

When you run into issues you expand the tools in the container available to it.