ITeye博客

groovy shell 安全

dikar · 2017-01-18 11:29 · JAVA · 编程语言 · Markdown

groovy 可以动态执行代码,但是我们也想他在一定的沙箱中,目前有2种方式

 

1:利用java的 permissions

 

https://www.chrismoos.com/2010/03/24/groovy-scripts-and-jvm-security/

 

http://www.sdidit.nl/2012/12/groovy-dsl-executing-scripts-in-sandbox.html

 

2:在编译时动手脚,限制某些类

http://melix.github.io/blog/2015/03/sandboxing.html

 

https://github.com/groovy/groovy-core/blob/master/src/examples/groovyShell/BlacklistingShell.groovy

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。