Hacker News new | ask | show | jobs
by michaelmior 3523 days ago
JSON is not executable. Although I suppose you could argue that embedding an interpreter for a DSL like this inside your app is violating the restriction.
1 comments

Lua isn't executable either. The point at which it results in some corresponding machine instructions wouldn't be much different in this case.
ELF binaries aren't executable either: They require the kernel to interpret them, preparing virtual memory and granting it a pid. Alone, they're just sequences of bytes.
What's your point? That you are willing to extend this principle to ELF binaries doesn't really affect my argument.

My point is that for the purpose of letting some non-trusted instructions run safely in a program, encoding them as JSON or Lua will come with the same caveats. Ultimately, they are both interpreted and can be sandboxed thus. Neither contain any code that will be passed off as-is for the CPU to execute. In some cases, neither does an ELF blob.