AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 27 Monero

Harden E2E workflows with Ultra Redroid/iOS runners, sharding, health checks, and PGP traces (#3919)

Public commit record

What the developer wrote

Authored by Seth For Privacy

91/100 · Strong
Harden E2E workflows with Ultra Redroid/iOS runners, sharding, health checks, and PGP traces (#3919)

* Harden E2E workflows with router health check, 3-way sharding, and nightly pause

- Add a pre-flight GET https://llm.cakewallet.com/v1/models health check
(authenticating via env GLM_API_KEY and asserting HTTP 200 with a non-empty
data array) as the first step of e2e/refresh jobs in e2e_android.yml,
e2e_ios.yml, and e2e_cache_nightly.yml so router outages fail fast before
emulator/simulator startup. Guard redact and trace-encryption steps when
cake-qa/.e2e is absent so early aborts stay clean while keeping fail-closed
redaction whenever .e2e exists.
- Shard e2e_android.yml 3 ways by default (1/3, 2/3, 3/3) with fail-fast:
false, respecting explicit inputs.shard overrides (and falling back to 1/1
when inputs.grep is set without inputs.shard). Upload per-shard artifacts
and move PR comment posting into a single report job (needs: [resolve, e2e])
that combines shard counts/summaries without races or unclosed <details>
tags.
- Pause the cron schedule in e2e_cache_nightly.yml (keeping workflow_dispatch)
until replay-cache keying and passphrase redaction fixes land.
- Pass E2E_SECRET_WALLET_PASSPHRASE via env in all three workflows and remove
all ${{ }} interpolations from shell run/script blocks.

* Wire M5 Studio Ultra QA runners, parallel iOS sharding, and PGP trace encryption

- e2e_android.yml: default e2e to [self-hosted, Linux, ARM64, cake-ultra-android-qa]
with 4-way sharding (1/4..4/4), arm64 APK resolution on ubuntu-latest resolve,
and Redroid (/usr/local/bin/start-redroid.sh 1 + CW_DEVICE/CW_ANDROID_SESSION);
keep ubuntu-latest (x86_64 APK + KVM + 3-way sharding) as workflow_dispatch
fallback; switch trace encryption to vars.QA_ARTIFACT_PGP_KEYS (.tgz.gpg).
- e2e_cache_nightly.yml: default refresh to cake-ultra-android-qa (Redroid +
arm64 APK) with ubuntu-latest fallback, keep schedule paused, switch trace
encryption to vars.QA_ARTIFACT_PGP_KEYS (.tgz.gpg).
- e2e_ios.yml: target [self-hosted, macOS, ARM64, cake-m5-ultra] for build and
[self-hosted, macOS, ARM64, cake-ios-qa] for e2e; add intra-VM 3-way parallel
iOS simulator sharding (pre-booted qa-e2e-1..3, per-shard UDID, CW_IOS_DEVICE,
CW_IOS_SESSION, --output .e2e-shard-i, 5s stagger, shared glm-proxy, always()
simulator cleanup, merged summary.md/junit.xml/shards); switch trace
encryption to vars.QA_ARTIFACT_PGP_KEYS (.tgz.gpg).

* Include hidden .e2e results in artifact uploads and restrict arm64 APK selection

- Set include-hidden-files: true on actions/upload-artifact@v4 result uploads in e2e_android.yml and e2e_ios.yml so cake-qa/.e2e/{junit.xml,summary.md} are never skipped for the Android report job or iOS results artifact.
- Stop matching legacy 'android apk' (x86_64 bundle) in arm64 artifact selection in e2e_android.yml and exclude *x86_64* / *armeabi-v7a* filenames in arm64 APK lookup across e2e_android.yml and e2e_cache_nightly.yml.

* Include .e2e/results in encrypted trace archives for e2e 0.26 layout

Include results alongside report.json and artifacts in e2e_android.yml, e2e_ios.yml (both shard merge and trace encryption), and e2e_cache_nightly.yml (staged under RUNNER_TEMP/results and redacted before encryption) so e2e 0.26 trace.md and failure screenshots are captured alongside legacy artifacts.

* Address E2E workflow review: encrypt junit.xml, tighten timeouts, permissions, and PR comment

- Move junit.xml out of public result uploads (summary.md only) and into the PGP-encrypted trace archives in e2e_android.yml, e2e_ios.yml (including per-shard merge), and e2e_cache_nightly.yml.
- Align job timeout-minutes below Ultra VM caps: 110m for Linux QA jobs (e2e_android.yml e2e, e2e_cache_nightly.yml refresh) and 230m for e2e_ios.yml e2e.
- Restrict top-level e2e_android.yml permissions to contents: read, scoping actions: write to resolve and pull-requests: write + actions: read to report so self-hosted e2e shards run read-only.
- Include the tested head SHA in the e2e_android.yml report comment headline and use github.paginate when listing PR comments.

* Uninstall leftover test packages before installing APK on Redroid

Branch test APKs use branch-scoped package IDs (com.cakewallet.test_*),
so a reused Redroid slot could still hold an older test package that
pm list packages | grep -m1 picks ahead of the newly installed APK.

Uninstall any pre-existing com.cakewallet.test_* packages (with
stdin redirected from /dev/null so adb does not consume the loop
stream) before adb install -r in both e2e_android.yml and
e2e_cache_nightly.yml, and anchor the post-install package lookup to
^com\.cakewallet\.test_.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit updates Cake Wallet's automated end-to-end (E2E) testing GitHub workflows. It changes which test runners are used, adds sharding (running tests in parallel pieces), adds a health check for an internal AI router, switches encrypted test logs from password-based AES encryption to PGP encryption, and tightens workflow permissions. Most changes are operational hardening, but a few security-relevant details appear: secrets are now passed through environment variables instead of being interpolated into shell scripts, PGP keys are read from repository variables rather than secrets, and workflow permissions are reduced. There is no direct evidence in the diff that these changes fix an active vulnerability; they look like preventive hardening of CI/CD infrastructure.

Recommended action

Treat as a routine CI/CD hardening update. Reviewers should verify that vars.QA_ARTIFACT_PGP_KEYS is populated with only intended recipient public keys, that the self-hosted runner labels are correctly secured, and that the new health-check endpoint and API key handling do not leak secrets in logs. No immediate application-level security response is indicated by the diff alone.

Security signals we found

01

Secrets removed from shell script interpolation and passed via env (reduces secret exposure in process listings and shell logs)

02

Trace encryption switched from symmetric AES passphrase (secret) to asymmetric PGP keys (variable)

03

Workflow permissions narrowed: top-level contents: read only; actions: write limited to resolve job; pull-requests: write limited to report job

04

junit.xml moved from public artifact uploads into encrypted trace archives

05

include-hidden-files: true added to artifact uploads so test output directories are not silently skipped

06

Branch-scoped test packages uninstalled before APK install to prevent stale package collisions

07

Health check added to fail fast on LLM router outage before starting emulator/simulator

Risk score

Why this scored 27/100

Our methodology →
Potential impact 4/30
Exploitability 3/25
Stealth signal 5/15
Affected reach 6/15
Confidence 6/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.