Skip to content

fix(ci): unbreak the build (russh 0.61.2), clear RustSec advisories, fix legacy-namespace test#862

Merged
adolago merged 4 commits into
mainfrom
fix/audit-advisories
Jun 13, 2026
Merged

fix(ci): unbreak the build (russh 0.61.2), clear RustSec advisories, fix legacy-namespace test#862
adolago merged 4 commits into
mainfrom
fix/audit-advisories

Conversation

@adolago

@adolago adolago commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Gets CI green again (issue #850) after a cascade of failures. Three areas, now all resolved:

  1. The build was broken on main — Dependabot build(deps): bump the cargo group across 2 directories with 3 updates #861 bumped russh 0.55→0.57, whose forked ssh-key pulls a pre-release rsa/pkcs8 combo that doesn't compile.
  2. The audit jobs — a wave of new 2026 RustSec advisories against transitive crypto crates.
  3. The Test matrix — a docs test went red after Repo hygiene, CI gate hardening, panic-path fixes, and a rand 0.9 build fix #860's docs alignment.

1. Unbreak the build: russh 0.57 → 0.61.2

main stopped compiling once #861 landed. Resolving this branch's lock conflict on top required moving russh forward:

  • Upgrade russh to 0.61.2. Drops the broken forked ssh-key for ssh-key 0.7, bumps russh-cryptovec→0.61 and aws-lc-sys→0.41, and removes libcrux-sha3 + the unmaintained proc-macro-error2.
  • Migrate the changed agent API (russh.rs, russh_auth.rs, ssh_agent.rs): request_identities() now yields AgentIdentity; use .public_key() for auth + algorithm lookup. Test key helper rebuilt via Ed25519Keypair::from_seed (random seed) to avoid ssh-key's rand_core version coupling.
  • Also drop the now-vestigial russh-keys 0.45 dep (nothing uses russh_keys::; everything goes through russh::keys).

2. Audit advisories — mostly fixed for real, not ignored

The russh 0.61 upgrade fixes 8 of the 11 advisories (aws-lc-sys ×5, libcrux-sha3, russh, russh-cryptovec) outright — so their ignores are gone. Plus rustls-webpki 0.103.8→0.103.13 (clears RUSTSEC-2026-0049).

Only the AWS SDK's bundled rustls-webpki 0.101.7 (RUSTSEC-2026-0098/0099/0104, aws feature only) stays triaged in .cargo/audit.toml/deny.toml, with a note: fix is the AWS SDK moving onto rustls 0.23.

3. Legacy-namespace docs test

test_release_docs_do_not_reference_legacy_repo_namespace forbade adolago/rustible, but that's the canonical home now; #860 moved issue links onto it and tripped the guard (all 13 Test jobs, one assertion). Retargeted the guard at the actual previous owner, kernelfirma/rustible.

Verification (local, default features)

Check Result
cargo check --all-targets
cargo audit ✅ (3 AWS-only advisories triaged; 1 informational warning)
cargo deny check licenses bans sources bans ok, licenses ok, sources ok
cargo clippy --all-targets -- -D warnings ✅ 0
cargo test --lib ✅ 2961 passed
cargo test --test docs_compatibility_sync_tests ✅ 39
bash scripts/smoke_tests.sh ✅ 3
cargo fmt --all -- --check

Remaining follow-up (out of scope)

  • Move the AWS SDK onto rustls 0.23 to clear the last 3 (rustls-webpki 0.101.7); then drop those ignores.

🤖 Generated with Claude Code

A wave of new 2026 RustSec advisories against transitive crypto crates
turned the Cargo Audit / Security Audit CI jobs red (pre-existing on
main, unrelated to the prior PR). Remediate the ones we can and triage
the rest with justification.

Real fixes (shrink the tree / bump in range):
- Drop the `russh-keys` 0.45 dependency. It was vestigial — nothing
  references `russh_keys::`; all key handling goes through russh's own
  `russh::keys`. Removing it drops russh-keys, the standalone ssh-key
  0.6.7, russh-cryptovec 0.7.3 (RUSTSEC-2026-0153), pbkdf2 and
  password-hash from the lock.
- Bump rustls-webpki 0.103.8 -> 0.103.13 (clears RUSTSEC-2026-0049/
  0098/0099/0104 for that instance).

Triaged (need breaking major upgrades, tracked separately) — ignores
added to .cargo/audit.toml with per-advisory rationale, mirrored in
deny.toml:
- russh 0.55 crypto stack: aws-lc-sys (2026-0044..0048), libcrux-sha3
  (2026-0074), russh-cryptovec 0.52 (2026-0153), russh (2026-0154).
  Fix = upgrade russh to >=0.60.3 (breaking).
- AWS SDK's bundled rustls 0.21 / rustls-webpki 0.101.7 (2026-0098/
  0099/0104), aws feature only. Fix = AWS SDK on rustls 0.23.

