Skip to content

fix(deps): clear cargo deny on main — ctutils 0.4.6, tokio 1.51.6, ignore RUSTSEC-2026-0374 - #212

Merged
gonzafg2 merged 5 commits into
mainfrom
chore/deny-ignore-basic-toml
Oct 28, 2026
Merged

gonzafg2 merged 5 commits into
mainfrom
chore/deny-ignore-basic-toml

Conversation

@gonzafg2

@gonzafg2 gonzafg2 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Clears cargo deny on main, where three advisories fail it. cargo deny is a required check, so until this lands no PR can merge.

  • RUSTSEC-2026-0385 (ctutils < 0.4.4, crypto-failure: masks and u128 comparisons are not constant-time) is fixed by ctutils 0.4.6, a lockfile-only change.
  • RUSTSEC-2026-0386 (tokio, unsound: AsyncFd's safe constructors violate I/O safety) is fixed by tokio 1.51.6. That release deprecates the safe constructors in favour of unsafe ones, which ADR-0018 forbids, so the three uses keep the deprecated constructor under #[allow(deprecated)]. Each AsyncFd owns its OwnedFd (the pidfd in wait_exit, the PTY master in spawn_pty, and the master in a pty test), and the descriptor is never duplicated or closed underneath it: only the slave is cloned, and the slave is not registered. That is the advisory's precondition, so these uses are sound. The ponytail: comments name the upgrade path, a safe constructor for owned descriptors.
  • RUSTSEC-2026-0374 (basic-toml unmaintained, informational) is ignored with its reason. Its replacement is TBD in ADR-0044 (docs(adr): ADR-0044 — toml replaces the unmaintained basic-toml as the config parser (Proposed) #213, Proposed), whose implementing PR removes the entry.

Motivation

RustSec published RUSTSEC-2026-0374 on 2026-09-26. basic-toml was archived in March 2025, and the advisory is informational (unmaintained), with no patched version and no known vulnerability. basic-toml is the config parser ADR-0029 chose, and deny.toml treats an unmaintained crate as an error. cargo deny has therefore failed on main since the 2026-10-28 push, and it is a required check, so no PR can merge (#204 and the Dependabot PRs included).

Why an ignore is acceptable for now:

  • basic-toml parses only the operator's config file, and only after the StrictModes checks (ADR-0029). It never parses peer input and is not on the pre-authentication path (threat model §4.1).
  • The entry carries its reason in deny.toml, and the comment says which change removes it.

Follow-up (not in this PR): an ADR that supersedes ADR-0029's parser choice (basic-toml → toml) and its implementation, before the 0.1.0 freeze. That PR deletes this entry.

The expiry field for ignores is still "Unreleased" in cargo-deny's changelog, and CI runs cargo-deny 0.20.2 (cargo-deny-action v2.1.1), so the entry uses only { id, reason }.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that changes existing behaviour)
  • Documentation only
  • Refactor / chore / CI / build

Checklist

  • My commits are signed off under the
    Developer Certificate of Origin
    (git commit -s).
  • My commit messages follow Conventional Commits.
  • I have run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings locally, also with --target x86_64-unknown-linux-gnu for the Linux-only pidfd path. cargo test --workspace: 214 passed.
  • I have added or updated tests where appropriate. (No behaviour change. The existing PTY and exec tests cover the three call sites.)
  • I have updated documentation (rustdoc, docs/, or README.md) where appropriate. (Not applicable.)
  • I have added a CHANGELOG.md entry under ## [Unreleased] if this change is user-visible. (Not user-visible.)
  • If this change introduces a new dependency, I have justified it in the PR description and verified it passes cargo deny check. (No new dependency.)

Security considerations

Two lockfile bumps close a constant-time defect and an unsoundness. The ignore relaxes one supply-chain gate for one crate. The crate is unmaintained, not known to be vulnerable, and parses a trusted local file. cargo deny keeps failing on any other advisory. I could not run cargo-deny 0.20.2 locally, so this PR's cargo deny check is the validation. The TOML parses (tomllib).

https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp

RustSec marked basic-toml, the ADR-0029 config parser, unmaintained on
2026-09-26 (informational, no patched version). cargo deny has failed on
main since, which blocks every merge. basic-toml parses only the
operator's config file after the StrictModes checks, never peer input.
The migration to toml, under an ADR superseding ADR-0029's parser
choice, removes the entry.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:04:27.003269Z 4d2dfe2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: 291a5d98-0e84-4953-aad0-668bcd66512a)

github run

ctutils before 0.4.4 generates masks and compares u128 values in
non-constant time (crypto-failure). aes-gcm, hybrid-array,
module-lattice and universal-hash reach it. Lockfile only; 0.4.6 is the
newest Rust 1.92-compatible release.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: 10073c4f-494f-469e-8a40-3d2c5e705bac)

github run

tokio 1.51.6 deprecates the safe AsyncFd constructors, which are unsound
for a descriptor closed or replaced under a live AsyncFd, in favour of
unsafe register constructors that ADR-0018 forbids. The three uses keep
the deprecated constructor under #[allow(deprecated)]: each AsyncFd owns
its OwnedFd (the pidfd, the PTY master), which is never duplicated or
closed underneath it. The ponytail comments name the upgrade path.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2 gonzafg2 changed the title chore(deny): ignore RUSTSEC-2026-0374 until basic-toml is replaced fix(deps): clear cargo deny on main — ctutils 0.4.6, tokio 1.51.6, ignore RUSTSEC-2026-0374 Oct 28, 2026
@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: b4bf5738-b2f8-4b5c-94d5-e6d8eea2696c)

