Conversation
… security headers (#29) - Add per-instance HMAC-SHA256 signing key for VNC tunnel tokens (defense-in-depth against tunnel ID brute-force) - Verify HMAC signature before accepting /vnc-tunnel connections with constant-time comparison to prevent timing attacks - Add security headers to /vnc-viewer response: Referrer-Policy: no-referrer (prevents token leaking) X-Frame-Options: DENY (prevents clickjacking) Strict-Transport-Security (enforces HTTPS) Content-Security-Policy (restricts script sources to esm.sh) Cache-Control: no-store (prevents token caching) - Add <meta name="referrer" content="no-referrer"/> to viewer HTML Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zooqueen
added a commit
that referenced
this pull request
Feb 25, 2026
The CSP header added in #29 blocked the inline <script> and <style> tags in the VNC viewer HTML, causing a white screen. Generate a per-request cryptographic nonce and include it in both the CSP header (script-src/style-src) and the HTML tags (nonce="..."). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
zooqueen
added a commit
that referenced
this pull request
Feb 25, 2026
…) (#30) The CSP header added in #29 blocked the inline <script> and <style> tags in the VNC viewer HTML, causing a white screen. Generate a per-request cryptographic nonce and include it in both the CSP header (script-src/style-src) and the HTML tags (nonce="..."). Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
zooqueen
added a commit
that referenced
this pull request
Mar 6, 2026
… security headers (#29) (#29) - Add per-instance HMAC-SHA256 signing key for VNC tunnel tokens (defense-in-depth against tunnel ID brute-force) - Verify HMAC signature before accepting /vnc-tunnel connections with constant-time comparison to prevent timing attacks - Add security headers to /vnc-viewer response: Referrer-Policy: no-referrer (prevents token leaking) X-Frame-Options: DENY (prevents clickjacking) Strict-Transport-Security (enforces HTTPS) Content-Security-Policy (restricts script sources to esm.sh) Cache-Control: no-store (prevents token caching) - Add <meta name="referrer" content="no-referrer"/> to viewer HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/vnc-tunnelendpoint verifies the signature with constant-time comparison before accepting connections. This adds defense-in-depth (UUID randomness + HMAC + 15s expiry + one-time use)./vnc-viewer: Referrer-Policy (prevents gateway token leaking via HTTP Referer), CSP (restricts scripts to esm.sh only, WebSocket to gateway host only), HSTS, X-Frame-Options: DENY, Cache-Control: no-store.Security Model
authorizeCanvasRequestwith timing-safe comparison + rate limitingTest plan
/vnc-viewer?token=...&nodeId=.../vnc-viewerresponse (verify with curl -I)🤖 Generated with Claude Code