forked from Rockachopa/Timmy-time-dashboard
feat: code quality audit + autoresearch integration + infra hardening (#150)
This commit is contained in:
committed by
GitHub
parent
fd0ede0d51
commit
ae3bb1cc21
@@ -1,5 +1,6 @@
|
||||
import pytest
|
||||
|
||||
|
||||
def test_xss_protection_in_templates():
|
||||
"""Verify that templates now use the escape filter for user-controlled content."""
|
||||
templates_to_check = [
|
||||
@@ -9,9 +10,8 @@ def test_xss_protection_in_templates():
|
||||
("src/dashboard/templates/partials/approval_card_single.html", "{{ item.title | e }}"),
|
||||
("src/dashboard/templates/marketplace.html", "{{ agent.name | e }}"),
|
||||
]
|
||||
|
||||
|
||||
for path, expected_snippet in templates_to_check:
|
||||
with open(path, "r") as f:
|
||||
content = f.read()
|
||||
assert expected_snippet in content, f"XSS fix missing in {path}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user