github run

@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: 6e1d2dcf-8770-4245-bea4-ccc5b99ed4b3)

github run

@gonzafg2

Copy link
Copy Markdown
Owner Author

@codex review

@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

1 similar comment
@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 79b57d9312

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

PR Review: fix(deps): clear cargo deny on main — ctutils 0.4.6, tokio 1.51.6, ignore RUSTSEC-2026-0374 (#212)

Decision: 🟡 Minor changes
Iteration: First review (Codex reviewed at `7c40cbc`, no findings; opencode failed with balance errors)
Lenses applied: Rust under `crates/`, CI (`deny.toml`)

Executive summary

Three failing `cargo deny` advisories are cleared: `ctutils` bumped to 0.4.6 patches the RUSTSEC-2026-0385 constant-time defect; `tokio` bumped to 1.51.6 patches the RUSTSEC-2026-0386 `AsyncFd` I/O-safety unsoundness; and RUSTSEC-2026-0374 (`basic-toml` unmaintained, informational) is ignored with a scoped justification. The three `#[allow(deprecated)]` marks are the correct response to the tokio API deprecation under ADR-0018's `unsafe_code = "forbid"` constraint, and the `ponytail:` comments document both the soundness argument and the upgrade path. One minor issue: the ignore entry's wording implies the `basic-toml`→`toml` migration is already decided, but the governing ADR does not yet exist.

New findings

🟡 Important (should be resolved)

[deny.toml:19–21] — forward reference to unwritten decision (confidence: 82)

Problem: The comment ("The migration to `toml`, under an ADR superseding ADR-0029's parser choice, removes this entry") and the `reason` field ("replaced under an ADR superseding ADR-0029's parser choice") present the parser migration as a settled decision. No ADR superseding ADR-0029's `basic-toml` choice exists in `docs/adr/`. CLAUDE.md's "What not to do" section requires planned work to be marked TBD rather than referenced as existing; the driving ADR is tracked but not yet written (issue #213).

Fix: Soften the wording to mark the migration as planned/TBD and reference the tracking issue. See the inline suggestion on `deny.toml`.

Anchor: CLAUDE.md — "Do not reference files or paths that do not exist yet as if they do; mark planned work (Phase 2+) as TBD, as the forward-looking ADRs do."

Code in question:

quantumssh/deny.toml

Lines 16 to 22 in 7c40cbc

# `basic-toml` (the ADR-0029 config parser) is archived and
# unmaintained: an informational advisory, no known vulnerability. It
# parses only the operator's config file, after the StrictModes
# checks, never peer input. The migration to `toml`, under an ADR
# superseding ADR-0029's parser choice, removes this entry.
{ id = "RUSTSEC-2026-0374", reason = "basic-toml unmaintained; config-file parser only, replaced under an ADR superseding ADR-0029's parser choice" },
]


🤖 Generated with Claude Code

Comment thread deny.toml Resolved
The ignore's comment and reason presented the toml migration as decided.
ADR-0044 is still Proposed in #213, so both now say TBD and point at it.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

Copy link
Copy Markdown
Owner Author

@codex review

@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: 4534e5a6-743d-4b2a-ae72-b5dff80e51bd)

