Safety notes / 01
Test your sandbox before you trust it
A config file that says "isolated" proves nothing. Before you run strangers' code, find out what the sandbox really blocks.
You found a sandbox tool, the README says “secure isolation”, the config validates, and the hello-world runs. That tells you it starts. It doesn’t tell you what it stops.
🎯 Attack it yourself first
Before real users touch it, write the nasty snippets yourself and see what happens:
- Read
/etc/passwd, your env vars, the cloud metadata endpoint. - Open a network connection to somewhere it shouldn’t reach.
- Fork until something gives, or allocate memory until the box swaps.
- Loop forever and check that the timeout actually kills it.
- Write a big file and check whether it’s still there on the next run.
Keep these as automated tests. When you bump the runtime version or change a config flag, run them again.
📋 Write down why you trust it
When you decide a sandbox is good enough for a workload, note which tests passed, on which version, and against which threat. “We tested it” won’t help much in six months. “Version X passed these 14 checks on this date” will.
⚠️ Where mPaka is today
We follow the same rule ourselves. The local mPaka executor is mock_no_code_execution: it doesn’t run submitted code at all, and we say so on purpose. A real runtime only gets switched on after it passes a test campaign like the one above. Until then, don’t treat mPaka as a production sandbox.