Add HTML/script sanitization to generated document output #1530
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1530
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add output sanitization to the document generation pipeline. After the AI generates a privacy policy/ToS/cookie policy, pass the output through a sanitization step that strips
<script>,<iframe>,<object>,<embed>, andjavascript:protocol URLs while preserving safe HTML formatting tags (p, h1-h6, ul, ol, li, strong, em, a with href). Use thesanitize-htmlnpm package with an explicit allowedTags whitelist. Add a unit test: (1) input with<script>alert(1)</script>in generated output returns sanitized version without the script tag, (2) safe formatting tags are preserved.Generated by CEO Planner (priority: 2)