github run

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 4d2dfe2815

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gonzafg2
gonzafg2 merged commit 78b8985 into main Oct 28, 2026
12 of 13 checks passed
gonzafg2 added a commit that referenced this pull request Oct 28, 2026
…e config parser (Proposed)

RUSTSEC-2026-0374 marks basic-toml unmaintained, and cargo deny fails on
main because of it (#212 is the stopgap ignore). ADR-0044 supersedes
ADR-0029's parser-crate bullet: toml 1.1.8 with std, serde and parse
only, so the recursion limit stays in force, five crates in and one out,
and a single-line schema_error built from message() and span(), with no
file excerpt.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Oct 28, 2026
…e config parser (Proposed) (#213)

* docs(adr): ADR-0044 — toml replaces the unmaintained basic-toml as the config parser (Proposed)

RUSTSEC-2026-0374 marks basic-toml unmaintained, and cargo deny fails on
main because of it (#212 is the stopgap ignore). ADR-0044 supersedes
ADR-0029's parser-crate bullet: toml 1.1.8 with std, serde and parse
only, so the recursion limit stays in force, five crates in and one out,
and a single-line schema_error built from message() and span(), with no
file excerpt.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* docs(adr): ADR-0044 — the message may quote the offending key or value

Only the multi-line file excerpt is kept out of the log. serde's message
text still names the key or value at fault, as basic-toml's did, and the
config holds no key material.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* docs(adr): ADR-0044 — recursion bound is this ADR's, allocation is not claimed

The third requirement was not ADR-0029's, and only its recursion half
holds: config::load reads the whole file with read_to_string, which
RFC-0010 allows for the operator's own file. The Context now says so.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Oct 28, 2026
ml-kem 0.3.3 moves its sha3 dependency from 0.11.0 to 0.12.0, which
brings in shake 0.1.0 and sponge-cursor 0.1.0. Both are RustCrypto
crates licensed Apache-2.0 OR MIT, the same pair ADR-0035 records for
ml-dsa. Both bumps are patch releases within ADR-0019's and RFC-0003's
caret requirements. The kex tests (FIPS 203 key validation, the hybrid
exchange) pass, and the openssh-interop gate drives ML-KEM end to end.
Same lockfile as #209, without its tokio bump, which #212 already
landed. Supersedes #209.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Oct 28, 2026
#211) (#215)

* ci(deps): bump dtolnay/rust-toolchain to 683b588

From e2a55d2. 683b588 is the current master HEAD, so the pin stays within master history as ADR-0039 requires. Supersedes #205.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* ci(deps): bump Swatinem/rust-cache from 2.9.2 to 2.9.3

d1527c8 is the commit tag v2.9.3 points to. Supersedes #211.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* ci(deps): bump anthropics/claude-code-action from 1.0.248 to 1.0.261

16f9f71 is the commit tag v1.0.261 points to. Supersedes #210.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* chore(deps): bump rust-toolchain from 1.99.0 to 1.99.1

A patch release on the exact pin ADR-0039 sets. Supersedes #208.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* chore(deps): ml-kem 0.3.3 and sha2 0.11.1

ml-kem 0.3.3 moves its sha3 dependency from 0.11.0 to 0.12.0, which
brings in shake 0.1.0 and sponge-cursor 0.1.0. Both are RustCrypto
crates licensed Apache-2.0 OR MIT, the same pair ADR-0035 records for
ml-dsa. Both bumps are patch releases within ADR-0019's and RFC-0003's
caret requirements. The kex tests (FIPS 203 key validation, the hybrid
exchange) pass, and the openssh-interop gate drives ML-KEM end to end.
Same lockfile as #209, without its tokio bump, which #212 already
landed. Supersedes #209.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2
gonzafg2 deleted the chore/deny-ignore-basic-toml branch December 1, 2026 20:13
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