Repository navigation
fix(github): sign App JWTs with aws-lc-rs, dropping rsa 0.9 (RUSTSEC-2023-0071) - #323
Merged
Merged
Conversation
…2023-0071) RUSTSEC-2023-0071 (Marvin) covers timing side channels in the rsa crate's private-key operations. jsonwebtoken's rust_crypto backend used rsa 0.9 to sign the GitHub App's RS256 JWTs, which is exactly that operation. The rsa 0.10 bump the Count proposed could not resolve, because the github and server crates' dev-dependencies asked for rsa's removed `pem` feature. jsonwebtoken now signs with its aws_lc_rs backend. aws-lc-rs was already linked through rustls, so no new crypto library is added. App::new accepts the same keys as before, because PEM decoding (PKCS#1 and PKCS#8) is jsonwebtoken's own code and does not depend on the backend. The header, claims and algorithm are unchanged. Tests generate App keys through a new patchula_testkit::app_key helper on aws-lc-rs, which replaces the rsa dev-dependency in crates/github and crates/server. A new test checks that a JWT from a PKCS#1 or PKCS#8 key has the same RS256 header and claims, and verifies its signature with aws-lc-rs directly. User-visible effect: none, apart from the advisory clearing. Cargo.lock drops rsa 0.9.10 and crypto-bigint 0.5.5 (RUSTSEC-2026-0387), plus the rest of the RustCrypto chain that only rust_crypto pulled in: base16ct, base64ct, const-oid, curve25519-dalek(-derive), der, ecdsa, ed25519, ed25519-dalek, elliptic-curve, ff, fiat-crypto, group, hkdf, one hmac version, num-bigint-dig, num-iter, p256, p384, pem-rfc7468, pkcs1, pkcs8, ppv-lite86, primeorder, rand_chacha, rfc6979, sec1, spin, spki, zerocopy and zerocopy-derive. The source-head, tag-catalog, tag-object and release-notes state rows are rehashed, because their crates/github/src/ tree changed. The stored bytes did not change, so the versions stay the same.
sweepies
force-pushed
the
fix/jwt-without-rsa
branch
from
November 14, 2026 08:18
3536386 to
1f97b9b
Compare
Merged
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.
The Count's run on his own repository proposed
rsa0.9 → 0.10 for RUSTSEC-2023-0071 (Marvin: timing side channels in RSA private-key operations, possible key recovery). Cargo refused that bump, because 0.10 dropped thepemfeature our test code used. Andrsa0.9 wasn't only a test dependency: jsonwebtoken'srust_cryptobackend used it to sign the GitHub App's RS256 JWTs in production, which is exactly the private-key operation the advisory covers.Change
aws_lc_rsbackend, which is already linked through rustls, so no new crypto library comes in.App::newaccepts the same PKCS#1 and PKCS#8 PEM keys, and the JWT header, claims and RS256 algorithm are unchanged.rsanow.rsa0.9.10,crypto-bigint0.5.5 (RUSTSEC-2026-0387) and the rest of the RustCrypto chain only jsonwebtoken's old backend pulled in are gone: about 30 crates, 381 lines.Proof
a_real_installation_mints_a_metadata_read_token_for_one_repositorypasses against thesweepies-opsApp. GitHub accepted the new signature, minted a repository-scopedmetadata: readtoken, gave a 404 on another private repository and refused a write.mise run build:cliandmise run release:package x86_64-unknown-linux-muslboth pass on the VM. The aarch64-musl and darwin targets weren't run locally; CI and the release workflow build them.User-visible effect: none, apart from the advisories clearing.