fix(brouter): strip unused protobuf-java from the server jar #290

Merged
ullrich merged 1 commit from brouter-strip-protobuf into main 2026-10-24 02:14:24 +00:00
Owner

BRouter's -all.jar bundles protobuf-java 3.12.2 (GHSA-4gg5-vx3j-xwc7 and four more DoS advisories) together with the osmosis PBF reader that uses it. Both are there only for brouter-map-creator, which builds .rd5 segments from OSM extracts. RouteServer never loads them, because we download prebuilt segments. 1.7.10 is the latest release, so no version bump fixes this. This PR removes com/google/protobuf/*, google/protobuf/*.proto, the protobuf Maven metadata and org/openstreetmap/osmosis/* from the jar at build time.

Verified locally (Docker wasn't running, so I tested the jar directly with Java): I stripped the 1.7.10 jar the same way and ran RouteServer against E10_N50.rd5. A trekking route across Berlin came back as valid GeoJSON (3.4 km), and the log showed no exceptions. CI's e2e job, which uses the real BRouter, covers the rest.

This deploys through cd-brouter.yml on merge.

Refs #168

🤖 Generated with Claude Code

BRouter's `-all.jar` bundles `protobuf-java` 3.12.2 (GHSA-4gg5-vx3j-xwc7 and four more DoS advisories) together with the osmosis PBF reader that uses it. Both are there only for `brouter-map-creator`, which builds `.rd5` segments from OSM extracts. `RouteServer` never loads them, because we download prebuilt segments. 1.7.10 is the latest release, so no version bump fixes this. This PR removes `com/google/protobuf/*`, `google/protobuf/*.proto`, the protobuf Maven metadata and `org/openstreetmap/osmosis/*` from the jar at build time. **Verified locally** (Docker wasn't running, so I tested the jar directly with Java): I stripped the 1.7.10 jar the same way and ran `RouteServer` against `E10_N50.rd5`. A trekking route across Berlin came back as valid GeoJSON (3.4 km), and the log showed no exceptions. CI's e2e job, which uses the real BRouter, covers the rest. This deploys through `cd-brouter.yml` on merge. Refs #168 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(brouter): strip unused protobuf-java from the server jar
All checks were successful
CI / Dockerfile Package Check (pull_request) Successful in 5s
CI / Security Scan (pull_request) Successful in 7s
CI / Visual Tests (pull_request) Successful in 44s
CI / Checks (pull_request) Successful in 50s
CI / Journal Image Smoke Test (pull_request) Successful in 1m8s
CI / E2E Tests (pull_request) Successful in 3m38s
CD Staging / Build & Push journal Image (pull_request) Has been skipped
CD Staging / Build & Push planner Image (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 2s
CD Staging / Tear Down PR Preview (pull_request) Successful in 13s
d82a5ec27e
BRouter's -all.jar bundles protobuf-java 3.12.2 (GHSA-4gg5-vx3j-xwc7 and
four more DoS advisories) for brouter-map-creator's osmosis PBF reader.
RouteServer never loads either; we download prebuilt segments. 1.7.10 is
the latest release, so there is no version to bump to.

Verified locally: stripped jar serves a Berlin trekking route from
E10_N50.rd5 with no exceptions in the log.

Refs #168

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ullrich deleted branch brouter-strip-protobuf 2026-10-24 02:14:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!290
No description provided.