> PL/Rust contains a small set of lints to block what the developers have deemed the most egregious "I-Unsound" Rust bugs. > [...] > Note that this is done on a best-effort basis, and does not provide a strong level of security — it's not a sandbox, and as such, it's likely that a skilled hostile attacker who is sufficiently motivated could find ways around it (PostgreSQL itself is not a particularly hardened codebase, after all).
They have extra lints to help you avoid what they deem the most common soundness bugs. They make no claims that there is a way to make this approach safe against an attacker.
https://news.ycombinator.com/item?id=35501065
They do ban unsafe and also the stdlib which probably covers a lot of soundness holes.
Also I suspect the trust level required is somewhere in the middle.
this would mean they don't necessary rely on it for sandboxing untrusted code purpose
it's more like a convenient way to write a native extension function
through it's still a bit worrisome
They are designed to prevent bugs not intentional abuse.
If perfect without bugs they theoretically might be usable for security guards, but it's not where priorities lies when it comes to bug fixes and design.
And people mistaking rust safety + no unsafe lint for "security against evil code" could be long term quite an issue for rust in various subtle ways (not technical problems put people problems).