Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to search.maven.org is in clear HTTP #1325

Closed
ethans opened this issue Jun 11, 2018 · 6 comments
Closed

Access to search.maven.org is in clear HTTP #1325

ethans opened this issue Jun 11, 2018 · 6 comments

Comments

@ethans
Copy link

ethans commented Jun 11, 2018

Security issue:
When running (at least the command line scanner) for JAR files, it accesses most resources in HTTPS but for some reason it accesses search.maven.org/remotecontent?filepath= in clear.

This is because the MavenArtifact does this:
private static final String CENTRAL_CONTENT_URL = "//search.maven.org/remotecontent?filepath=";

As opposed to the solrsearch that is configured in the properties file:
analyzer.central.url=https://search.maven.org/solrsearch/select

@ethans
Copy link
Author

ethans commented Jun 11, 2018

After looking into it, I see that it defaults to http (in CentralSearch.java), and sets HTTPS only if it finds a https attribute.

For a security tool - I find this strange. It should default to HTTPS and use HTTPS only for accessing maven.

jeremylong added a commit that referenced this issue Jun 11, 2018
@jeremylong
Copy link
Owner

This code hasn't been touched in years - if memory serves, at that time not all artifacts were served over HTTPS. However, that has since changed and the service no longer includes the flag indicating if the artifact could be served over HTTPS. As such, we can get rid of the check for the ability to use HTTPS and just default to secure. Thanks for pointing this out

@ethans
Copy link
Author

ethans commented Jun 11, 2018

No problem :-)
I'm about to submit the fixed code - just finishing to test it.

@jeremylong
Copy link
Owner

Ack - when I read the report I quickly pushed: aece99b

I don't think a PR is needed...

@ethans
Copy link
Author

ethans commented Jun 11, 2018

I was hoping this would be my contribution to a wonderful open source project.
Oh, well...
Good job

@lock
Copy link

lock bot commented Sep 27, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Sep 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants