Skip to content

Revert "feat: add optional VNC password authentication" - #1142

Closed
r33drichards wants to merge 1 commit into
mainfrom
revert-1072-feat/vnc-password-auth
Closed

Revert "feat: add optional VNC password authentication"#1142
r33drichards wants to merge 1 commit into
mainfrom
revert-1072-feat/vnc-password-auth

Conversation

@r33drichards

@r33drichards r33drichards commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

Reverts #1072

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced message filtering logic in API operations for improved consistency
    • Updated analytics to accurately reflect processed message counts
  • Chores

    • Streamlined VNC server startup process and configuration handling

@vercel

vercel Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 5, 2026 3:52pm

Request Review

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

📦 Publishable packages changed

  • docker/xfce

Add release:<service> labels to auto-release on merge (+ optional bump:minor or bump:major, default is patch).
Or add no-release to skip.

@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Two files are modified: one adds message filtering to the CopilotKit API route handler for more efficient processing, and the other disables VNC authentication in the XFCE startup script by enforcing no-security mode.

Changes

Cohort / File(s) Summary
Message Filtering in CopilotKit
docs/src/app/api/copilotkit/route.ts
Introduces filterEmptyMessages to filter the messages list, updating latestUserMessage, userPrompt, and analytics message_count to operate on the filtered set instead of the original input messages.
VNC Security Simplification
libs/xfce/src/scripts/start-vnc.sh
Removes conditional VNC password authentication logic and hardcodes -SecurityTypes None with an insecure acknowledgment flag; eliminates dynamic SECURITY_ARGS composition and VNC_PW credential handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

release:docker/xfce

Suggested reviewers

  • ddupont808

Poem

🐰 A rabbit hops through filtered streams,
Empty messages vanish like dreams,
While VNC gates swing open wide,
No passwords hiding inside—
Clean and simple, as code should be! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly indicates this is a revert of a previous feature (VNC password authentication), which aligns with the changes shown in the raw summary that remove password-related VNC setup logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-1072-feat/vnc-password-auth

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libs/xfce/src/scripts/start-vnc.sh`:
- Around line 7-20: The start-vnc.sh currently forces unauthenticated,
network-exposed VNC by using -localhost no and -SecurityTypes None and ignores
caller-provided VNC_PW; change it to honor caller credentials and secure
defaults: remove or avoid unconditionally applying -localhost no and
-SecurityTypes None in start-vnc.sh, check for an environment VNC_PW (or a
provided password file) and if present set SecurityTypes to VncAuth and ensure
the VNC password is written/loaded accordingly, otherwise restrict access (e.g.,
keep -localhost yes or bind to localhost only) and/or require explicit opt-in
via a clear env flag (e.g., INSECURE_VNC=true) before enabling insecure options;
update use of ${VNC_PORT:-5901}, ${VNC_RESOLUTION:-...}, and
${VNC_COL_DEPTH:-...} to remain unchanged but ensure authentication logic
precedes vncserver invocation so credentials are not silently bypassed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08e8c39d-bc74-43f8-b84b-b47868af63f6

📥 Commits

Reviewing files that changed from the base of the PR and between 023251d and f4d68ff.

📒 Files selected for processing (2)
  • docs/src/app/api/copilotkit/route.ts
  • libs/xfce/src/scripts/start-vnc.sh

Comment on lines +7 to +20
# Start VNC server without password authentication
vncserver :1 \
-geometry ${VNC_RESOLUTION:-1920x1080} \
-depth ${VNC_COL_DEPTH:-24} \
-rfbport ${VNC_PORT:-5901} \
-localhost no \
$SECURITY_ARGS \
-SecurityTypes None \
-AlwaysShared \
-AcceptPointerEvents \
-AcceptKeyEvents \
-AcceptCutText \
-SendCutText \
-xstartup /usr/local/bin/xstartup.sh
-xstartup /usr/local/bin/xstartup.sh \
--I-KNOW-THIS-IS-INSECURE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Reintroduces unauthenticated remote VNC access and bypasses caller-provided credentials.

With -localhost no + -SecurityTypes None, this starts a network-exposed VNC server without auth. It also ignores VNC_PW values still set by callers (for example libs/python/computer/computer/providers/docker/provider.py:374-379), so expected auth is silently disabled.

Proposed fix
-# Start VNC server without password authentication
-vncserver :1 \
+SECURITY_ARGS=(-SecurityTypes None --I-KNOW-THIS-IS-INSECURE)
+if [[ -n "${VNC_PW:-}" ]]; then
+    mkdir -p "$HOME/.vnc"
+    echo "$VNC_PW" | vncpasswd -f > "$HOME/.vnc/passwd"
+    chmod 600 "$HOME/.vnc/passwd"
+    unset VNC_PW
+    SECURITY_ARGS=(-SecurityTypes VncAuth)
+fi
+
+vncserver :1 \
     -geometry ${VNC_RESOLUTION:-1920x1080} \
     -depth ${VNC_COL_DEPTH:-24} \
     -rfbport ${VNC_PORT:-5901} \
     -localhost no \
-    -SecurityTypes None \
+    "${SECURITY_ARGS[@]}" \
     -AlwaysShared \
     -AcceptPointerEvents \
     -AcceptKeyEvents \
     -AcceptCutText \
     -SendCutText \
-    -xstartup /usr/local/bin/xstartup.sh \
-    --I-KNOW-THIS-IS-INSECURE
+    -xstartup /usr/local/bin/xstartup.sh
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libs/xfce/src/scripts/start-vnc.sh` around lines 7 - 20, The start-vnc.sh
currently forces unauthenticated, network-exposed VNC by using -localhost no and
-SecurityTypes None and ignores caller-provided VNC_PW; change it to honor
caller credentials and secure defaults: remove or avoid unconditionally applying
-localhost no and -SecurityTypes None in start-vnc.sh, check for an environment
VNC_PW (or a provided password file) and if present set SecurityTypes to VncAuth
and ensure the VNC password is written/loaded accordingly, otherwise restrict
access (e.g., keep -localhost yes or bind to localhost only) and/or require
explicit opt-in via a clear env flag (e.g., INSECURE_VNC=true) before enabling
insecure options; update use of ${VNC_PORT:-5901}, ${VNC_RESOLUTION:-...}, and
${VNC_COL_DEPTH:-...} to remain unchanged but ensure authentication logic
precedes vncserver invocation so credentials are not silently bypassed.

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