Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_build_infisical_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
49 changes: 45 additions & 4 deletions .github/workflows/run-cli-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -16,7 +19,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
Expand Down Expand Up @@ -52,7 +55,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
Expand All @@ -78,6 +81,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)
Comment thread
victorvhs017 marked this conversation as resolved.
Resolved

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
Expand All @@ -87,7 +125,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
Expand All @@ -105,6 +143,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
Expand Down Expand Up @@ -151,7 +192,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.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-cli-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-cli-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-update-instructions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion e2e/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Infisical/infisical-merge

go 1.26.10
go 1.26.11

require (
cloud.google.com/go/iam v1.1.11
Expand Down
8 changes: 8 additions & 0 deletions packages/pam/handlers/rdp/native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<triple>/release`, as the release does, don't need it.

### Cross-compilation

For Linux targets from any host:
Expand Down
2 changes: 1 addition & 1 deletion packages/pam/handlers/rdp/native/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.95.0"
components = ["rustfmt", "clippy"]
components = ["rustfmt", "clippy", "llvm-tools"]
profile = "minimal"
36 changes: 36 additions & 0 deletions packages/pam/handlers/rdp/native/strip-llvm-bitcode.sh
Original file line number Diff line number Diff line change
@@ -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 <cargo release dir>, e.g. strip-llvm-bitcode.sh target/release
set -euo pipefail

dir=${1:?usage: strip-llvm-bitcode.sh <cargo release dir>}
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 \
Comment thread
victorvhs017 marked this conversation as resolved.
Resolved
"$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"
Loading