Is it safe to use Google cloud functions and puppeteer for user code sandbox?
Is it safe to use Google cloud functions and puppeteer for user code sandbox?
Currently I use a VM with compilebox to run non secure users code at my app..
I’ve read about puppeteer and google cloud functions at this post: https://cloud.google.com/blog/products/gcp/introducing-headless-chrome-support-in-cloud-functions-and-app-engine
Can I use it as a sandbox environment just like compilebox? Or the environment variables of google cloud will be exposed to the non secure code? Thanks..
The most common would be the user trying to access process.env variables, for example
– felipepastorelima
Sep 8 '18 at 16:20
1 Answer
1
App Engine, Function, Compute Engine and likely others, all provide some built in services for handling things like authentication in client libraries. I don't think you'd want to run user provided code within the same GCP project straight on top of GCP hosting resources. I think your approach to running a sandbox within a VM is safer.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I'm not sure I understand your concern. What situation are you trying to avoid?
– Doug Stevenson
Sep 7 '18 at 15:09