Template Injection (ARCH9130)
Key swift.security.template-injection · Severity error · Category security · CWE CWE-1336
Flags Leaf rendering where the template name / text comes from request data.
Incorrect
Section titled “Incorrect”req.view.render(req.query["page"] ?? "home")Correct
Section titled “Correct”req.view.render("home", ctx)Templates are files under your control; request data is only ever context data.