Skip to main content

Failure to use HTTPS or SFTP URL in Maven artifact upload/download (CodeQL)


ImportanceReview GuidanceRequires Scanning Tool
MEDIUMMerge Without ReviewYes (CodeQL)

This change replaces any HTTP URLs found in <repository> definitions with HTTPS URLs. Without this change, Maven will make requests to either publish or retrieve artifacts over a plaintext channel.

That plaintext channel can be observed or modified by malicious actors on the network path between the host running Maven and their intended repository. These actors could then sniff repository credentials, publish malicious artifacts, etc. Simply switching to an HTTPS URL is sufficient to make all of these attacks impossible in almost all situations.

Our changes look something like this:

  <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" ...>
<name>Acme Releases</name>
- <url></url>
+ <url></url>