🔨 Verify Gradle wrapper and dependency checksums

Merged
MI
1mo ago
+3363-0

Summary

The Android build (CI and release.yml, which ships the APK) downloaded Gradle and every Maven/Google dependency trusting TLS alone. CVE-2026-91403 (distrusted eMudhra intermediates in the JDK trust store) is exactly the kind of flaw that breaks that. This pins everything by sha256 so a forged certificate can no longer swap code into the APK, regardless of the JDK patch level.

Changes

  • gradle/wrapper/gradle-wrapper.properties: distributionSha256Sum for Gradle 9.5.0.
  • gradle/verification-metadata.xml: sha256 for all 454 components resolved by assembleDebug testDebugUnitTest lintDebug, generated in CI (the sandbox can't reach Google/Gradle hosts).
  • .github/workflows/gradle-verification.yml: manual workflow_dispatch job to regenerate the metadata after a dependency bump. Dependabot Gradle PRs will now fail CI until someone runs it on the bump's branch and commits the result.
  • CLAUDE.md: one line on the above.

Testing

  • Build passes (./gradlew assembleDebug)
  • Unit tests pass (./gradlew testDebugUnitTest)
  • Lint passes (./gradlew lintDebug)

(All three run in the Android CI check on this PR, now with verification enforced.)

Related Issues

None.


Generated by Claude Code


Summary by cubic

Pins the Gradle wrapper distribution and all 454 resolved dependencies by sha256 so a forged TLS certificate can no longer swap code into the APK (e.g. CVE-2026-91403). Verification is enforced in every CI build; dependency bumps (including Dependabot's) will fail until the metadata is regenerated.

Migration

Run the new "Regenerate Gradle verification metadata" workflow (workflow_dispatch) on the bump's branch and commit the resulting gradle/verification-metadata.xml. Wrapper upgrades also require updating distributionSha256Sum in gradle/wrapper/gradle-wrapper.properties.