diff --git a/AGENTS.md b/AGENTS.md index 9991b48789..e559848005 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -57,7 +57,7 @@ Reference: [Coding Guidelines](https://docs.opnsense.org/development/guidelines. Use extra scrutiny for changes touching firewall rules, NAT, routing, VPNs, authentication, authorization, sessions, CSRF, ACLs, certificates, firmware, packages, shell execution, file writes as root, import/export, backup/restore, and migrations. -When drafting a security report, include the relevant OPNsense web interface actions in the steps to reproduce so the finding can be verified end to end with the MVC layer and its security controls in place, unless the vulnerability can be reproduced without interacting with the web interface. +When drafting a security report, include the relevant OPNsense web interface actions in the steps to reproduce so the finding can be verified end to end with the MVC layer and its security controls in place, unless the vulnerability can only be reproduced without interacting with the web interface. Before reporting suspected XSS in MVC controller output, first trace the response through [`Response::send()`](src/opnsense/mvc/app/library/OPNsense/Mvc/Response.php), which applies `htmlspecialchars(..., ENT_NOQUOTES)` to JSON-encoded arrays and stream output by default unless the caller marks the content safe. Because ENT_NOQUOTES leaves single and double quotes unchanged, check that user-supplied values are escaped for the HTML attribute context. When JavaScript inserts already HTML-escaped strings into quoted attributes, use the globally available htmlSafe() helper to escape the remaining quotes.