voku/anti-xss
AntiXSS is a lightweight PHP library for filtering malicious input and preventing cross-site scripting attacks. It cleans user-supplied strings and arrays, with support for custom sanitizing, making it a simple drop-in defense for web forms and input handling.
isXssFound() can support telemetry, alerting, or audit logging when suspicious payloads are submitted, helping PMs justify investment in detection and abuse monitoring.xss_clean(), allow/deny lists, and isXssFound().html-sanitizer for more configurable solutions.For executives: This is a small, MIT-licensed PHP package that reduces XSS risk in features that accept user-generated HTML. It is inexpensive to trial, supports security/compliance goals, and can provide submission-level detection signals. It should be positioned as one layer in a broader security program—not a silver bullet—so the pitch should include output encoding, CSP, testing, and monitoring as companion investments.
For engineering: voku/anti-xss offers a simple AntiXSS->xss_clean() API, configurable allow/deny lists, and isXssFound() for detection. It is useful for legacy or mixed-content paths where some HTML must survive, but it is regex/blacklist-oriented and explicitly recommends stronger tools like HTML Purifier or html-sanitizer for configurable sanitization. Adopt it only with pinned versions, regression tests, and clear boundaries: Blade escaping for output, CSP as defense-in-depth, and ZAP/security testing for validation. The main adoption risks are low dependents, reliance on regex-based filtering, and the need to own configuration and upgrade hygiene.
How can I help you explore Laravel packages today?