cargo audit now exits 0 (3 informational warnings remain). Default
build, clippy --all-targets -D warnings, and fmt all green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qodo-code-review

qodo-code-review Bot commented Jun 13, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Remediation recommended

1. Misleading russh optionality note 🐞 Bug ⛨ Security
Description
The new .cargo/audit.toml rationale says the ignored russh 0.55 advisory set is only reachable via
the optional russh feature, but Cargo.toml enables russh in the default feature set. This is
security-relevant because it can cause maintainers/users to incorrectly assume these ignored
advisories do not affect default builds.
Code

.cargo/audit.toml[R32-35]

+    # Fix requires upgrading russh to >=0.60.3, a breaking API change (Config,
+    # Preferred, kex/mac constants, Handler trait) tracked as a separate effort.
+    # russh is optional (`russh` feature) and these are SSH-path crypto issues.
+    "RUSTSEC-2026-0044",  # aws-lc-sys: X.509 name-constraints bypass
Evidence
The audit ignore block explicitly claims russh advisories are only through an optional feature,
while the crate’s default features enable russh, so the ignored advisories affect default builds.

.cargo/audit.toml[26-35]
Cargo.toml[1-7]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`.cargo/audit.toml` states that russh is optional and the ignored advisories are only reachable through the `russh` feature, but `Cargo.toml` includes `russh` in `default` features. This makes the ignore rationale inaccurate for default builds.

## Issue Context
- Current default features include `russh`, so a plain `cargo build` / default consumer build enables it.
- The ignore rationale should be accurate about whether advisories affect default builds.

## Fix Focus Areas
- .cargo/audit.toml[26-35]
- Cargo.toml[1-7]

## What to change
- Update the comment in `.cargo/audit.toml` to explicitly state that `russh` is **enabled by default** (even if it is feature-gated), so these advisories apply to default builds.
- (Optional alternative, if desired policy-wise): remove `russh` from the `default` feature set in `Cargo.toml` so the “optional feature only” rationale becomes true; if you do this, ensure docs/CI expectations are updated accordingly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix audit CI by removing unused russh-keys and documenting RustSec ignores
🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

Walkthroughs

Description
• Remove the unused russh-keys optional dependency from the russh feature.
• Triage newly failing 2026 RustSec advisories with documented, feature-scoped ignores.
• Mirror RustSec ignore lists between cargo-audit and cargo-deny configurations.
Diagram
graph TD
  A["Security audit CI jobs"] --> B[".cargo/audit.toml"] --> G[("RustSec advisory DB")]
  A --> C["deny.toml"]
  D["Cargo feature selection"] --> E["Cargo.toml"] --> F["Resolved dependency tree"] --> A
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Do the breaking upgrades now (russh >=0.60.3, AWS SDK rustls 0.23 line)
  • ➕ Removes the need for ignore entries and reduces long-lived security exceptions
  • ➕ Gets onto supported crypto stacks sooner
  • ➖ Larger, riskier PR with API migrations and wider test surface
  • ➖ May block quickly restoring CI green if migration is non-trivial
2. Temporarily exclude optional-feature trees from CI audits
  • ➕ Avoids ignoring advisories globally while keeping default build strict
  • ➕ Minimizes risk of shipping code with known issues in default configuration
  • ➖ Requires CI workflow changes and consistent feature-matrix discipline
  • ➖ Still leaves feature-enabled builds unaudited unless added back explicitly
3. Use Cargo `[patch]` / dependency overrides to force fixed transitive versions
  • ➕ Can sometimes clear advisories without waiting for upstream major bumps
  • ➕ Keeps dependency graph closer to current APIs
  • ➖ Higher maintenance burden and potential for subtle incompatibilities
  • ➖ Can diverge from upstream dependency resolution and mask upgrade pressure

Recommendation: Current approach is appropriate for unblocking CI: remove truly unused dependencies to shrink the tree, and explicitly document/justify remaining advisories that require breaking upstream upgrades. Keep the ignore blocks narrowly scoped and treat them as temporary—follow up with separate PRs for the russh and AWS/rustls major-line upgrades, then delete the corresponding ignores.

Grey Divider

File Changes

Other (3)
audit.toml Add documented ignores for 2026 advisories in optional russh/AWS stacks +27/-0

Add documented ignores for 2026 advisories in optional russh/AWS stacks

