Skip to content

fix(rdp): bump Go to 1.26.11 and strip LLVM bitcode from the bridge - #502

Merged
victorvhs017 merged 5 commits into
mainfrom
fix/go-vuln-check
Nov 12, 2026
Merged

victorvhs017 merged 5 commits into
mainfrom
fix/go-vuln-check

Conversation

@victorvhs017

Copy link
Copy Markdown
Contributor

Description 📣

Go 1.26.11 (CVE-2026-97038) refuses to link a library when a #cgo LDFLAGS -L directory contains objects with LLVM bitcode sections. The RDP bridge’s directive points at target/release, and Rust’s precompiled standard library ships with that bitcode embedded, so cargo build --release followed by go build -tags rdp fails on macOS and Linux.

This bumps the toolchain to 1.26.11 in go.mod, e2e/go.mod, and the GitHub workflows, and adds packages/pam/handlers/rdp/native/strip-llvm-bitcode.sh. The script uses the Rust toolchain’s llvm-objcopy (llvm-tools is now in rust-toolchain.toml) to drop .llvmbc, .llvmcmd, __LLVM,__bitcode, and __LLVM,__cmdline from libinfisical_rdp_bridge.a and Cargo’s copy under deps/. The linker does not read those sections, so the linked code is unchanged. The e2e RDP job runs the script after cargo build --release. Cross and release builds that pass the per-target directory through CGO_LDFLAGS are not scanned by Go and do not need it. Do not run it on a Windows COFF archive; Go 1.26.11 rejects the stripped result.

github.com/alessio/shellescape is listed as a direct requirement in go.mod. This branch does not add an import of it.

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

  • New or changed commands follow CLI.md, and new commands and flags are recorded in packages/cmd/testdata/command_surface.json
  • Updated AGENTS.md files (if needed)
  • I have read the contributing guide, agreed and acknowledged the code of conduct. 📝

- Updated Go version in go.mod and various workflow files to 1.26.11.
- Added github.com/alessio/shellescape v1.4.1 as a direct dependency in go.mod.
- Introduced a new script `strip-llvm-bitcode.sh` to remove LLVM bitcode from the RDP bridge library, addressing linking issues with Go 1.26.11.
- Updated the GitHub Actions workflow to include a step for running the new script after building the Rust RDP bridge.
- Modified the README to document the new stripping step and its necessity for successful builds.
- Added `llvm-tools` to the Rust toolchain components for compatibility with the new script.
@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cli-502-fix-rdp-bump-go-to-1-26-11-and-strip-llvm-bitcode-from-the-bri

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@veria-ai

veria-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

Reviews

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] This PR appears safe to merge.

Summary

Updates Go to 1.26.11 and adds LLVM bitcode removal for native RDP builds.

  • RDP builds remove embedded LLVM sections before Go links the bridge.
  • CLI modules and build workflows use Go 1.26.11.
  • The end-to-end workflow gives its jobs read-only repository access.

No new actionable issues were found. Builds were not run.

Reviews (4) · Last reviewed commit: "chore(deps): update shellescape dependen..." · Reviewed by Greptile

- Introduced a new job in the GitHub Actions workflow to build the RDP bridge on macOS.
- Added steps for setting up Go, caching cargo registry and target, installing the Rust toolchain, building the Rust RDP bridge, stripping LLVM bitcode, and running the CLI.
- This enhancement ensures compatibility and successful builds on macOS environments.
Comment thread .github/workflows/run-cli-e2e-tests.yml Resolved
- Added read permissions for contents in the GitHub Actions workflow configuration.
- This change enhances security and ensures the workflow has the necessary access to repository contents during execution.

@lb-vn lb-vn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

e2e/README.md still goes straight from cargo build --release to go build -tags rdp for the rdp tests, so following it fails on mac/linux now. we should add the strip step there too.

Comment thread go.mod Resolved
- Removed direct dependency on github.com/alessio/shellescape v1.4.1 and added it as an indirect dependency.
- Updated e2e/README.md to clarify the steps for building the Rust RDP bridge, including the new requirement to strip LLVM bitcode.
@victorvhs017
victorvhs017 requested a review from lb-vn November 12, 2026 21:53
@victorvhs017
victorvhs017 merged commit 4f3fcf2 into main Nov 12, 2026
35 checks passed
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.

2 participants