Re:No YAML
by ViViDboarder on Wednesday October 27, 2021 @11:09PM
(#29021933)
Do YAML or TOML have executable code?
I think the YAML as code comes from using YAML as a DSL and writing an interpreter.
Some software dealing with YAML had the ability to execute code by accident, see comment thread <https://news.ycombinator.com/item?id=22849761>.
Re:No YAML
by ViViDboarder on Sunday October 31, 2021 @12:06PM
(#29057965)
Sure. That’s not a YAML problem as it’s not part of the spec. Someone could to the exact same thing with JSON and use a custom spec that is a string starting with a bang and executes it.
I think the reason people don’t is that JSON is terrible for writing my hand and YAML isn’t.
Here's what I want. Something that is more readable than JSON, so either TOML-like or YAML-like, but without executable code or any of that nonsense. On top of that, a schema definition file (think XSD) that asserts facts about the structure of the config, using a theorem prover like Coq or Idris.
This way, we get nice configs, but within a restricted space.