-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Windows RDP sidecar #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Meanski
wants to merge
8
commits into
main
Choose a base branch
from
feat/windows-rdp-sidecar
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
196661b
feat: Windows RDP sidecar (build, bundle, un-gate UI)
Meanski d96e547
fix: address CodeRabbit review on Windows RDP sidecar
Meanski 9c0665a
fix: resolve cjson.lib link error in Windows sidecar build
Meanski 4b42012
ci: upload build artifacts on every run for branch testing
Meanski 04b267d
fix: initialize Winsock in Windows sidecar (DNS_NAME_NOT_FOUND)
Meanski c53a14e
fix: accept self-signed RDP certs (TLS_CONNECT_FAILED)
Meanski dccea53
fix: RDP desktop fills the window instead of staying small
Meanski e2c8e29
feat: RDP mouse + keyboard input injection
Meanski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Windows build for the RDP sidecar. | ||
| # | ||
| # macOS builds the sidecar via the Makefile + build-freerdp-static.sh (a trimmed | ||
| # from-source static FreeRDP). On Windows the easiest self-contained path is | ||
| # vcpkg's static triplet, which ships static FreeRDP 3 plus its transitive deps | ||
| # (OpenSSL, zlib, ...). Configure with the vcpkg toolchain so find_package | ||
| # resolves everything: | ||
| # | ||
| # vcpkg install freerdp:x64-windows-static | ||
| # cmake -S native/rdp-spike -B native/rdp-spike/build \ | ||
| # -DCMAKE_TOOLCHAIN_FILE=<vcpkg>/scripts/buildsystems/vcpkg.cmake \ | ||
| # -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=Release | ||
| # cmake --build native/rdp-spike/build --config Release | ||
| # | ||
| # Produces rdp-sidecar.exe, which electron-builder bundles via win.extraResources. | ||
| cmake_minimum_required(VERSION 3.16) | ||
| project(rdp_sidecar C) | ||
|
|
||
| set(CMAKE_C_STANDARD 11) | ||
|
|
||
| # Link the CRT statically so the .exe doesn't depend on the VC++ redistributable. | ||
| if(MSVC) | ||
| set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
| endif() | ||
|
|
||
| # FreeRDP 3 from vcpkg. The CONFIG packages export imported targets that carry | ||
| # their static transitive dependencies, so we don't enumerate OpenSSL/zlib here. | ||
| find_package(FreeRDP CONFIG REQUIRED) | ||
| find_package(FreeRDP-Client CONFIG REQUIRED) | ||
| find_package(WinPR CONFIG REQUIRED) | ||
|
|
||
| add_executable(rdp-sidecar sidecar.c) | ||
| set_target_properties(rdp-sidecar PROPERTIES OUTPUT_NAME rdp-sidecar) | ||
|
|
||
| target_link_libraries(rdp-sidecar PRIVATE freerdp freerdp-client winpr) | ||
|
|
||
| # FreeRDP's vcpkg config pulls in transitive static deps (e.g. cjson) referenced | ||
| # by bare library name rather than a full path, so make the vcpkg static lib dir | ||
| # searchable for the linker. | ||
| if(DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) | ||
| target_link_directories(rdp-sidecar PRIVATE | ||
| "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib") | ||
| endif() | ||
|
|
||
| if(WIN32) | ||
| # Sockets + crypto/security backends FreeRDP/WinPR pull in on Windows. | ||
| target_link_libraries(rdp-sidecar PRIVATE ws2_32 crypt32 secur32 winmm bcrypt) | ||
| endif() |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Meanski/noxed
Length of output: 815
Pin
actions/cacheand scope cache key to release refs.Line 61 uses
actions/cache@v4(floating tag instead of pinned commit SHA), and the cache key at line 66 is not scoped to a specific ref or release tag. This allows the same cache to be reused across different builds and branches, increasing cache-poisoning exposure in a release workflow.Recommendations:
actions/cache@<commit-sha>(not a floating major version)🧰 Tools
🪛 zizmor (1.25.2)
[error] 61-61: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 61-61: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default
(cache-poisoning)
🤖 Prompt for AI Agents
Source: Linters/SAST tools