Repository navigation
Conversation
elharo
marked this pull request as draft
September 19, 2026 13:22
elharo
marked this pull request as ready for review
September 26, 2026 13:38
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Spaces are form-encoded as + in URL path segments; use URI-component encoding and add space coverage.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates Reproducible Central report URLs to safely encode Maven coordinates.
Changes:
- Added UTF-8 URL encoding for badge and artifact links.
- Added tests for special-character coordinates.
| File | Description |
|---|---|
src/test/java/org/apache/maven/plugins/artifact/buildinfo/ReproducibleCentralReportTest.java |
Tests coordinate URL encoding. |
src/main/java/org/apache/maven/plugins/artifact/buildinfo/ReproducibleCentralReport.java |
Builds encoded report URLs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
slachiewicz
approved these changes
Sep 28, 2026
Render POM coordinates into the Reproducible Central artifact badge and link URLs with each segment URL-encoded, so characters such as &, ?, #, " and / in groupId, artifactId or version cannot break the badge image or inject foreign HTML into the generated site report.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #249
renderReproducibleCentralArtifact()interpolatedgroupId,artifactIdandversionstraight from the POM into the Reproducible Central badge and link URLs. Coordinates are arbitrary user input for third-party projects, and characters such as&,?,#,"or/produced a broken/misleading badge as well as potentially malformed/foreign HTML in the generated site report.This change URL-encodes each coordinate segment (UTF-8) when building both URLs:
https://img.shields.io/reproducible-central/artifact/{groupId}/{artifactId}/{version}?labelColor=1e5b96https://jvm-repo-rebuild.github.io/reproducible-central/badge/artifact/{groupId path}/{artifactId}.htmlThe group-id path still maps dots to
/after encoding.Test
Added
ReproducibleCentralReportTestwith unit tests asserting that special characters in coordinates are percentage-encoded in the generated URLs. The tests were verified to fail on the unpatched code and pass with the fix.All 4 unit tests pass; checkstyle, spotless and RAT are clean.