Sandboxing has to be the funniest bit of wordplay anyone has ever made in tech. Sand is, of course, notoriously impossible to contain and never stays in the box. And it is not nearly as clever as an attacker!
The term doesn't come from the idea of containing sand.
It comes from things built for children to play in that have an edge with contents inside it. You play "in a sandbox" without having to deal with anything outside of the sandbox.
The sand in a children's sandbox spills over and gets everywhere. The children playing inside it .. they don't have to care. They are playing inside the sandbox, and for now, the world outside it is not relevant.
My girlfriend has strong opinions about how we use the word "library" to describe a software package.
Surely the metaphor should be that one package is a "book" and the entire package repository is the library, right? Left pad is an entire library? Huh?
And then we have no collective noun for collections of libraries!
It comes from things built for children to play in that have an edge with contents inside it. You play "in a sandbox" without having to deal with anything outside of the sandbox.
The sand in a children's sandbox spills over and gets everywhere. The children playing inside it .. they don't have to care. They are playing inside the sandbox, and for now, the world outside it is not relevant.