Tags: WASDDestroy/ABK
Tags
fix(cli): harden builds and artifact verification (xingguangcuican666… …6#139) * fix(cli): repair broken sync and API compatibility - Extract sync_fork() from rerun() method body - Fix sync_fork() to use POST instead of PUT - Update GitHub API headers to vnd.github+json with Api-Version - Fix check_behind() to use upstream default_branch dynamically - Remove silent exception swallowing in _detect_user() - Remove duplicate GitHubClient instantiation in cmd_status * fix(cli): sync_fork should target user's fork, not upstream - Use self.fork_repo if available for correct owner/repo - Fall back to self.username/SOURCE_REPO_NAME - Add explicit error when username is not detected * refactor(cli): extract get_token, add timeouts, clean up dead code - Extract get_token(args) to eliminate duplication across commands - Add urlopen timeout (30s API, 60s artifact download) - Remove unreachable 302 handling in download_artifact - Relax input prompts to accept 'y' or 'yes' - Avoid duplicate error message in cmd_login * Update ru-ru.json i18n: add OnePlus/Oplus and _desc keys Align ru-ru.json with upstream PR xingguangcuican6666#111: - Update list_oneplus_item text (OnePlus -> OnePlus/Oplus) - Add matrix_item_desc, oneplus_item_desc, custom_default_desc Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add missing _desc i18n keys for ja-jp, ko-kr, hi-in Align CLI i18n files with upstream PR xingguangcuican6666#111 by adding the three _desc description keys that were missing from these translations. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add missing _desc i18n keys for de-de, fr-fr, es-es, pt-br, eo Align CLI i18n files with upstream PR xingguangcuican6666#111 by adding the three _desc description keys that were missing from these translations. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add artifact bundle verification and custom download directory Implement signed bundle verification (RSA SHA256withRSA) for downloaded artifacts, mirroring the upstream Android app's ArtifactVerification.verifyBundleFile(). - Add verify_artifact_bundle() to check ABK_BUNDLE_MANIFEST.json + .sig inside .bundle.zip - Add get_signing_key() to read signing key from config or ABK_SIGNING_KEY env - Integrate automatic verification into abk artifacts --download flow - Add --set-download-dir to save persistent default download directory to config - Fall back to config download_dir or ~/Downloads when --output not specified Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verification and download-dir i18n keys for zh-cn, en-us Add artifact_verifying, artifact_verified_ok, artifact_legacy_warning, artifact_unverified_warning, artifact_verify_skip, artifact_verify_no_key, arg_set_download_dir, and download_dir_saved keys. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verification and download-dir i18n keys for ru-ru, ja-jp, ko-kr, hi-in Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verification and download-dir i18n keys for de-de, fr-fr, es-es, pt-br Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verification and download-dir i18n keys for eo, zh-neko, jp-neko, zh-zako Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add high-risk confirmation prompt on bundle verification failure When artifact verification fails (legacy/unverified/no_key), prompt the user with (y/n) before continuing. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verify-confirm i18n keys for zh-cn, en-us Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verify-confirm i18n keys for ru-ru, ja-jp, ko-kr, hi-in Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verify-confirm i18n keys for de-de, fr-fr, es-es, pt-br Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add verify-confirm i18n keys for eo, zh-neko, jp-neko, zh-zako Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Strengthen tamper warning in verify-confirm i18n for zh-cn, en-us Update artifact_unverified_warning and artifact_verify_confirm to explicitly warn about potential file tampering during download due to network hijacking risk. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Strengthen tamper warning in verify-confirm i18n for 8 languages Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Strengthen tamper warning in verify-confirm i18n for eo, zh-neko, jp-neko, zh-zako Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix: standardize confirm prompt to (y/n) and accept multi-language affirmatives 5 i18n files had (j/n), (o/n), (s/n) mismatched with code logic. Now all consistently show (y/n), and the code accepts y/yes/j/ja/o/oui/s/si/sí. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix CLI build: install cryptography and add pyinstaller --hidden-import flags The new bundle verification code (verify_artifact_bundle) depends on the cryptography library. PyInstaller needs cryptography installed in the build env and explicit --hidden-import flags to bundle its C extensions correctly. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix PyInstaller SSL certificate issue: bundle certifi PyInstaller-built binary cant find system CA certs, causing SSL_CERTIFICATE_VERIFY_FAILED. Added certifi fallback at startup and updated workflow to bundle it. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Make cryptography optional for platforms without pre-built wheels cryptography 48.x requires Rust compilation on platforms without wheels (windows-x86, windows-arm64, linux-x86). Making it optional: if import fails, bundle verification gracefully returns no_key status. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Restore mandatory cryptography: add Rust to build environments Revert the optional-import approach. Instead, install Rust toolchain on platforms where cryptography has no pre-built wheels: - Windows: rustup before pip install - Docker containers (linux-armhf, linux-x86): apt-get install -y cargo - macOS/linux-64bit: pre-built wheel exists, no change Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Auto-generate signing keypair on fork/sync and upload to GitHub During abk fork and abk sync, the CLI now: - Generates RSA-2048 keypair if no signing_key in config - Uploads public key as ABK_ARTIFACT_SIGNING_PUBLIC_KEY Action secret - Saves public key to ~/.config/abk/config.json for bundle verification Uses pynacl (libsodium) to encrypt the secret for GitHub's API. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix Windows ARM/x86 build: install OpenSSL for cryptography's openssl-sys cryptography 49.x uses openssl-sys Rust crate which needs OpenSSL headers/libs to compile. - Windows: vcpkg install openssl --triplet arm64-windows|x86-windows - Docker containers: apt-get install libssl-dev pkg-config - macOS/linux-64bit: pre-built wheel, no change Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add signing_key i18n keys to remaining 12 languages Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix Docker build: use rustup instead of apt cargo (too old for cryptography) Debian Bookworm's apt cargo doesn't support Cargo lock file v4 used by cryptography 49.x. Switch to rustup for latest Rust toolchain. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Add pip/cargo caching to speed up cryptography first-party build Add actions/cache@v5 for pip cache and cargo registry on all platforms. First build still compiles from source, but subsequent runs reuse cached cargo crates and pip wheels. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix Windows OpenSSL linking: set OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR cryptography's openssl-sys Rust crate needs explicit lib/include dirs. Add bin to PATH for runtime DLL access. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Fix Windows OpenSSL: bootstrap vcpkg if missing, set VCPKG_ROOT for openssl-sys openssl-sys Rust crate auto-detects vcpkg installations. Properly setting VCPKG_ROOT tells the build script where to find OpenSSL libs without manual path hacks. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Replace vcpkg+Rust with pycryptodome for crypto backend cryptography 49.x on Windows x86/ARM64 needs Rust+OpenSSL to compile (no wheel), making builds slow and fragile. Switch to dual backend: - cryptography (fastest) used where wheels exist (linux-x64, linux-arm64, macos, windows-x64) - pycryptodome (has wheels for ALL platforms) used as fallback on windows-x86/ARM64 + Docker containers - Both support RSA SHA256withRSA verify + RSA-2048 keygen Eliminates: vcpkg bootstrap, OpenSSL compilation, 5+ minute build overhead on problematic platforms. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Make cryptography optional everywhere: pycryptodome is the reliable fallback cryptography only has pre-built wheels for x64/arm64 linux/macos and amd64 windows. On all other platforms (linux-x86 QEMU, linux-armhf QEMU, windows-x86, windows-arm64), it compiles from source which is slow and fragile. pycryptodome has wheels for ALL platforms and supports the exact same RSA operations we need. cryptography is still preferred when available (faster), but no longer required. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Remove rustup from Docker containers: pycryptodome has wheels, cryptography is optional linux-armhf (QEMU armv7) and linux-x86 (QEMU i686) don't need Rust anymore. pycryptodome provides pre-built wheels for these platforms. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * Consolidate pynacl back into main pip install line pynacl stays on all platforms in the primary pip install, alongside pycryptodome. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(cli): harden builds and artifact verification * fix(cli): address review feedback * ci(cli): speed up 32-bit packaging --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
fix(build): avoid invalid CONFIG_KPM fragments
bump: Update list of Contributors (xingguangcuican6666#90) * Update list * Update build.gradle.kts * Update build.gradle.kts * Add a publish workflow
PreviousNext