title: How to safely read untrusted Clojure code (not just some serialized data)?
body: <pre><code>(def evil-code (str "(" (slurp "/mnt/src/git/clj/clojure/src/clj/clojure/core.clj") ")" ))
  (def r (read-string evil-code ))
  </code></pre>
  
  <p>Works, but unsafe</p>
  
  <pre><code>(def r (clojure.edn/read-string evil-code))
  RuntimeException Map literal must contain an even number of forms  clojure.lang.Util.runtimeException (Util.java:219)
  </code></pre>
  
  <p>Does not work...</p>
  
  <p>How to read Clojure code (presering all '#'s as themselves is desirable) into a tree safely? Imagine a Clojure antivirus that want to scan the code for threats and wants to work with data structure, not with plain text.</p>