Skip to content

DOC Switch insecure http links to https - #32969

Merged
betatim merged 8 commits into
scikit-learn:mainfrom
prakritim01:doc-fix-https-links
Jan 7, 2026
Merged

betatim merged 8 commits into
scikit-learn:mainfrom
prakritim01:doc-fix-https-links

Conversation

@prakritim01

Copy link
Copy Markdown
Contributor

I updated several insecure http links to https in the documentation.

Files updated:

  • doc/about.rst
  • doc/developers/contributing.rst
  • doc/developers/performance.rst

@StefanieSenger StefanieSenger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @prakritim01, thanks for your PR, that I find overall useful.

I in total count 442 http: in the whole project (compared to 4700 https:) and I would be happy to replace them all in this PR.

But how do we deal with those pages (like the institute website from my comment) that don't use https? There must be quite a few in the docs.

I would slightly tend to try https on them as well and let user's browser's point out potential risks. Deciding this requires the opinion of another project member.

Comment thread doc/about.rst Outdated
The `NeuroDebian <https://neuro.debian.net>`_ project providing `Debian
<https://www.debian.org/>`_ packaging and contributions is supported by
`Dr. James V. Haxby <http://haxbylab.dartmouth.edu/>`_ (`Dartmouth
`Dr. James V. Haxby <https://haxbylab.dartmouth.edu/>`_ (`Dartmouth

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this site doesn't have a secure HTTPS configuration. At least firefox warns me about it when I try to open this page.
I am not sure what to do with cases like these. Leave them http or make the security risk explicit by trying to use https?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! I just pushed a commit to revert the Dartmouth link to http since it doesn't support HTTPS yet.

Regarding the other 400+ links: I am happy to help with those! Would you prefer I try to update them all in this PR, or should we merge this small fix first and handle the bulk update in a separate PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I know it is a lot of dull work, but ideally, you would check them all before adding the s and point out any problems that arise. There might be invalid links, websites that have moved and not redirected, etc. You can do it all in this PR.

Once we know the special cases (doesn't support https, has moved, doesn't exist anymore), you can sum it up and suggest what to do with these.

@prakritim01

prakritim01 commented Dec 30, 2025 •

Copy link
Copy Markdown
Contributor Author

I wrote a script to check all 442 http links in the documentation.

1. Updates Pushed:
I automatically upgraded ~30 links to https where the server responded with a 200 OK status. These are included in the latest commit.

2. Remaining Issues:
The remaining links could not be upgraded automatically due to SSL errors, Timeouts, or 404s. Here is a log of the failed attempts:

Click to expand full error log

[FAIL] http://www.datascience-paris-saclay.fr/ (SSL: CERTIFICATE_VERIFY_FAILED)
[FAIL] http://haxbylab.dartmouth.edu/ (SSL: Hostname mismatch)
[FAIL] http://www.bestofmedia.com (Failed to resolve)
[FAIL] http://www.data-publica.com/ (Connection reset)
[FAIL] http://ilpubs.stanford.edu (Connection timeout)
[FAIL] http://www.jcomputers.us/vol13/jcp1306-01.pdf (Connection timeout)
[FAIL] http://www.faqs.org/faqs/ai-faq/neural-nets/part3/section-12.html (SSL record layer failure)
[FAIL] http://csiss.ncgia.ucsb.edu/SPACE/workshops/2004/SAC/files/fisher.pdf (Connection timeout)
[SKIP] http://users.isr.ist.utl.pt/ (Status: 403)
[FAIL] http://cbcl.mit.edu/publications/ps/MIT-CSAIL-TR-2007-025.pdf (SSL record layer failure)
[SKIP] http://www.bmva.org/bmvc/2009/Papers/Paper355/Paper355.pdf (Status: 404)
[SKIP] http://home.olemiss.edu/ (Status: 404)
[SKIP] http://science.sciencemag.org/content/290/5500/2319.full (Status: 403)
[FAIL] http://cda.psych.uiuc.edu/ (Connection timeout)
[FAIL] http://ufldl.stanford.edu/ (SSL: Hostname mismatch)
[FAIL] http://yann.lecun.com/exdb/publis/pdf/lecun-98b.pdf (Connection timeout)
... and others with similar errors.

How would you like to handle these? Should we leave them as http or remove the dead ones?

@StefanieSenger

Copy link
Copy Markdown
Member

🚀 Nice! Thanks for the summary.

That is a surprisingly high number of failures (only 8% of requests succeeded) and maybe that is the reason why we hadn't changed these in the past. I'm still not sure how to deal with these cases. Have you searched through the issues if we had discussed this in the past?

@prakritim01

Copy link
Copy Markdown
Contributor Author

I noticed the ci/circleci: doc check failed, but it seems unrelated to my changes.

The error log shows a 403 Forbidden error when fetch_olivetti_faces tries to download the dataset (likely an external server issue):
urllib.error.HTTPError: HTTP Error 403: Forbidden

Since I only modified .rst files in doc/ and didn't touch the examples or dataset loaders, this appears to be a flaky test.

@StefanieSenger

Copy link
Copy Markdown
Member

The error log shows a 403 Forbidden error when fetch_olivetti_faces tries to download the dataset (likely an external server issue):
urllib.error.HTTPError: HTTP Error 403: Forbidden

Your're right, it is probably related to #32961.

@prakritim01

Copy link
Copy Markdown
Contributor Author

I searched the issues and found that link maintenance is treated as a periodic cleanup task. For example, issues #23631 (2022), #10334 (2017), and #7000 (2016) were all opened to fix broken links and then closed once the "low hanging fruit" was handled.

Since ~92% of the remaining http links in my report are failing securely (403/404/SSL errors), I propose we follow that same pattern:

  1. Merge the ~30 valid updates in this PR (since they are tested and working).
  2. Leave the broken ones as http for now to avoid breaking the docs further.

Does that sound like a good plan?

@StefanieSenger StefanieSenger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's pretty fine, thanks for your efforts, @prakritim01!

I think this is one of the uncritical documentation improvements where one maintainer review is enough and I will merge.

@prakritim01

Copy link
Copy Markdown
Contributor Author

That's pretty fine, thanks for your efforts, @prakritim01!

I think this is one of the uncritical documentation improvements where one maintainer review is enough and I will merge.

Thanks for the review! Happy to see this merged.

@StefanieSenger
StefanieSenger enabled auto-merge (squash) December 30, 2025 17:02
@StefanieSenger

StefanieSenger commented Dec 30, 2025 •

Copy link
Copy Markdown
Member

Seems I cannot merge while the Circle CI HTTP Error 403: Forbidden issue. Then let's wait for a second maintainer who knows how to work around that.

@StefanieSenger StefanieSenger added Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one! labels Dec 30, 2025
@ogrisel

ogrisel commented Jan 5, 2026

Copy link
Copy Markdown
Member

Since ~92% of the remaining http links in my report are failing securely (403/404/SSL errors), I propose we follow that same pattern:

  • Merge the ~30 valid updates in this PR (since they are tested and working).
  • Leave the broken ones as http for now to avoid breaking the docs further.

LGTM. The 404 could be manually investigated in a dedicated PR to manually look for alternative resources to link to if some resources have moved to a new URL.

@ogrisel

ogrisel commented Jan 5, 2026 •

Copy link
Copy Markdown
Member

I tried to push 91dfef0 to get a green CI by skipping the doc build, but apparently our doc building CI fails even in that case.

Error locating workspace root directory: stat /home/circleci/project/doc/_build/html: no such file or directory

I suppose we would need to find a way to conditionally skip the persist_to_workspace and the subsequent deployment in case [doc skip] is part of the commit message but I am not sure how to do so.

@prakritim01

Copy link
Copy Markdown
Contributor Author

I tried to push 91dfef0 to get a green CI by skipping the doc build, but apparently our doc building CI fails even in that case.

Error locating workspace root directory: stat /home/circleci/project/doc/_build/html: no such file or directory

I suppose we would need to find a way to conditionally skip the persist_to_workspace and the subsequent deployment in case [doc skip] is part of the commit message but I am not sure how to do so.

Thanks @ogrisel for the review and for trying to fix the CI!

I agree with the plan: I will leave this PR as-is (containing only the valid HTTPS upgrades) and we can handle the 404 investigation in a future PR.

I'll stand by while you handle the CI/merge process. Thanks again!

@lucyleeow

Copy link
Copy Markdown
Member

Figshare seems to be back up and I've updated main to re-run the CI (since the last commit skipped docs).

Comment thread doc/testimonials/testimonials.rst Resolved
Comment thread doc/testimonials/testimonials.rst Resolved

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more underline fix. Otherwise LGTM.

Comment thread doc/testimonials/testimonials.rst Resolved

@betatim betatim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to have these changes.

In general/for the future though I am not sure if there is much benefit to converting everything to HTTPS. I think that not every single website you visit has to be HTTPS, in particular if you do not enter sensitive information on that website or where the path/query arguments do not contain sensitive information.

TL;DR: not against making these changes but I also think that we could do other things that have more impact.

@betatim
betatim enabled auto-merge (squash) January 7, 2026 16:08
@betatim
betatim merged commit 8455af8 into scikit-learn:main Jan 7, 2026
@prakritim01
prakritim01 deleted the doc-fix-https-links branch January 7, 2026 18:52
@ogrisel

ogrisel commented Jan 8, 2026 •

Copy link
Copy Markdown
Member

Since internet browsers now always warn users when visiting an http URL, I think linking to https when possible should be considered a UX improvement: lower unnecessary cognitive load to people reading our doc.

@lesteve

lesteve commented Jan 8, 2026 •

Copy link
Copy Markdown
Member

I am with Tim on this one, lofty new year resolution: let's try to be better at turning down PRs with too little impact 💪 🤞 😉.

Since internet browsers now always warn users when visiting an http URL

Which browser are we talking about just curious? I tried a few (Firefox, Vivaldi, Chromium, Zen Browser) and didn't get any warning with a http, some already redirect automatically to https and it looks like Chrome is going to do the same in October 2026 by default according to this. The warning is only if there is no https website IIUC.

@ogrisel

ogrisel commented Jan 8, 2026

Copy link
Copy Markdown
Member

I thought it was the case with firefox, but maybe not...

@lesteve

lesteve commented Jan 9, 2026 •

Copy link
Copy Markdown
Member

I think for Firefox you only see the warning when there is no https link and you have enabled HTTPS-Only mode (the default seems to be HTTPS-Only is disabled, but I personally have enabled it a while ago), see this for more details.

dschult pushed a commit to dschult/scikit-learn that referenced this pull request Jan 25, 2026
Co-authored-by: Prakriti Manhar <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Lucy Liu <[email protected]>
dschult pushed a commit to dschult/scikit-learn that referenced this pull request Jan 25, 2026
Co-authored-by: Prakriti Manhar <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Lucy Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants