To be precise,
0. Lean source does I/O because they are not so much proofs as proof-generating programs requiring "elaboration." The 240MB of compressed Lean that Alpöge uploaded expands to 8GB of compressed .ndjson fully elaborated proofs via lake build.
1. Given .ndjson, the actual proof checking performed by a kernel can take place I/O-free. The attack surface shrinks to (a) resource depletion, e.g. oom, and (2) kernel errors including those akin to malformed input segfaulting a C compiler.
The elephant in the room begs to be noticed: why does proof elaboration need to open such a huge security hole?