elharo opened a new issue, #250:
URL: https://github.com/apache/maven-artifact-plugin/issues/250

   `CompareMojo.diffoscope()` (lines 306-326) reflects user-controlled and 
artifact-derived data into a `wget` hint printed to the build log:
   
   ```java
   String url = baseUrl
           + (baseUrl.endsWith("/") ? "" : "/")
           + session.getRepositorySession()
                   .getLocalRepositoryManager()
                   .getPathForRemoteArtifact(a, repo, null);
   return "wget " + url + "; ls -l " + relative(actual);
   ```
   
   `baseUrl` comes from the user-provided `reference.repo` parameter; the path 
is derived from the current artifacts. While the plugin only prints this string 
(it does not shell-execute it), the echoed value is attacker-influenced during 
a build of untrusted projects and can be used to spoof/mislead the suggestions 
a user copy-pastes. Worth sanitizing or explicitly quoting the URL in the hint 
to avoid confusing/ambiguous instructions.


-- 
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