MXC - a sandboxed code execution system

(github.com)

41 points | by nreece 4 hours ago

6 comments

  • dannyw 1 hour ago
    This looks pretty decent actually. Sure, you could consider it a frontend/SDK for bubblewrap/seatbelt/processcontainer; but setting em up consistently is far from trivial; and hand rolling is a really bad idea (speaking from experience).

    I like the ‘learning’ mode for figuring out what perms/config a runtime needs, the MIT license, the clear optional telemetry disclosures, and somewhat light and still readable documentation.

    Regardless of your views on Microsoft, this looks quite useful; serves a clear purpose, and from a quick glance, looks like a high quality project even if it’s just the first version.

  • kernc 28 minutes ago
    350,000 of mostly Rust SLOC [1] ... And the upstream sandboxes aren't even vendored!

    I'd be way more confident building upon something I can grasp and understand. [2]

    [1]: https://ghloc.dev/microsoft/mxc [2]: https://github.com/sandbox-utils/sandbox-run

    • dannyw 23 minutes ago
      If you look around the files, I think at least half is comments or unit tests, e.g.

      https://ghloc.dev/microsoft/mxc?branch=main&locsPath=%5B%22s...

      That site thinks this file has 2.9k sloc and doesn't seem to parse rust comments. In reality, there's only 1,465 sloc; and 635 loc of tests.

      Definitely nowhere near 350k sloc.

      I'm sure your sandbox run suits your needs, but it's also a single-contributor project, and crucially, only works on Linux.

      • IshKebab 11 minutes ago
        And it's 600 lines of dense Bash. I trust 350k lines of Rust way more than that!
  • minraws 1 hour ago
    Why is everyone making their own code execution agent runtime engines I have an entire project built on top of openshell already, why not first come up with a sandboxing policy design, like unix did, and then build on top of that.

    Currently all project do tend to agree on what and how they work but certain things being different makes porting tedius, if all of them have a bare minimum subset common amongst them it would be much easier to switch, and validate security surface area.

    I feel like there are more vulnerabilities in this vibe coded slop sandboxes, and it's more likely everyone one of us trusting them to build projects around them will shoot our foot off once a cve is hit in one that's common in all of them but since they are all slop copies someone will have to figure out how they apply to all others and then manually fix it properly, and if one of them makes a CVE public it will leave dozens of these runtimes open to exploits.

    I wish the best to my future self with regards to security I feel like we are completely screwed. Since we can no longer depend on upstream for security.

    • torginus 47 minutes ago
      The problem with OS level sandboxes, and the reason why WebAssembly)'s being explored in this space (and Electron is so popular), is that relying on OS/hardware features means your TAM shrinks to a fraction of total, and it's historically well known you set yourself up to lose.

      History is littered with tons of super cool OS features that didn't manage to gather enough market share and ended up as cool futures, and fodder for 'we invented the future 20 years ago' style articles.

    • rock_artist 1 hour ago
      That’s exactly it. There should be some permission logic for delegating.

      But as always, there are rivals trying to set their tone on what’s the standard. We all wish there was one unified agreed concept that will work but I guess the most common one will eventually survive.

      Just as Microsoft in a sense embraces Linux with WSL and also Apple has their virtualization framework.

      I hope we’ll eventually get unified model management system to include also permissions designed properly

    • hobofan 1 hour ago
      Different use-cases have different requirements.

      e.g. this one puts multi-platform support as a high requirement, a requirement that OpenShell doesn't fulfil (and likely won't given it's architecture/goals).

    • booster-rooster 55 minutes ago
      [flagged]
  • arj 28 minutes ago
    Would this allow a sandboxed container on windows to still run commands in wsl?
  • chneu 2 hours ago
    Right you are, Ken!
    • nizbit 1 hour ago
      There it is! :)
  • smitty1e 1 hour ago
    Asked Grok the difference between mxc and flatpak:

    "So MXC is a cross-platform “what may this workload touch?” layer aimed at agents. Flatpak is a Linux app format whose sandbox happens to share a backend with MXC on Linux."