upvote
Proper and easy to use support for sandboxes at the OS level, or better yet capabilities, seems like the only long term solution.

Many things I run I want to limit to r/w a single dir, and to have to request permission to make network calls.

reply
Two problems with this:

1. There isn’t a single universal standard for sandboxing across all the different platforms that are supported by Rust.

2. Even if there were, if you’re compiling untrusted code then why would you trust the built output?

If you’re building the create then I’d argue that any preventative steps afterwards is akin to closing the barn door after the horse has already bolted.

reply
> There isn’t a single universal standard for sandboxing across all the different platforms that are supported by Rust.

I said OS level. It's something I should easily be able to do via the OS capabilities that would work for rust, npm, etc.

I would use it not only for rust builds but for nearly every app on my computer.

reply
> 1. There isn’t a single universal standard for sandboxing across all the different platforms that are supported by Rust.

Yeah, let's hold up the entire world of offensive cybersecurity capability while you work on that. Sure they will wait.

> 2. Even if there were, if you’re compiling untrusted code then why would you trust the built output?

You don't. You sandbox the hell out of it too.

reply
minimum-release-age
reply
Cargo has been working on min-publish-age, and the PR to stabilize the feature is in its final comment period and currently expected to land in Rust 1.100: https://github.com/rust-lang/cargo/pull/17335#issuecomment-5...
reply
> rust-rfcbot commented 2 days ago: This is now entering its final comment period

I wonder if this is not in part the same situation as we arguably had with the xz compromise: some imminent change would have made the attack harder (in xz's case, IIRC a change to systemd to dlopen the compression library instead of directly depending on it), and the attacker rushed before the opportunity window closed.

reply
is there a way to set up without using the nightly build?
reply
what if I need a dependency my teammate released 5 minutes ago
reply
You add company packages to an exclusion list.
reply
It explains that in the link posted.
reply
[dead]
reply