YAML 1.1 Silently Converts Country Code 'NO' to Boolean False
A long-standing quirk in YAML 1.1 causes certain unquoted strings — including 'NO', 'YES', 'ON', and 'OFF' — to be interpreted as boolean values rather than plain text. This means a config entry like 'country: NO', intended to represent Norway, is silently read as 'country: false' by YAML parsers. The issue produces no error or crash, making it difficult to debug since the application simply behaves incorrectly. The problem has been documented for years and has affected real-world systems including DoorDash, Kubernetes manifests, Helm charts, and GitHub Actions workflows. Developers are advised to always quote such strings — writing 'country: "NO"' — and to use linting tools or strict YAML subsets like KYAML to prevent silent misinterpretation.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in