bumblebee icon indicating copy to clipboard operation
bumblebee copied to clipboard

Support Maven/Gradle (Java/Kotlin) package inventory

Open pranav-gupta12 opened this issue 1 week ago • 0 comments

Version: main @ 93b8877

What's missing Bumblebee doesn't inventory Java/Kotlin dependencies, so --exposure-catalog can never match a Maven package. docs/inventory-sources.md already lists "Maven / Gradle (pom.xml, lockfiles)" under "Not currently covered". Three pieces would be needed:

  • There is no Maven scanner under internal/ecosystem/ and no maven value in internal/model/model.go.
  • internal/walk/walk.go skips .m2, .gradle, .ivy2 and .sbt, so the local caches that hold what was actually downloaded are never visited.
  • tools/osvcatalog drops OSV's Maven ecosystem (ecosystemMap in internal/osv/osv.go). The catalog loader would accept a maven entry, but nothing would ever match it.

Why it matters Many developer laptops build JVM services with Gradle or Maven, and right now those machines get no signal for that whole dependency tree. The malicious-package feeds are small for Maven today: ossf/malicious-packages has two records, MAL-2025-2552 (io.github.leetcrunch:scribejava-core) and MAL-2025-191470 (org.mvnpm:[email protected]). The second is an mvnpm repack of an npm package from the Shai-Hulud 2 wave. So npm worms can already reach Maven coordinates through mvnpm, and the feed will grow.

Suggestion The caches are the cheapest source with resolved versions, and reading them needs nothing beyond listing directories:

  • ~/.m2/repository/<group path>/<artifact>/<version>/ (the group is split on /)
  • ~/.gradle/caches/modules-2/files-2.1/<group>/<artifact>/<version>/ (the group is kept dotted)

Each version directory becomes one record: ecosystem=maven, name=<group>:<artifact>, matching OSV's naming. Walking these trees only to the version level keeps the cost low even when the Gradle cache is several hundred MB.

gradle.lockfile could come next for project-level coverage. pom.xml and build.gradle(.kts) usually hold ranges or unresolved versions, so they seem less useful for exact-version matching.

Separately, tools/osvcatalog would need "Maven": "maven" added to ecosystemMap.

Happy to help test this against real Gradle and Maven caches.

pranav-gupta12 avatar Nov 23 '26 03:11 pranav-gupta12