I think most of the failures of vibe-coding can be fixed by running the agent inside a sandbox (a container or VM) that doesn't have access to any important credentials.
I think the failures like this one, deleting files, etc, are mostly unrelated to the programming language, but rather the llm has a bunch of bash scripting in its training data, and it'll use that bash scripting when it runs into errors that commonly are near to bash scripting online... which is to say, basically all errors in all languages.
I think the other really dangerous failure of vibe coding is if the llm does something like:
cargo add hallucinated-name-crate
cargo build
In rust, doing that is enough to own you. If someone is squatting on that name, they now have arbitrary access to your machine since 'build.rs' runs arbitrary code during 'build'. Ditto for 'npm install'.
I don't really think rust's memory safety or lifetimes are going to make any difference in terms of LLM safety.
That's insightful. So where Rust might help you to program safely (write code free from certain classes of bugs), cargo has much/all the same supply-chain risks we would see in development ecosystems like pip and npm. And your point about operating in the shell is also well-taken.
So yeah, I must narrow my Rust shilling to just the programming piece. I concede that it doesn't protect in other operations of development.
I think the failures like this one, deleting files, etc, are mostly unrelated to the programming language, but rather the llm has a bunch of bash scripting in its training data, and it'll use that bash scripting when it runs into errors that commonly are near to bash scripting online... which is to say, basically all errors in all languages.
I think the other really dangerous failure of vibe coding is if the llm does something like:
In rust, doing that is enough to own you. If someone is squatting on that name, they now have arbitrary access to your machine since 'build.rs' runs arbitrary code during 'build'. Ditto for 'npm install'.I don't really think rust's memory safety or lifetimes are going to make any difference in terms of LLM safety.