Skip to content

fix(hypercolor-app): restrict elevated helper resolution to bundled path in release#87

Open
hyperb1iss wants to merge 1 commit into
mainfrom
codex/propose-fix-for-vulnerability-in-helper
Open

fix(hypercolor-app): restrict elevated helper resolution to bundled path in release#87
hyperb1iss wants to merge 1 commit into
mainfrom
codex/propose-fix-for-vulnerability-in-helper

Conversation

@hyperb1iss
Copy link
Copy Markdown
Owner

Motivation

  • The helper resolution previously trusted HYPERCOLOR_HELPER_PATH and dev-style sibling/target-directory probing then launched the resolved executable elevated via PowerShell, allowing a same-user attacker to plant an executable that could be run with UAC consent.

Description

  • Restrict resolve_helper_path so production builds (!debug_assertions) only trust the bundled helper at resource_dir/tools/hypercolor-windows-helper.exe and return None otherwise.
  • Gate dev-only fallbacks (HYPERCOLOR_HELPER_PATH and upward/target-dir probing) to debug builds so just dev workflows continue to work while removing risky release-path elevation.
  • Add a regression unit test resolve_helper_path_prefers_resource_dir_over_env_override that asserts the bundled resource wins over an environment override.
  • Update function doc comments to document the production vs dev behavior.

Testing

  • Added unit test resolve_helper_path_prefers_resource_dir_over_env_override in crates/hypercolor-app (new test file section); the test asserts bundled resource precedence over HELPER_PATH_ENV and was run locally where possible.
  • Attempted a targeted test run: cargo test -p hypercolor-app helper_client::tests::resolve_helper_path_prefers_resource_dir_over_env_override, but the build was blocked in this Linux environment due to a missing system library (glib-2.0) required by glib-sys, so the full test execution could not complete here.

Codex Task

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@hyperb1iss, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 11 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c4b7f06b-0129-42dc-825f-b894754fa698

📥 Commits

Reviewing files that changed from the base of the PR and between 6f749b6 and 6bdff43.

📒 Files selected for processing (1)
  • crates/hypercolor-app/src/helper_client.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/propose-fix-for-vulnerability-in-helper

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant