feat: Command Line SDK update for version 20.2.0#311
Conversation
|
Closing — promoting to RC release. New PR coming with 20.2.0-rc.1. |
Greptile SummaryThis PR bumps the CLI SDK from 20.1.0 to 20.2.0 and introduces Windows code signing for release binaries via SignPath, adding a multi-step pipeline that uploads unsigned
Confidence Score: 4/5The version bump and cosmetic code changes are safe; the new signing pipeline is well-structured but has a few hardening gaps worth addressing before or shortly after release. The bulk of the change is a straightforward 20.1.0 to 20.2.0 version bump across manifests, lock files, and install scripts. The substantive new logic is the Windows signing pipeline: the action is pinned to a commit hash, set -euo pipefail is used throughout, and the binary-replacement step fails fast if signed files are missing. The main gaps are that osslsigncode verify does not assert the certificate issuer, the Scoop manifest ships without SHA-256 hashes, and --fallback-to-source in the ARM64 build could bundle source code into the shipped executable. .github/workflows/publish.yml (signature verification strength) and scoop/appwrite.config.json (missing hash fields) Important Files Changed
|
| - name: Verify Windows signatures | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| verify_signature() { | ||
| local file="$1" | ||
| local output | ||
|
|
||
| output="$(osslsigncode verify -in "$file" 2>&1)" | ||
| echo "$output" | ||
|
|
||
| if ! grep -Fq "Succeeded" <<< "$output"; then | ||
| echo "$file signature verification failed" | ||
| exit 1 | ||
| fi | ||
| } | ||
|
|
||
| verify_signature build/appwrite-cli-win-x64.exe | ||
| verify_signature build/appwrite-cli-win-arm64.exe |
There was a problem hiding this comment.
Signature verification only checks presence, not certificate identity
osslsigncode verify with no certificate pinning flags checks that the file contains a structurally valid Authenticode signature, but it does not validate who signed it. If the SignPath service ever returns a binary signed by an unexpected or incorrect certificate (misconfiguration, wrong policy slot, etc.), this step would still print "Succeeded" and the pipeline would continue. Consider adding -CAfile, -CRLfile, or at minimum -untrusted flags pointing to Appwrite's code-signing root CA to enforce that the binary was signed by the expected authority.
| "mac-arm64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64", | ||
| "windows-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe", | ||
| "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --external:terminal-image --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe" | ||
| "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --external:terminal-image --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs --fallback-to-source -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe" |
There was a problem hiding this comment.
--fallback-to-source may bundle raw source files into the ARM64 binary
The pkg --fallback-to-source flag tells pkg to include the original JavaScript source for any native module that does not have a pre-compiled binary for the target platform. Depending on which modules are involved, this could embed unobfuscated source inside the shipped .exe. It may also increase binary size noticeably. It is worth confirming this flag is strictly necessary and, if so, auditing which modules fall back and whether including their source is acceptable.
This PR contains updates to the SDK for version 20.2.0.
What's Changed
appwrite-cli-win-x64.exeandappwrite-cli-win-arm64.exe) via SignPathNotes
appwrite/specs:main/specs/1.9.x/swagger2-1.9.x-console.json(info.version1.9.3), matching whatappwrite/sdk-generatorCI fetches. No API surface change vs20.1.0.