Question 410
Architecture principle case — An invoice template evaluates user-authored expressions with access to application helpers. The design review is extracting the transferable lesson for later software projects. Which security principle best governs the observation?
Explanation
Correct Answer
In Q0410, the fictional organizational observation is: An invoice template evaluates user-authored expressions with access to application helpers. The distinct underlying risk mechanism is: Untrusted content is interpreted as server-side template instructions. Choice C addresses the governing security-design principle because it states: Template languages can become execution environments when untrusted text is parsed as instructions. This fits the governing design principle: Template languages can become execution environments when untrusted text is parsed as instructions. For measurable acceptance, the team should: Adversarial template markers are displayed or rejected without invoking server logic. Sustained prevention requires: Disable dangerous template features for externally editable content and test upgrades.
Incorrect Answers
Choice A describes a plausible governing security-design principle for a separate security issue, output encoding applied in wrong context: The encoder did not match the parser context where untrusted data was eventually interpreted. Its proposed response, “Encoding works only when tailored to the grammar of the final output context”, does not directly resolve this case. The discriminating cause is: Untrusted content is interpreted as server-side template instructions. A stronger governing security-design principle would be: Template languages can become execution environments when untrusted text is parsed as instructions. An objective reviewer would test: Adversarial template markers are displayed or rejected without invoking server logic.
Choice B describes a plausible governing security-design principle for a separate security issue, string length bypass after normalization: Identity comparisons and length rules used inconsistent Unicode representations. Its proposed response, “Identifier security depends on consistent canonical representation across validation and storage”, does not directly resolve this case. The discriminating cause is: Untrusted content is interpreted as server-side template instructions. A stronger governing security-design principle would be: Template languages can become execution environments when untrusted text is parsed as instructions. An objective reviewer would test: Adversarial template markers are displayed or rejected without invoking server logic.
Choice D describes a plausible governing security-design principle for a separate security issue, excessive exception swallowing: Broad error handling conceals security failures and creates unauthorized success states. Its proposed response, “Failing silently can convert an error into a privilege or integrity bypass”, does not directly resolve this case. The discriminating cause is: Untrusted content is interpreted as server-side template instructions. A stronger governing security-design principle would be: Template languages can become execution environments when untrusted text is parsed as instructions. An objective reviewer would test: Adversarial template markers are displayed or rejected without invoking server logic.



Secure Software Design (KEO1) Practice Tests