nyx/tests/dynamic_fixtures/python/xss_positive.py
2026-06-05 10:16:30 -05:00

11 lines
323 B
Python

"""XSS — positive fixture.
Vulnerable function: echoes user input directly into HTML without escaping.
Expected verdict: Confirmed (XSS payload echoed verbatim to output).
"""
def render_comment(user_input):
"""Vulnerable: no HTML escaping."""
html = f"<div class='comment'>{user_input}</div>"
print(html)