Skip to content

Safety suggestions by Claude - #2

Open
fregante wants to merge 3 commits into
mainfrom
safe
Open

Safety suggestions by Claude#2
fregante wants to merge 3 commits into
mainfrom
safe

Conversation

@fregante

@fregante fregante commented Aug 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Updated iframe sandbox attributes for security.
Updated Content Security Policy to restrict script and style sources while allowing embedding. Removed previous CSP disabling and added additional security headers.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the HTML preview shell and rendering proxy to tighten browser security behavior (sandbox/referrer policy and response security headers) for the Refined GitHub HTML Preview worker.

Changes:

  • Adds referrerpolicy and reorders the <iframe sandbox> flags in src/shell.html.
  • Replaces “delete CSP” with an explicit CSP and adds X-Content-Type-Options: nosniff, plus strips Set-Cookie, in src/main.ts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/shell.html Adjusts iframe sandboxing and referrer behavior for the embedded preview.
src/main.ts Hardens response headers (CSP, cookie stripping, nosniff) for rendered content.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/shell.html
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants