Skip to content
Licenser edited this page Sep 14, 2010 · 1 revision

Testers are what the sandbox takes to do the actual decision if a code can be run, the code is taken apart into forms and every form has to be in the whitelists and pass the blacklists without a hit.

Creating testers

Creating a tester is pretty easy just list a few white and/or blacklists and it is nice:

(new-tester (whitelist (namespace-tester 'clojure.core)) (blacklist (function-tester 'map 'reduce)))

Extend testers

Sometimes there is a tester already – as the ones included in the lib – that does what you want just not quite all of it, say for example the secure tester does about what you want but you want allow people to def stuff.

(extend-tester secure-tester (whitelist (function-tester 'def)))

Clone this wiki locally