From 60a69056444815f3a2069bbc5b18a7d1ee436e12 Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos Date: Thu, 12 Nov 2026 10:37:43 -0300 Subject: [PATCH 1/5] chore(deps): update Go version to 1.26.11 and add shellescape dependency - 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. --- .github/workflows/govulncheck.yml | 2 +- .github/workflows/release_build_infisical_cli.yml | 6 +++--- .github/workflows/run-cli-e2e-tests.yml | 8 ++++---- .github/workflows/run-cli-smoke-tests.yml | 2 +- .github/workflows/run-cli-tests.yml | 2 +- .github/workflows/test-update-instructions.yml | 8 ++++---- e2e/go.mod | 2 +- go.mod | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index fb6ea78c9..3e48e1618 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Go uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0 with: - go-version: "1.26.10" + go-version: "1.26.11" cache: true cache-dependency-path: go.sum - name: Install govulncheck diff --git a/.github/workflows/release_build_infisical_cli.yml b/.github/workflows/release_build_infisical_cli.yml index c778d8792..73fb8335a 100644 --- a/.github/workflows/release_build_infisical_cli.yml +++ b/.github/workflows/release_build_infisical_cli.yml @@ -169,7 +169,7 @@ jobs: - run: echo "Ref name ${{github.ref_name}}" - uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1 with: - go-version: "1.26.10" + go-version: "1.26.11" cache: true cache-dependency-path: go.sum - name: Setup for libssl1.0-dev @@ -513,7 +513,7 @@ jobs: - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 with: - go-version: "1.26.10" + go-version: "1.26.11" cache: true cache-dependency-path: go.sum @@ -593,7 +593,7 @@ jobs: - name: Set up Go uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1 with: - go-version: "1.26.10" + go-version: "1.26.11" cache: true cache-dependency-path: go.sum diff --git a/.github/workflows/run-cli-e2e-tests.yml b/.github/workflows/run-cli-e2e-tests.yml index c68778bbb..9377c6173 100644 --- a/.github/workflows/run-cli-e2e-tests.yml +++ b/.github/workflows/run-cli-e2e-tests.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Install dependencies run: go get . - name: Build the CLI @@ -52,7 +52,7 @@ jobs: - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Install dependencies run: go get . - name: Build the CLI @@ -87,7 +87,7 @@ jobs: - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Install dependencies run: go get . - name: Cache cargo registry + target @@ -151,7 +151,7 @@ jobs: - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Build the CLI run: go build -o infisical-cli${{ runner.os == 'Windows' && '.exe' || '' }} # --exit-code 0 so leaks in test fixtures don't fail the job; a failed git scan still exits 1. diff --git a/.github/workflows/run-cli-smoke-tests.yml b/.github/workflows/run-cli-smoke-tests.yml index 58f06df84..a13d5274c 100644 --- a/.github/workflows/run-cli-smoke-tests.yml +++ b/.github/workflows/run-cli-smoke-tests.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Cache cargo registry + target uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 diff --git a/.github/workflows/run-cli-tests.yml b/.github/workflows/run-cli-tests.yml index ff3203bb4..4413252e3 100644 --- a/.github/workflows/run-cli-tests.yml +++ b/.github/workflows/run-cli-tests.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Go uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Install dependencies run: go get . - name: Race-check the Agent Vault packages diff --git a/.github/workflows/test-update-instructions.yml b/.github/workflows/test-update-instructions.yml index 751f258d4..f20cca461 100644 --- a/.github/workflows/test-update-instructions.yml +++ b/.github/workflows/test-update-instructions.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Run unit tests run: go test ./packages/util/ -run TestGetUpdateInstructions -v @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Build test helper run: go build -o update-hint.exe ./test/update-hint @@ -70,7 +70,7 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Build test helper run: go build -o update-hint ./test/update-hint @@ -97,7 +97,7 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4.3.0 with: - go-version: "1.26.10" + go-version: "1.26.11" - name: Build test helper run: go build -o update-hint ./test/update-hint diff --git a/e2e/go.mod b/e2e/go.mod index ef8f7ddf5..a6b363452 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -1,6 +1,6 @@ module github.com/infisical/cli/e2e-tests -go 1.26.10 +go 1.26.11 require ( github.com/Infisical/infisical-merge v0.0.0 diff --git a/go.mod b/go.mod index cce5f4c12..7d8b31948 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,13 @@ module github.com/Infisical/infisical-merge -go 1.26.10 +go 1.26.11 require ( cloud.google.com/go/iam v1.1.11 github.com/Azure/go-ntlmssp v0.1.1 github.com/ClickHouse/ch-go v0.74.0 github.com/Masterminds/sprig/v3 v3.3.0 + github.com/alessio/shellescape v1.4.1 github.com/awnumar/memguard v0.23.0 github.com/aws/aws-sdk-go-v2 v1.27.2 github.com/betterleaks/go-re2 v1.11.0-betterleaks.3 @@ -88,7 +89,6 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/STARRY-S/zip v0.2.3 // indirect - github.com/alessio/shellescape v1.4.1 // indirect github.com/andybalholm/brotli v1.2.8 // indirect github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect github.com/awnumar/memcall v0.4.0 // indirect From c09d531b536d64d78aa193b76cd82449bace601b Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos Date: Thu, 12 Nov 2026 11:07:43 -0300 Subject: [PATCH 2/5] feat(rdp): add script to strip LLVM bitcode and update workflow - 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. --- .github/workflows/run-cli-e2e-tests.yml | 3 ++ packages/pam/handlers/rdp/native/README.md | 8 +++++ .../handlers/rdp/native/rust-toolchain.toml | 2 +- .../handlers/rdp/native/strip-llvm-bitcode.sh | 36 +++++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 packages/pam/handlers/rdp/native/strip-llvm-bitcode.sh diff --git a/.github/workflows/run-cli-e2e-tests.yml b/.github/workflows/run-cli-e2e-tests.yml index 9377c6173..c8d8bc2cb 100644 --- a/.github/workflows/run-cli-e2e-tests.yml +++ b/.github/workflows/run-cli-e2e-tests.yml @@ -105,6 +105,9 @@ jobs: - name: Build Rust RDP bridge working-directory: packages/pam/handlers/rdp/native run: cargo build --release + - name: Strip LLVM bitcode from the RDP bridge + working-directory: packages/pam/handlers/rdp/native + run: ./strip-llvm-bitcode.sh target/release - name: Build the CLI run: CGO_ENABLED=1 go build -tags rdp -o infisical-cli - name: Install RDP test dependencies diff --git a/packages/pam/handlers/rdp/native/README.md b/packages/pam/handlers/rdp/native/README.md index c640ff31c..0363e03d3 100644 --- a/packages/pam/handlers/rdp/native/README.md +++ b/packages/pam/handlers/rdp/native/README.md @@ -27,6 +27,14 @@ cargo build --release The static library is output to `target/release/libinfisical_rdp_bridge.a`. +Then remove the LLVM bitcode Rust embeds in it. Since Go 1.26.11, `go build -tags rdp` refuses to link it from `target/release` otherwise (macOS and Linux): + +```bash +./strip-llvm-bitcode.sh target/release +``` + +Cross builds linked with `CGO_LDFLAGS=-L target//release`, as the release does, don't need it. + ### Cross-compilation For Linux targets from any host: diff --git a/packages/pam/handlers/rdp/native/rust-toolchain.toml b/packages/pam/handlers/rdp/native/rust-toolchain.toml index 3417ee590..45c91bddc 100644 --- a/packages/pam/handlers/rdp/native/rust-toolchain.toml +++ b/packages/pam/handlers/rdp/native/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.95.0" -components = ["rustfmt", "clippy"] +components = ["rustfmt", "clippy", "llvm-tools"] profile = "minimal" diff --git a/packages/pam/handlers/rdp/native/strip-llvm-bitcode.sh b/packages/pam/handlers/rdp/native/strip-llvm-bitcode.sh new file mode 100755 index 000000000..aae1e0319 --- /dev/null +++ b/packages/pam/handlers/rdp/native/strip-llvm-bitcode.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Since Go 1.26.11 (CVE-2026-97038), `go build` refuses to link any library under a -L directory named +# in a #cgo LDFLAGS directive if its objects carry LLVM bitcode sections, and Rust's precompiled +# standard library ships with bitcode embedded. The bridge's directive names target/release, so a +# `cargo build --release` followed by `go build -tags rdp` fails until this runs. The linker never +# reads those sections, so removing them leaves the linked code unchanged. +# +# Release builds don't need it: they pass the per-target directory in CGO_LDFLAGS, which Go doesn't +# scan. Don't use it on a Windows (COFF) archive: Go 1.26.11 rejects the stripped result. +# +# Usage: strip-llvm-bitcode.sh , e.g. strip-llvm-bitcode.sh target/release +set -euo pipefail + +dir=${1:?usage: strip-llvm-bitcode.sh } +host=$(rustc -vV | sed -n 's/^host: //p') +objcopy="$(rustc --print sysroot)/lib/rustlib/$host/bin/llvm-objcopy" +if [ ! -x "$objcopy" ] && [ ! -x "$objcopy.exe" ]; then + echo "llvm-objcopy not found in the Rust toolchain; run: rustup component add llvm-tools" >&2 + exit 1 +fi + +# Go checks every library under the -L directory, including the copy Cargo keeps in deps/. +stripped=0 +for lib in "$dir"/libinfisical_rdp_bridge.a "$dir"/deps/libinfisical_rdp_bridge-*.a; do + [ -f "$lib" ] || continue + "$objcopy" \ + --remove-section=.llvmbc --remove-section=.llvmcmd \ + --remove-section=__LLVM,__bitcode --remove-section=__LLVM,__cmdline \ + "$lib" + stripped=$((stripped + 1)) +done +if [ "$stripped" = 0 ]; then + echo "no libinfisical_rdp_bridge.a in $dir" >&2 + exit 1 +fi +echo "removed LLVM bitcode from $stripped archive(s) in $dir" From e1922f2e9913a47fdf24888e2b6ddf1df831a4e3 Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos Date: Thu, 12 Nov 2026 11:36:44 -0300 Subject: [PATCH 3/5] feat(ci): add macOS job for RDP bridge build in GitHub Actions - 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. --- .github/workflows/run-cli-e2e-tests.yml | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/run-cli-e2e-tests.yml b/.github/workflows/run-cli-e2e-tests.yml index c8d8bc2cb..c19855262 100644 --- a/.github/workflows/run-cli-e2e-tests.yml +++ b/.github/workflows/run-cli-e2e-tests.yml @@ -78,6 +78,41 @@ jobs: INFISICAL_BACKEND_DIR: ${{ github.workspace }}/infisical/backend INFISICAL_CLI_EXECUTABLE: ${{ github.workspace }}/infisical-cli CLI_E2E_DEFAULT_RUN_METHOD: subprocess + # The Linux PAM job can't catch macOS failures: Rust embeds bitcode there as __LLVM,__bitcode + # sections, which strip-llvm-bitcode.sh has to remove before Go 1.26.11 accepts the bridge. + rdp-build-macos: + runs-on: macos-latest + name: RDP Bridge Build (macOS) + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version: "1.26.11" + - name: Cache cargo registry + target + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + packages/pam/handlers/rdp/native/target + key: rdp-bridge-cargo-${{ runner.os }}-${{ hashFiles('packages/pam/handlers/rdp/native/Cargo.lock') }} + restore-keys: rdp-bridge-cargo-${{ runner.os }}- + - name: Install pinned Rust toolchain + working-directory: packages/pam/handlers/rdp/native + run: rustup show active-toolchain + - name: Build Rust RDP bridge + working-directory: packages/pam/handlers/rdp/native + run: cargo build --release + - name: Strip LLVM bitcode from the RDP bridge + working-directory: packages/pam/handlers/rdp/native + run: ./strip-llvm-bitcode.sh target/release + - name: Build the CLI with the RDP bridge + run: CGO_ENABLED=1 go build -tags rdp -o infisical-cli + - name: Run the CLI + run: ./infisical-cli --version + pam-test: runs-on: ubuntu-latest name: PAM End-to-End Testing From 4693852b0dbf61800b7f87805d4c8020900f7c7a Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos Date: Thu, 12 Nov 2026 11:42:45 -0300 Subject: [PATCH 4/5] chore(ci): update GitHub Actions workflow permissions - 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. --- .github/workflows/run-cli-e2e-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-cli-e2e-tests.yml b/.github/workflows/run-cli-e2e-tests.yml index c19855262..b05a2d202 100644 --- a/.github/workflows/run-cli-e2e-tests.yml +++ b/.github/workflows/run-cli-e2e-tests.yml @@ -6,6 +6,9 @@ on: workflow_dispatch: workflow_call: +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest From 787a8aeb70cfc9574d96f298fef0210e3d8be3df Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos Date: Thu, 12 Nov 2026 18:23:46 -0300 Subject: [PATCH 5/5] chore(deps): update shellescape dependency to indirect in go.mod - 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. --- e2e/README.md | 3 ++- go.mod | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/README.md b/e2e/README.md index ff65b2ec7..56ea8b33d 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -214,11 +214,12 @@ go test -v -timeout 5m -count=1 -run TestPAM_Redis/acl-over-ssl github.com/infis The RDP tests have additional prerequisites beyond the other PAM tests because the CLI must be built with the Rust RDP bridge. -1. Build the Rust RDP bridge: +1. Build the Rust RDP bridge, then remove the LLVM bitcode Rust embeds in it. Since Go 1.26.11, `go build -tags rdp` refuses to link the bridge otherwise: ```bash cd packages/pam/handlers/rdp/native cargo build --release + ./strip-llvm-bitcode.sh target/release ``` 2. Build the CLI with the `rdp` build tag (from the repo root): diff --git a/go.mod b/go.mod index 7d8b31948..29e14a03b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/Azure/go-ntlmssp v0.1.1 github.com/ClickHouse/ch-go v0.74.0 github.com/Masterminds/sprig/v3 v3.3.0 - github.com/alessio/shellescape v1.4.1 github.com/awnumar/memguard v0.23.0 github.com/aws/aws-sdk-go-v2 v1.27.2 github.com/betterleaks/go-re2 v1.11.0-betterleaks.3 @@ -89,6 +88,7 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/STARRY-S/zip v0.2.3 // indirect + github.com/alessio/shellescape v1.4.1 // indirect github.com/andybalholm/brotli v1.2.8 // indirect github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect github.com/awnumar/memcall v0.4.0 // indirect