fix(hypercolor-app): restrict elevated helper resolution to bundled path in release#87
fix(hypercolor-app): restrict elevated helper resolution to bundled path in release#87hyperb1iss wants to merge 1 commit into
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Motivation
HYPERCOLOR_HELPER_PATHand 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
resolve_helper_pathso production builds (!debug_assertions) only trust the bundled helper atresource_dir/tools/hypercolor-windows-helper.exeand returnNoneotherwise.HYPERCOLOR_HELPER_PATHand upward/target-dir probing) to debug builds sojust devworkflows continue to work while removing risky release-path elevation.resolve_helper_path_prefers_resource_dir_over_env_overridethat asserts the bundled resource wins over an environment override.Testing
resolve_helper_path_prefers_resource_dir_over_env_overrideincrates/hypercolor-app(new test file section); the test asserts bundled resource precedence overHELPER_PATH_ENVand was run locally where possible.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 byglib-sys, so the full test execution could not complete here.Codex Task