Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm working on an approach for Golang sandboxing which works through whitelisting imports, and munging all references, casting operations, and function calls, which lets one whitelist those as well. I would disallow all io and network access.


Seems like a wasm interpreter with WASI might be a better approach.


I've also given that some thought as well. Actually, all of the above could be combined.


No IO? As in at all?

xor eax, eax here we come.


I would be providing an API and handling IO for the client. I'm not disallowing all IO and network access. I'm restricting it to going through my API.


Could you not just hijack the system calls/c runtime? Then you can still do "safe" I/O without a specific API (Or are you rewriting the stdlib on top of the API? I've never actually used go so I don't really know anything about how it does or doesn't work usually)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: