chore: harden embedded-POM trust boundary in install:install-file (3.x backport) - #447
Open
gnodet wants to merge 2 commits into
Open
chore: harden embedded-POM trust boundary in install:install-file (3.x backport)#447gnodet wants to merge 2 commits into
gnodet wants to merge 2 commits into
Conversation
…x backport) Backport of security hardening from master to the 3.x maintenance line. Static analysis findings (no live exploit demonstrated): - f001 (MEDIUM): Make coordinate adoption from embedded POM visible and cross-checked — fail on multiple POM entries, validate entry-path vs model GAV, log at INFO, warn before overwriting, validate packaging - f002 (MEDIUM): Skip embedded POM when full CLI coordinates supplied; cross-check operator-supplied coordinates against embedded POM - f003 (LOW): Defense-in-depth DOCTYPE rejection for embedded POM XML with encoding-aware screening (UTF-8/16/32, EBCDIC) - f004 (LOW): Reject empty/dot-only coordinates and leading-dot groupIds; containment-check install path against local repository root Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The embedded-POM trust hardening changed log.debug() to log.info() for provenance visibility. Update the integration test assertions to match the new log level and message format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
marked this pull request as ready for review
September 1, 2026 10:57
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.
Summary
Backport of the embedded-POM trust boundary hardening from master to the 3.x maintenance line. Addresses four findings from a static security audit.
Findings addressed
Changes
Same logical fixes as the master PR, adapted to Maven 3 APIs (MavenXpp3Reader, MojoExecutionException, Aether, etc.):
META-INF/maven/*/pom.xmlentries match; validate entry-path vs model GAV; log at INFO; warn before overwriting; validate packaging.<!DOCTYPEbefore parsing embedded POM XML.Note on InstallMojo
The 3.x
InstallMojodoes NOT need these changes — its architecture uses a single atomicInstallRequest(no per-project loop), and it already matches by plugin presence, not execution-id.Category
Security hardening — backport from master.
Test plan
mvn clean install -Bsucceeds🤖 Generated with Claude Code