jdockerty / jsonnet-playground

Playground for Jsonnet, inspired by Go/Rust projects of similar names.
https://jsonnet.jdocklabs.co.uk
MIT License
2 stars 0 forks source link

Run Jsonnet code #5

Closed jdockerty closed 6 months ago

jdockerty commented 6 months ago

The server should expose a route which allows Jsonnet code to be sent to it and then evaluated.

POST /api/run with the body containing a binary encoded Jsonnet snippet which can be loaded into a Jsonnet VM.


Security consideration

Running arbitrary code seems sketchy, although Jsonnet has no ability to modify a file system or execute network calls, it is hermetic.

Perhaps later we can use some sort of sandbox for evaluation.