Security Engineering

An engineer indents a nested key in a pipeline YAML file with a tab, and the automated linter rejects the file as invalid. What is the cause?

Show the answer

Correct answerD. YAML indentation must use spaces, not tab characters

AWhy not this: Bracketed table headers are TOML syntax; YAML nesting does not use them.

BWhy not this: Closing tags are an XML feature; YAML has no end tags, so a missing tag is not why the file fails.

CWhy not this: Curly braces delimit objects in JSON; YAML nests keys by indentation and does not require braces.

DWhy this is right: YAML structure depends on indentation and tabs are not permitted for it, so spaces are required and the tab triggers the error.

YAML expresses hierarchy through indentation, and the specification forbids tabs for indentation, so only spaces are valid. Braces, closing tags and bracketed headers belong to JSON, XML and TOML respectively, not YAML.