Skip to content

Commit

Permalink
✨ Update Maven Search API HTTP GET request to use HTTPS (#719)
Browse files Browse the repository at this point in the history
#### PR Summary
Java-external-provider: Updated the HTTP GET API call to HTTPS to ensure
secure communication with Maven Central Index.
-
`external-providers/java-external-provider/pkg/java_external_provider/util.go`:
Changed the search URL from `http` to `https` for Maven Central Index
API call.

Signed-off-by: kthatipally <99229993+kthatipally@users.noreply.github.com>
  • Loading branch information
kthatipally authored Nov 13, 2024
1 parent 172d684 commit 625d0bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ func constructArtifactFromSHA(jarFile string) (javaArtifact, error) {

sha1sum := hex.EncodeToString(hash.Sum(nil))

// Make an HTTP request to search.maven.org
searchURL := fmt.Sprintf("http://search.maven.org/solrsearch/select?q=1:%s&rows=20&wt=json", sha1sum)
// Make an HTTPS request to search.maven.org
searchURL := fmt.Sprintf("https://search.maven.org/solrsearch/select?q=1:%s&rows=20&wt=json", sha1sum)
resp, err := http.Get(searchURL)
if err != nil {
return dep, err
Expand Down

0 comments on commit 625d0bc

Please sign in to comment.