• Extends the 'ignore' list with a grouped set of 2026 RustSec advisories tied to the optional 'russh' SSH stack and the optional AWS SDK rustls/webpki chain. Each advisory is annotated with reachability context and a concrete remediation path (major upgrades tracked separately).

.cargo/audit.toml


Cargo.toml Remove unused russh-keys from the russh feature and dependencies +1/-2

Remove unused russh-keys from the russh feature and dependencies

• Drops 'russh-keys' from the 'russh' feature definition and removes the optional 'russh-keys' dependency entry. This reduces the transitive dependency surface area that security tooling audits.

Cargo.toml


deny.toml Mirror cargo-audit RustSec ignore list for local cargo-deny runs +16/-0

Mirror cargo-audit RustSec ignore list for local cargo-deny runs

• Adds the same set of 2026 RustSec advisory IDs to 'cargo-deny''s '[advisories].ignore' list, with pointers back to '.cargo/audit.toml' for the detailed rationale. Keeps local 'cargo deny check' behavior aligned with CI audit triage.

deny.toml


Grey Divider

Qodo Logo

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 99dc9a4f04

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .cargo/audit.toml Outdated
Comment on lines +34 to +35
# russh is optional (`russh` feature) and these are SSH-path crypto issues.
"RUSTSEC-2026-0044", # aws-lc-sys: X.509 name-constraints bypass

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Don't ignore default-reachable russh advisories

This suppression is justified as optional, but Cargo.toml still has default = ["russh", "local"], so a normal/default build pulls russh 0.55 and its aws-lc-sys, libcrux-sha3, and russh-cryptovec stack. With these IDs ignored, both cargo audit jobs can pass while the default SSH backend remains covered by the listed vulnerabilities; either remove russh from the default set or avoid suppressing these until the default path is upgraded.

Useful? React with 👍 / 👎.

test_release_docs_do_not_reference_legacy_repo_namespace forbade
github.com/adolago/rustible, but adolago/rustible is now the canonical
home of the repository. PR #860's docs alignment moved the issue links
onto adolago/rustible, which tripped this guard and turned the entire
Test matrix red on one assertion (38 passed; 1 failed).

Point the guard at the actual previous owner, kernelfirma/rustible,
so it still prevents stale-namespace references from creeping back in
while allowing the current adolago namespace. None of the seven
guarded docs reference kernelfirma anymore, so the suite is green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@adolago adolago changed the title fix(deps): clear RustSec advisories blocking the audit CI jobs fix(ci): clear RustSec audit failures and the legacy-namespace docs test Jun 13, 2026
main (after Dependabot #861 bumped russh 0.55 -> 0.57) no longer
compiled: russh 0.57's forked ssh-key pulls a pre-release rsa/pkcs8
combination that fails to build. Resolving the Cargo.lock conflict on
top of that breakage required moving russh forward, not just merging.

- Upgrade russh to 0.61.2 (latest). Drops the broken forked ssh-key
  in favour of ssh-key 0.7, bumps russh-cryptovec to 0.61 and
  aws-lc-sys to 0.41, and removes libcrux-sha3 and proc-macro-error2
  from the tree.
- Migrate the changed agent API (russh.rs, russh_auth.rs,
  ssh_agent.rs): request_identities() now yields AgentIdentity; use
  .public_key() for authentication and algorithm lookup. Rebuild the
  test key helper deterministically via Ed25519Keypair::from_seed to
  avoid ssh-key's rand_core version coupling.
- This upgrade fixes the russh-chain advisories for real, so their
  .cargo/audit.toml / deny.toml ignores are removed; only the AWS SDK
  rustls-webpki 0.101.7 ignores remain. rustls-webpki re-bumped to
  0.103.13 (clears RUSTSEC-2026-0049).

cargo audit/deny/clippy(-D warnings)/fmt clean; 2961 lib tests +
docs + smoke pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@adolago adolago changed the title fix(ci): clear RustSec audit failures and the legacy-namespace docs test fix(ci): unbreak the build (russh 0.61.2), clear RustSec advisories, fix legacy-namespace test Jun 13, 2026
The test spawned 10 tasks each sleeping 10ms and asserted the parallel
run finished in <50ms. That window is too tight for a contended CI
runner (it flaked on ubuntu-stable-pure-rust while passing everywhere
else with the identical feature set). Use 50ms sleeps with a <250ms
bound: parallel is ~50ms + overhead, a serial run would be ~500ms, so
the parallel-vs-serial distinction stays sharp with ample CI headroom.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@adolago adolago merged commit 6058ed8 into main Jun 13, 2026
41 checks passed
@adolago adolago deleted the fix/audit-advisories branch June 13, 2026 18:07
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.

1 participant