ikxeno commented on code in PR #13276:
URL: https://github.com/apache/maven/pull/13276#discussion_r4116427620


##########
THREAT_MODEL.md:
##########
@@ -166,6 +166,7 @@ Maven's inputs split cleanly into **operator-supplied 
(trusted)** and **reposito
 | **Consumer-POM transform input** (`mvn deploy`) | **4.x only** | operator 
project → published | source **no**; the *published* result is a new surface 
for downstream | verify what you publish matches intent *(inferred, Q7)* |
 | **`mvnup` rewrite input** | **4.x only** | operator `pom.xml` | **no** — 
trusted, but written back in place | review the diff `mvnup` produces 
*(inferred, Q8)* |
 | **`mvnenc` secrets / vault** | **4.x only** | operator | **no** — trusted | 
manage the master key/vault (§10) *(inferred, Q9)* |
+| **`mvnval` validation input** | **4.x only** | operator `pom.xml` | **no** — 
trusted, read-only | reads POMs and reports on them; resolves no parent, 
reaches no network, writes nothing back |

Review Comment:
   It wasn't tested, which is why it was wrong. Two channels were open.
   
   .mvn/extensions.xml was resolved from central before validation started. 
With that fixed, maven.ext.class.path in .mvn/maven-user.properties still put a 
jar on the container classpath:
   
   ```
   $ mvnval -X pom.xml | grep evil
   [DEBUG]   included '/tmp/evil.jar'
   ```
   
   So instead of closing channels one by one, the tool now boots no container. 
It used nothing from it, and that also drops .mvn/settings.xml beside the POM. 
There's a test for it.
   
   .mvn/jvm.config it can't refuse, since bin/mvn reads it before any Java 
runs. The row says so now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to