Repository navigation
pkg: HTTPS repositories only; no download follows HTTPS to HTTP - #121
Merged
Merged
Conversation
- pkg refuses a repository whose url= is not HTTPS. Over plain HTTP anyone on the network path can answer with an older signed list and its packages, and keep a system from its fixes. - osyx_web::get refuses a redirect from HTTPS to plain HTTP before the HTTP request is made, for every caller: packages, system updates (osyx-update), firstboot, fetch and get. pkg's separate get_no_downgrade is gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Wky8K1hAgSGYFWjvQ1gDqK
Contributor
v3nn7
marked this pull request as ready for review
November 12, 2026 17:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Follow-up to #120.
pkgaccepts only HTTPS repositories (userspace/web/src/bin/pkg.rs,repository()). Aurl=in/etc/osyx/packages.conf, or the system update'surl=it falls back to, that does not start withhttps://is refused: "… is not HTTPS: package repositories must use HTTPS". Over plain HTTP, anyone on the network path can answer with an older signed list and its packages and keep a system from its fixes; signatures prove origin, not freshness.userspace/web/src/lib.rs,getand the newredirect). The refusal happens in the redirect loop, before the HTTP connection is opened, so an HTTPS → HTTP → HTTPS chain is refused too. This covers every caller ofosyx_web::getanddownload:pkg, the system updater (osyx-update),firstboot,fetchandget. In desktop: editor, launcher search, light theme, captures, PDF text, packages; USB mouse behind a hub #120 onlypkghad this check, through a separateget_no_downgrade, which is gone now.docs/packages.md: describes both rules.A direct
http://URL still works forfetchandget. Only the step from HTTPS down to HTTP is refused.How was it tested?
In QEMU (desktop session, QMP input, terminal screenshots):
url=http://10.0.2.2:8765inpackages.conf:pkg listandelevate pkg install helloboth stop with "http://10.0.2.2:8765 (from /etc/osyx/packages.conf) is not HTTPS: package repositories must use HTTPS". Nothing was downloaded.url=https://github.com/OSyxSoftware/OSyx/releases/latest/download:pkg listpasses the new check and reaches the TLS layer. In this test environment the proxy replaces GitHub's certificate, so it ends with "TLS: invalid peer certificate: UnknownIssuer". That is expected here and shows the HTTPS path is taken.Not tested:
redirect:osyx-webdoes not build for the host.Limitations or screenshots
webpki-roots). The system has no way to add another root yet, so a private repository needs a publicly trusted certificate.fetchandgetas well.Labels
Labels: security, update
Generated by Claude Code