Skip to content

fix: GITHUB_TOKEN should not cause rustls CryptoProvider panic#2036

Merged
thomas-zahner merged 2 commits intolycheeverse:masterfrom
rina-forks:rustls-fix
Feb 9, 2026
Merged

fix: GITHUB_TOKEN should not cause rustls CryptoProvider panic#2036
thomas-zahner merged 2 commits intolycheeverse:masterfrom
rina-forks:rustls-fix

Conversation

@katrinafyi
Copy link
Member

Fixes #2024

Disables octocrab option which would lead to rustls/ring, so only rustls/aws-lc-rs is enabled.

Honestly, it looks like an octocrab bug because its default option set would lead to incompatible rustls features being enabled: https://docs.rs/crate/octocrab/latest/features

octocrab/default -> octocrab/rustls -> hyper-rustls/default -> rustls/aws-lc-rs
octocrab/default -> octocrab/rustls-ring -> hyper-rustls/ring -> rustls/ring

Fixes https://www.github.com/lycheeverse/lychee/issues/2024

Disables octocrab option which would lead to rustls/ring, so only
rustls/aws-lc-rs is enabled.

Honestly, it looks like an octocrab bug because its default option
set would lead to incompatible rustls features being enabled:
https://docs.rs/crate/octocrab/latest/features

octocrab/rustls (default on) -> hyper-rustls/default -> rustls/aws-lc-rs
octocrab/rustls-ring -> hyper-rustls/ring -> rustls/ring
@thomas-zahner
Copy link
Member

@katrinafyi Thank you very much for the fix! The merge commit should which includes additional changes and causes the merge conflict should not be necessary. See https://github.com/thomas-zahner/lychee/commits/rustls-fix/ for a rebased version. (I again wasn't allowed to push to this branch)

@katrinafyi
Copy link
Member Author

I'd sent you an invite to the repo. It should be in your email, or maybe there's a button at https://github.com/rina-forks/lychee.
I found that there was no checkbox I could tick on the PR page

@thomas-zahner
Copy link
Member

I'd sent you an invite to the repo.

Ah thank you! I now got one step further. But due to branch rules/protections I'm unable to force push. Could you allow force pushes to all branches (or non-master) buy modifying the rule set or by deleting it?

remote: error: GH013: Repository rule violations found for refs/heads/rustls-fix.
remote: Review all repository rules at https://github.com/rina-forks/lychee/rules?ref=refs%2Fheads%2Frustls-fix
remote:
remote: - Cannot force-push to this branch
remote:
To github.com:rina-forks/lychee.git
 ! [remote rejected]   rustls-fix -> rustls-fix (push declined due to repository rule violations)
error: failed to push some refs to 'github.com:rina-forks/lychee.git'

@katrinafyi
Copy link
Member Author

Done~

@thomas-zahner
Copy link
Member

@katrinafyi Thank you. I think in that case it makes more sense to specifically test the function causing the panic instead of using such abstract cli tests. Do you agree with d3f3c60?

@katrinafyi
Copy link
Member Author

katrinafyi commented Feb 9, 2026

Yeah I don't really mind either way. It is nice to be more specific.

@thomas-zahner
Copy link
Member

Thanks. I feel that being more specific with testing should be done when possible. In lychee we tend to have many CLI integration tests (which is great) but it might make sense to also have more "low-level" tests.

@thomas-zahner thomas-zahner merged commit 102ecb4 into lycheeverse:master Feb 9, 2026
7 checks passed
@katrinafyi
Copy link
Member Author

It's true. I definitely use CLI tests more often just because they're easier to write 😅

@thomas-zahner
Copy link
Member

Haha yes I also tend to do this, which might not always be ideal 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GITHUB_TOKEN environment variable causes panics with "Could not automatically determine the process-level CryptoProvider from Rustls crate features"

2 participants