vetkit.go.xss.template-trusted-type
Request input is cast to a trusted html/template type, which switches off contextual escaping for it (cross-site scripting). Affected types are template.JS, URL, HTMLAttr, CSS, JSStr and Srcset.
Last updated:
Suite: Security
go
Request input is cast to a trusted html/template type, which switches off contextual escaping for it (cross-site scripting). Affected types are template.JS, URL, HTMLAttr, CSS, JSStr and Srcset.
Category: SECURITY · Engine rule severity: ERROR
How to fix it
Pass the value as a plain string and let html/template escape it for the context it is used in.
References
Source: packages/engine/rules/sast/go.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.