Skip to content

Fix CSP value leaking into demo app naming - #13

Merged
Obsecurus merged 1 commit into
mainfrom
codex/fix-demo-preview-name-leak
Feb 12, 2026
Merged

Obsecurus merged 1 commit into
mainfrom
codex/fix-demo-preview-name-leak

Conversation

@Obsecurus

Copy link
Copy Markdown
Owner

Summary

  • fix demo-mode app name extraction to only use cleaned user messages
  • prevent assistant preview HTML (including CSP meta tags) from contaminating app naming
  • preserve preview HTML structure during safety sanitization (no broken <title> tags)
  • keep client-side kid-safety filtering from mutating preview blocks
  • add regression tests for CSP-name leakage and preview-tag preservation

Root cause

In demo fallback mode, local intent extraction scanned all messages (including assistant preview HTML), and the quoted-value parser picked "Content-Security-Policy" from the injected CSP meta tag.

Validation

  • node --check server.js builder.js mechanic.js safety.js
  • AUTO_GENERATE_CERTS=false node --test test.js (90 pass)

@Obsecurus
Obsecurus merged commit 5bbc878 into main Feb 12, 2026
1 check passed
@Obsecurus
Obsecurus deleted the codex/fix-demo-preview-name-leak branch February 12, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant