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.
I think the YAML as code comes from using YAML as a DSL and writing an interpreter.