Skip to content

fix(security): floor guava at 33.7.2 for the build toolchain - #104

Merged
mattinannt merged 2 commits into
mainfrom
fix/dependabot-guava-floor
Nov 24, 2026
Merged

mattinannt merged 2 commits into
mainfrom
fix/dependabot-guava-floor

Conversation

@xernobyl

@xernobyl xernobyl commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Floors com.google.guava:guava at 33.7.2-jre, the first patched version for GHSA-xxph-c9ww-hj94 (alert #61, high).

Applied in both places the AGP toolchain resolves guava, mirroring what Bouncy Castle already needs:

  • root buildscript constraints — AGP's own plugin classpath, where com.android.tools:sdk-common brings guava in.
  • the root subprojects floor block — every module's lint configuration, via com.android.tools.lint.

Deliberately a per-module floor rather than a group-wide one: com.google.guava also holds failureaccess and listenablefuture, which a group floor would try to drag to 33.7.2.

Why 33.7.2 and not latest

The advisory covers >= 4.0, <= 33.7.1; 33.7.2-jre is the first patched release. The floors only ever raise, so an AGP bump that ships something newer still wins. (Latest on Maven Central is 33.8.0-jre if we want to go further.)

Verified graph delta vs main

From the Dependency Submission run on this branch, compared with the one on main (cc49c20):

- com.google.guava:guava:33.4.0-jre        + com.google.guava:guava:33.7.2-jre
- com.google.guava:failureaccess:1.0.2     + com.google.guava:failureaccess:1.0.3
- com.google.errorprone:…:2.36.0           + com.google.errorprone:…:2.50.0
- com.google.j2objc:j2objc-annotations:3.0.0  + com.google.j2objc:j2objc-annotations:3.1
- org.checkerframework:checker-qual:3.43.0 + org.checkerframework:checker-qual:2.5.8
                                           + org.jspecify:jspecify:1.0.1

failureaccess, error_prone_annotations and j2objc-annotations are guava's own declared dependencies and move with it.

Two changes are worth naming:

  • checker-qual moves 3.43.0 → 2.5.8. Guava 33.7 no longer depends on it (it moved to jspecify), so the 3.43.0 that previously won by conflict resolution is gone and org.tensorflow:tensorflow-lite-metadata:0.2.0 (AGP's UTP) now resolves the 2.5.8 it actually asks for. checker-qual is a compile-time qualifier-annotation library; the version that surfaces is the one tensorflow-lite-metadata was built against. lint and build in CI exercise this toolchain.
  • jspecify 1.0.1 is new, declared by guava 33.7.2 in place of JSR-305/checker-qual.

Risk

Build toolchain only — guava is not a declared SDK dependency, so the published AAR and POM are untouched, as is the playground app's runtime graph. Guava stays within the 33.x line with its usual binary-compatibility guarantee.

Verification

  • Dependency Submission on this branch: single 33.7.2-jre, no other guava version anywhere in the graph. ✔
  • CI on this PR: lint (:android:lint + :playground:lint), build, format, api-check, package-check, unit tests and the Espresso golden journey.

Remaining after this

ch.qos.logback:logback-core 1.3.16 (alerts #62–#64, low), pulled by ktlint-cli 1.8.0. Fixing it means a 1.3 → 1.5 jump against ktlint, so it gets its own change.

GHSA-xxph-c9ww-hj94 covers guava <= 33.7.1 (uncontrolled memory allocation
in CompactHashMap/CompactHashSet/MapMakerInternalMap deserialization).
AGP 9.4.1 resolves 33.4.0-jre through com.android.tools:sdk-common on both
the root buildscript classpath and each module's lint configuration, so it
needs a floor in both places - the same split as Bouncy Castle.

Per-module rather than group-wide: com.google.guava also holds
failureaccess and listenablefuture, which must not be raised to 33.7.2.

Refs formbricks/android dependabot alert #61
Review findings, all in comments:
- failureaccess is 1.0.3 and listenablefuture resolves at 1.0 and
  9999.0-empty, so "pinned at 1.0" was wrong. State the real reason a
  group floor breaks: it would ask Central for failureaccess 1.0.3 and
  androidx's listenablefuture 1.0 at 33.7.2-jre, which do not exist.
- The lint tool is not on the buildscript classpath; guava arrives there
  from sdk-common and bundletool. Lint is the project-configuration path.
- Add guava to the top-of-file inventory, which tracks what AGP drags in.
@sonarqubecloud

Copy link
Copy Markdown

@xernobyl
xernobyl marked this pull request as ready for review November 24, 2026 14:34
@xernobyl
xernobyl requested a review from mattinannt November 24, 2026 14:34
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 819aec8f-5892-403f-bdff-dfe1e95e46c3
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mattinannt
mattinannt added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 4c0a252 Nov 24, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants