3 ms·
I'm working on an approach for Golang sandboxing which works through whitelisting imports, and munging all references, casting operations, and function calls, w
by stcredzero 7y ago
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.
- the_duke 7y agoSeems like a wasm interpreter with WASI might be a better approach.
- stcredzero 7y agoI've also given that some thought as well. Actually, all of the above could be combined.
- mhh__ 7y agoNo IO? As in at all? xor eax, eax here we come.
- stcredzero 7y agoI 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.
- mhh__ 7y agoCould 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)