It might be interesting to replace SnakeYAML with SnakeYAML engine, which explicitly does not support beans: https://bitbucket.org/snakeyaml/snakeyaml-engine/src/master/ This is fine for our use case, since we dissect beans before exporting them, and also construct them based on simple maps. It would probably be safer to use the engine that is guaranteed not to build any weird Java objects based on YAML.
It might be interesting to replace SnakeYAML with SnakeYAML engine, which explicitly does not support beans: https://bitbucket.org/snakeyaml/snakeyaml-engine/src/master/ This is fine for our use case, since we dissect beans before exporting them, and also construct them based on simple maps. It would probably be safer to use the engine that is guaranteed not to build any weird Java objects based on YAML.