ci: fetch the SSM plugin before every build; check it ships

Both build workflows fetch the pinned plugin before tauri build on Linux,
macOS (universal: both slices plus the lipo'd file) and Windows. The test
job needs no fetch: debug builds get build.rs's placeholder.

finalize-appimage.sh asserts usr/bin/session-manager-plugin is a running
ELF and THIRD_PARTY_NOTICES is in the image.

Windows: the plugin ships under AWS's Authenticode signature and is not
re-signed (Tauri skips a sidecar signtool verify accepts).
windows-sign.ps1 refuses it if it is ever presented rather than letting the
allowlist skip it unsigned; windows-verify-signatures.ps1 requires it in
the MSI, valid, timestamped and signed by Amazon Web Services, Inc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Opus 5.5 committed 2026-11-17 06:44:30 -08:00
1 parent 39f502dcdf
commit cb28d1da39
5 files changed
+120 -2

No files matched your search

+16
View File
@@ -317,6 +317,22 @@ if [ "$pw_removed" = true ]; then
fi
[ -x "$out/usr/bin/triple-c" ] || fail "no executable usr/bin/triple-c."
# The bundled AWS Session Manager plugin (bundle.externalBin, fetched by
# fetch-ssm-plugin.sh) is what AWS workspaces connect through. Tauri copies it
# beside the app binary with the target triple stripped, which is where
# `host::ssm::find_plugin` looks. It must be the real plugin: an ELF, not the
# placeholder a debug build writes (build.rs refuses that for release, and this
# is the check on what actually shipped).
plugin="$out/usr/bin/session-manager-plugin"
[ -x "$plugin" ] || fail "no executable usr/bin/session-manager-plugin (the bundled AWS plugin)."
[ "$(head -c 4 "$plugin" | od -An -c | tr -d ' ')" = "177ELF" ] \
|| fail "usr/bin/session-manager-plugin is not an ELF binary (a placeholder?)."
"$plugin" --version >/dev/null 2>&1 \
|| fail "usr/bin/session-manager-plugin does not run (--version)."
# Its license and notices travel with it (bundle.resources).
notices=("$out"/usr/lib/*/THIRD_PARTY_NOTICES)
[ -f "${notices[0]}" ] || fail "THIRD_PARTY_NOTICES is not in the image."
# Every file readable by all, every program executable by all — what the
# `chmod -R a+rX` before the repack promised (AppRun.wrapped used to ship 0770).
# Files only: the AppImage runtime's --appimage-extract creates every