Add sandboxing for GString-based method invocation