-
Notifications
You must be signed in to change notification settings - Fork 2
Testers
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 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)))
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)))