Skip to content

feat(config): TOML configuration file v1 with StrictModes startup checks - #128

Merged
gonzafg2 merged 3 commits into
mainfrom
feat/config-toml-v1
Jul 19, 2026
Merged

gonzafg2 merged 3 commits into
mainfrom
feat/config-toml-v1

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

What

The keystone Phase-2 workstream (#109): implements RFC-0010 exactly as ADR-0029 locks it. On merge, ADR-0029 flips to Accepted per the #86 pattern.

  • config.rs (new, in the binary crate per ADR-0017/ADR-0029): schema v1 as serde structs, deny_unknown_fields on the root document struct and every section — a premature [limits]/[session] refuses to start with schema_error (never boots ignored), schema_version mandatory (only 1 accepted), durations as integer seconds.
  • StrictModes: canonicalise first (symlink bypass — the docs(adr): ADR-0029 — config file v1: schema, parser crate, StrictModes checks #127 review finding), then file predicates + ancestor writability walk over rustix::fs::stat. Failed predicate → insecure_permissions; check-couldn't-run → file_unavailable. Applies to host key and authorized_keys whether named by flag or config.
  • main.rs: --config, CLI > config > default merge (each override logged at info), config loads before the subscriber so [logging] format can decide the format while failures still reach server.config_error.
  • Dependencies: basic-toml (the one new lockfile crate, per ADR-0029) + serde derive; rustix gains fs on the existing pin. cargo deny gates it in CI.
  • Interop harness: workdir moves /tmp → target/ — StrictModes now correctly refuses the world-writable /tmp ancestor.

Verification

  • 151 workspace tests (19 new): fail-closed schema cases (unknown root section, unknown key, type mismatch, missing/newer schema_version), exhaustive pure permission predicates, and an e2e walk over the real filesystem including the symlink-to-dirty-dir case.
  • cargo fmt + clippy -D warnings clean, release build ok.
  • Local interop gate: PASS against OpenSSH 10.2 (all five checks) with StrictModes active.
  • Manual config smoke against the release binary: boots entirely from a TOML file (no flags); premature [limits] → schema_error: … unknown field \limits` … at line 2 column 1; a 0644host key →insecure_permissions: … group/world-readable private key (mode 0644)`.

Behaviour change (deliberate, ADR-0029 §Negative)

Flag-only deployments with sloppy modes (world-readable host key, group-writable authorized_keys, or either under /tmp) now refuse to start with a message naming the file and predicate. This is the threat-model §4.2/§5.5.3 posture finally enforced.

Implements RFC-0010 / ADR-0029. Refs #109.

https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa

Implements RFC-0010 via ADR-0029:

- crates/quantumssh/src/config.rs (new): schema v1 (schema_version,
  [server], [auth], [logging]) as serde structs with
  deny_unknown_fields on the root document struct and every section —
  a premature deferred section ([limits], [session]) refuses to start
  with schema_error, never boots ignored. schema_version is mandatory
  and only 1 is accepted (version_unsupported otherwise); durations
  are integer seconds.
- StrictModes: trusted paths are canonicalised first (symlink bypass),
  then the file predicates (not group/world-writable; owner root or
  process uid; host key additionally not group/world-readable) and the
  ancestor writability walk run over the canonical path via
  rustix::fs::stat. A failed predicate is insecure_permissions; a
  check that cannot run is file_unavailable — never conflated.
- main.rs: --config flag; CLI > config > default merge with the
  override logged at info per key; the config loads before the
  subscriber exists so its [logging] format can decide the format,
  and config failures still reach server.config_error. StrictModes
  now applies to the host key and authorized_keys whether the path
  came from a flag or the config (ADR-0029).
- Dependencies: basic-toml (one new crate in the lockfile) + serde
  derive; rustix gains the fs feature on the existing pin.
- tests/interop: the workdir moves from /tmp (world-writable ancestor
  — StrictModes now correctly refuses it) to target/.

Verification: 151 workspace tests (19 new: schema fail-closed cases,
exhaustive pure predicates, e2e walk incl. the symlink case), clippy
-D warnings clean, local interop gate PASS against OpenSSH 10.2, and
a manual config smoke: boots from file alone, premature [limits]
refuses with key+line, 0644 host key refuses with the predicate.

Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa
Signed-off-by: Gonzalo Fleming <[email protected]>
Copilot AI review requested due to automatic review settings July 19, 2026 22:02
@gonzafg2 gonzafg2 added the enhancement New feature or request label Jul 19, 2026
@opencode-agent

Copy link
Copy Markdown

Review: feat(config): TOML configuration file v1 with StrictModes startup checks

Classification: Rust under crates/ — applied the hard security rules from CLAUDE.md.

Verdict: APPROVE. The implementation faithfully executes ADR-0029 and RFC-0010 with correct fail-closed posture. No regressions against any of the five MANIFIESTO commitments. Tests pass, fmt + clippy are clean.


Positive findings (design soundness)

  1. Symlink bypass correctly handled — check_trusted_file canonicalises (std::fs::canonicalize) before walking ancestors, and the e2e_symlink_is_checked_against_the_target_chain test validates the exact docs(adr): ADR-0029 — config file v1: schema, parser crate, StrictModes checks #127 review finding: a clean-looking symlink to a file in a group-writable directory correctly fails. This matches OpenSSH's secure_filename() pattern.

  2. Double deny_unknown_fields is correct — placed on both ConfigFile (root) AND every section struct (ServerSection, AuthSection, LoggingSection). Serde's deny_unknown_fields is per-container; root-only coverage would silently ignore an unknown section like [limits]. The test unknown_root_section_is_schema_error validates this guarantee.

  3. Config-then-subscriber ordering is correct — load_config_file runs before init_logging, so [logging] format can select JSON/human. If the config fails, the subscriber is still instantiated (with CLI-or-TTY format) before the error is logged, so server.config_error is always reachable. This is faithful to RFC-0010 §Failure modes.

  4. StrictModes applies to flags AND config — Both load_host_key and load_authorized_keys now run check_trusted_file regardless of whether the path came from --flag or TOML. The threat-model §4.2/§4.4/§5.5.3 obligations attach to the files, not to how they were named.

  5. Dependency delta is the minimum — one new crate (basic-toml, MIT OR Apache-2.0, passes deny.toml), serde_derive was already in the lockfile via tracing-subscriber, and rustix gains only the fs feature on its existing workspace pin. ADR-0029's alternatives section explicitly justifies basic-toml over the full toml crate (no winnow/indexmap/toml_datetime).


No blocking findings

All five MANIFIESTO commitments are satisfied:

All hard security rules from CLAUDE.md are met:

  • Config is off the pre-auth surface (§4.1), loaded synchronously at startup.
  • Fail-closed on every failure path: schema_error, version_unsupported, insecure_permissions, file_unavailable.
  • Host key PEM remains Zeroizing-wrapped; no key material in ConfigError::Display.
  • All errors routed through server.config_error per ADR-0024.
  • Transport type-state machine untouched.

CLI-breaking change is deliberate and documented: flag-only deployments with sloppy modes (world-readable host key, group-writable authorized_keys, files under /tmp) now refuse to start. ADR-0029 §Negative and the PR body both call this out as threat-model §4.2/§5.5.3 enforcement.

github run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Implements Phase-2 TOML configuration file schema v1 and StrictModes startup checks in the quantumssh binary crate, wiring config loading into startup with CLI > config > default precedence and updating interop harnessing to satisfy ancestor-directory permission checks.

Changes:

  • Added TOML config schema v1 parsing/loading with fail-closed deny_unknown_fields, mandatory schema_version, and StrictModes (stat + ancestor writability walk).
  • Updated main.rs to support --config, resolve precedence, and apply StrictModes to config/host key/authorized_keys paths before reading.
  • Moved interop workdir under target/ to avoid /tmp ancestor permission rejection; added new dependencies (basic-toml, serde, rustix fs).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/interop/run_openssh_client.sh Moves interop workdir under target/ to satisfy StrictModes ancestor checks.
crates/quantumssh/src/main.rs Adds --config, config load + precedence resolution, StrictModes application, and override logging.
crates/quantumssh/src/config.rs New module: schema v1 structs + parsing, error classification, and StrictModes implementation with tests.
crates/quantumssh/Cargo.toml Adds binary-crate deps for config parsing and StrictModes checks.
Cargo.toml Adds workspace deps for serde + basic-toml and enables rustix fs feature.
Cargo.lock Records the new basic-toml dependency and serde_derive usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/quantumssh/src/main.rs Resolved
Comment thread crates/quantumssh/src/main.rs Resolved
Comment thread crates/quantumssh/src/main.rs Resolved
Comment thread crates/quantumssh/src/main.rs Resolved
Comment thread crates/quantumssh/src/config.rs Resolved
Comment thread crates/quantumssh/src/config.rs Resolved
Comment thread tests/interop/run_openssh_client.sh Resolved
@gonzafg2 gonzafg2 self-assigned this Jul 19, 2026
Copilot review on #128: check_trusted_file now returns the canonical
path and every caller reads from it — the checked file is the read
file even when the configured name is a symlink, narrowing the
symlink-retarget window (the residual stat-to-open race stays within
the ADR-0029 best-effort stance). Also: the override log field is
explicitly Display-recorded, and the interop harness strips group/world
write from target/ for umask-002 environments.

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

Copy link
Copy Markdown

Review: feat(config): TOML configuration file v1 with StrictModes startup checks

Classification: Rust under crates/ — applied the hard security rules from CLAUDE.md.

Verdict: APPROVE with two convention-level findings. The implementation faithfully executes ADR-0029 and RFC-0010 with correct fail-closed posture. All five MANIFIESTO commitments are satisfied, all threat-model rules are met, and all five security rules from CLAUDE.md hold. 151 tests pass, fmt + clippy + release build clean.


Findings

1. Missing #[must_use] on public value-returning functions — config.rs:111, config.rs:130, config.rs:191

AGENTS.md states: "Every public function is #[must_use] when it returns a value (even constructors)." The quantumssh-core library enforces this consistently (26 instances), but the three new public functions in the binary crate — parse, load, and check_trusted_file — all return Result<…, ConfigError> without #[must_use]. The callers in main.rs do consume the results, but the annotation would prevent a silent ignore in future callers.

2. Missing # Errors sections on fallible public functions — config.rs:111, config.rs:130, config.rs:191

AGENTS.md states: "Every fallible function has an # Errors section in its doc comment." parse, load, and check_trusted_file all return Result but lack # Errors doc sections describing which ConfigError variants each can produce.

Both are convention-level, not security-level — the code itself is correct and fail-closed on all paths.


Positive design findings (confirms the copilot review)

  • Double deny_unknown_fields is correct — on both ConfigFile and every section struct, so a premature [limits] table is a schema_error, never silently ignored.
  • Canonical-path return from check_trusted_file — the f3a7037 fix means all three callers (load_config_file, load_host_key, load_authorized_keys) read the checked canonical path, closing the symlink-TOCTOU window the copilot identified. The residual stat-to-open race matches OpenSSH's secure_filename() stance (ADR-0029 §Decision).
  • Config-before-subscriber ordering — load_config_file runs first so [logging] format can select JSON/human, and on config failure the subscriber is still initialized with the CLI/TTY fallback before server.config_error fires (RFC-0010 §Failure modes).
  • StrictModes applies uniformly — whether a path came from --flag or TOML, check_trusted_file runs. The threat-model §4.2/§4.4/§5.5.3 obligations attach to the files, not the naming mechanism.
  • Dependency delta is the minimum — basic-toml (MIT OR Apache-2.0) is justified in ADR-0029's alternatives section. serde + rustix were already in the tree; only feature flags changed.

MANIFIESTO commitments check

# Commitment Status
1 Memory-safe by construction — no first-party unsafe PASS
2 PQ by default — no KEX-algorithm config key; transport untouched PASS
3 Zero legacy — no new crypto or legacy protocol surfaces PASS
4 Small surface — one new crate, fully justified in ADR-0029 PASS
5 Permanently open — basic-toml is MIT OR Apache-2.0, in deny.toml allow-list PASS

Threat-model rules check

Rule Source Status
Pre-auth path — config loaded synchronously at startup, not on wire §4.1 PASS
Fail closed — every failure is server.config_error + ExitCode::FAILURE §4.1 PASS
Key material zeroized — host key PEM is Zeroizing-wrapped §4.3 PASS
Config integrity via StrictModes — file + ancestor walk over canonical path §4.2, §4.4 PASS
Host key confidentiality — TrustedClass::Secret rejects READ_OTHERS §5.5.3 PASS
Transport type-state machine — untouched RFC-0003 PASS
AEAD-only — MAC path unchanged ADR-0021 PASS
Audit log fields — server.config_error preserves ADR-0024 schema ADR-0024 PASS

github run

@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Code review

1 issue found.


docs/adr/0029-phase-2-config-file-v1-schema-parser-strictmodes.md — Status must be flipped to Accepted

Rule: CLAUDE.md establishes the governance pattern: ADR Status is the one mutable field (per ADR-0015), and it must be updated when an implementing milestone merges — the Phase-1 ADRs were all flipped this way in #86.

Finding: ADR-0029 line 3 currently reads:

**Status:** Proposed

and line 4 reads:

**Date:** TBD (advances to Accepted when the implementing PR merges)

PR #128 is unambiguously the implementing PR — every struct, predicate, precedence rule, and dependency named in ADR-0029's Decision section is present in the merged config.rs/main.rs. The ADR's own lifecycle clause is triggered by this merge, but the Status field was not updated.

Fix: Before merge, add docs/adr/0029-phase-2-config-file-v1-schema-parser-strictmodes.md to this PR and change:

**Status:** Proposed
**Date:** TBD (advances to Accepted when the implementing PR merges)

to:

**Status:** Accepted
**Date:** 2026-07-19

No other issues found. Checked for: memory safety (unsafe-free), post-quantum default (no second KEX or downgrade path), zero legacy (no disallowed primitives), fail-closed negotiation, type-state transport integrity, key-material zeroization/non-logging, ADR-0024 log schema on exec.* events, new dependency justification and licensing, and Conventional Commits format.

claude-review on #128: this PR implements every decision ADR-0029
records, which triggers the ADR's own lifecycle clause. Flipping the
Status inside the implementing PR makes the state atomic at merge —
no dangling Proposed awaiting a sweep, unlike the Phase-1 batch that
needed #86.

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

Copy link
Copy Markdown
Owner Author

Re the claude-review finding — adopted in 2ae38ae: ADR-0029 flips to Accepted, dated 2026-07-19 with a pointer to this PR, inside the implementing PR so the state is atomic at merge (an improvement over the Phase-1 pattern, where the Proposed→Accepted flips waited for the #86 sweep).

@opencode-agent

Copy link
Copy Markdown

Review: feat(config): TOML configuration file v1 with StrictModes startup checks

Classification: Rust under crates/ + ADR doc + CI harness. Applied CLAUDE.md hard security rules.

Verdict: APPROVE. The implementation is correct and fails-closed on every path. All five MANIFIESTO commitments hold. No security findings. One convention-level finding below.


Finding: Missing # Errors doc sections on public fallible functions

Rule: AGENTS.md — "Every fallible function has an # Errors section in its doc comment."

config.rs:111 (parse), config.rs:130 (load), and config.rs:191 (check_trusted_file) are all public, return Result<…, ConfigError>, and lack # Errors sections describing which ConfigError variants each can produce. The prior opencode-agent review flagged this and it was not addressed in the subsequent commits. Every public fallible function in quantumssh-core carries one (43 instances in the library), so the binary crate should follow suit.

Severity: Convention-level, not security. The error types and control flow are correct.


On the #[must_use] rebuttal

The author rebutted the #[must_use] finding (from both copilot and opencode-agent) with the claim that "quantumssh-core applies #[must_use] only to plain-value returns… never to Result-returning fns." This is factually wrong — auth.rs:176 (AuthorizedKeys::load) and auth.rs:322 (verify_auth_signature) both return Result and carry #[must_use] + #[allow(clippy::double_must_use)]. The library is inconsistent on this point (most other Result-returning fns omit it), so the config.rs omission is not a blocking concern, but the justification offered in the rebuttal should not be treated as settled.


Security posture — confirmed

All threat-model rules verified:

Rule Source Status
Config loaded synchronously at startup, never on pre-auth surface §4.1 PASS
Fail closed — every error path routes to server.config_error + exit §4.1 PASS
Double deny_unknown_fields (root + section structs) prevents silent ignore of unknown sections ADR-0029 §Decision PASS
Canonical-path-return from check_trusted_file closes symlink-TOCTOU (#127) ADR-0029 §Decision PASS
StrictModes applied to both --flag and TOML-named files Threat model §4.2/§4.4/§5.5.3 PASS
Host key PEM remains Zeroizing-wrapped Threat model §4.3 PASS
basic-toml (MIT OR Apache-2.0) is in deny.toml license allow-list MANIFIESTO #4/#5 PASS
Interop harness chmod go-w target prevents group-writable ancestor under umask 002 #127 review finding PASS
ADR-0029 Status flipped to Accepted, dated 2026-07-19, referencing this PR ADR-0015 PASS

github run

@gonzafg2
gonzafg2 merged commit e54e03c into main Jul 19, 2026
11 checks passed
@gonzafg2
gonzafg2 deleted the feat/config-toml-v1 branch July 19, 2026 23:19
gonzafg2 added a commit that referenced this pull request Jul 19, 2026
The #128 pattern: this PR implements every ADR-0028 decision, so the
Status flips atomically with the merge.

Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa
Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Jul 20, 2026
…utdown (#129)

* feat(runtime): concurrent accept loop, admission control, graceful shutdown

Implements ADR-0028 (extends ADR-0022; the Phase-1 spawn-and-join
becomes a JoinSet-driven concurrent loop):

- crates/quantumssh-core/src/admission.rs (new): the four admission
  checks in the ADR's load-shedding order — three non-mutating cap
  reads (global 256, half-open 100, per-source 10; IPv6 by /64), the
  state-mutating token bucket last (burst 10, 1/s) so a cap refusal
  never grows the per-source map. RAII ConnectionGuard: global slot
  for the connection's life, half-open slot until userauth success;
  drop-time prune plus an amortised sweep bound the source map.
- server.rs: select! over accept / join_next_with_id / the shutdown
  broadcast. Refused connections close pre-banner and emit
  connection.refused (limit as structured field) inside the
  connection span, mutually exclusive with connection.accepted.
  Panic JoinErrors log connection.closed with the reason as a
  structured field and the peer recovered via task id.
- Graceful shutdown: the broadcast carries the drain deadline;
  pre-auth connections disconnect immediately, channel-phase
  connections run until the deadline and are then cancelled — the
  ADR-0023 backstops (owned-Child kill, exec.finished drop-guard)
  fire on the drop. The loop aborts stragglers 2 s past the deadline;
  a second signal aborts immediately. Drained shutdown returns Ok.
- main.rs: sync main building the runtime with max_blocking_threads
  = 4 x max_connections (ADR-0028 blocking-pool sizing); SIGTERM/
  SIGINT listener drives the broadcast; exit 0 on both paths.
- config: [limits] section and [server].drain_timeout (integer
  seconds), config-file-only per RFC-0010; zero values are
  schema_error. [limits] graduates from the deferred-section list.
- tokio binary features: +signal, +sync, +time (signal is the only
  addition to the workspace allowlist, per the ADR).

Verification: 168 workspace tests (17 new: admission unit incl.
sweep/prune/IPv6-/64/remainder-accrual, schema, and 6 integration:
concurrency, cap and rate refusals pre-banner, pre-auth immediate
disconnect, drain-at-deadline). Clippy -D warnings clean. Interop
gate PASS. Live smoke: two overlapping OpenSSH sessions served
concurrently; SIGTERM with drain_timeout=3 drained a sleep-30 exec
in ~4 s, exit 0, connection.closed reasons correct.

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

* docs(adr): flip ADR-0028 to Accepted with its implementing PR

The #128 pattern: this PR implements every ADR-0028 decision, so the
Status flips atomically with the merge.

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

* fix(admission): sweep only in the mutating phase, never on the refusal path

claude-review on #129: the amortised sweep ran at the top of
try_admit, so every cap-refused call advanced the counter and every
64th paid an O(sources) retain under the admission mutex —
contradicting the load-shedding order the ADR fixes (refusals stay
read-only) and the counter's own name. The sweep now sits after the
three cap checks, in the mutating phase: a cap-refused flood never
advances it nor pays it. New test pins the invariant: a saturated-cap
refusal flood past 2x SWEEP_INTERVAL leaves a prunable lingering
entry untouched.

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

* fix(server): emit connection.closed per ADR-0024 on join errors

Re-enter the original connection span so peer_addr is inherited, keep
only reason on the event at INFO, and use ADR-0028's shutdown reason
for drain aborts.

Signed-off-by: Gonzalo Fleming <[email protected]>

* fix(channel): re-key before close when a threshold was crossed while draining

A fast exec could flush past the byte/packet limit and become ready to
close in the same turn; rekey_due was only checked in Running/Idle, so
the connection closed under the old keys and byte_threshold_triggers
_server_rekey flaked on loaded runners.

Signed-off-by: Gonzalo Fleming <[email protected]>

* fix(server): emit connection.refused at INFO

Align with ADR-0024's connection lifecycle levels; a cap refusal is
routine load-shedding, not a security-policy failure.

Signed-off-by: Gonzalo Fleming <[email protected]>

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Jul 20, 2026
Point README and the Phase-2 scoping note at #128 (config) and #129
(runtime) so "implemented" is verifiable without relying on stale
RFC implementation-PR headers.

Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Jul 20, 2026
* docs: align README and Phase-2 scoping with landed Phase 1/2 work

Phase 1 is complete; Phase 2 has config + concurrent runtime. Drop the
stale "no Rust code" status and mark the remaining Usable items.

Signed-off-by: Gonzalo Fleming <[email protected]>

* docs: cite implementing PRs for landed Phase-2 workstreams

Point README and the Phase-2 scoping note at #128 (config) and #129
(runtime) so "implemented" is verifiable without relying on stale
RFC implementation-PR headers.

Signed-off-by: Gonzalo Fleming <[email protected]>

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Oct 11, 2026
Flips Status to Accepted inside the implementing PR (repo pattern since
#128), points Links/Decision at #179, and historicises the three
drafting-time phrasings (table header, advisory sentence, ADR-0035
availability).

Refs #109

Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW
Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Oct 11, 2026
…-dalek 5) (#179)

* docs(adr): ADR-0036 — move ed25519-dalek and x25519-dalek to 3.x together (Proposed)

The coordinated bump the #109 comment of 2026-07-18 deferred, subsidiary
to RFC-0003. Evaluates the four points that comment asked for: API
(ed25519-dalek 3 drops std; no first-party code change needed), zeroize
and static_secrets (kept; x25519 secrets now erase on drop only), MSRV
(1.85, below the workspace's 1.92), and maturity/audit (no advisory on
either line; Verus coverage applies to curve25519-dalek 4.1.3, not 5.0;
no known public audit of 5.0/3.0).

States the value plainly: no vulnerability fixed; Cargo.lock 102 -> 88,
no duplicated crates in quantumssh-core, signature 3 aligned with
ADR-0035's ml-dsa. Records that the dalek crates are BSD-3-Clause
(RFC-0003 says Apache-2.0 or MIT; deny.toml allows BSD-3-Clause).

Refs #109

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

* fix(deps): declare zeroize's alloc feature explicitly

Zeroizing<Vec<u8>> (kex.rs, auth.rs, transport.rs) and Zeroizing<String>
need zeroize's alloc feature. The workspace never declared it: it
arrives only through feature unification from ed25519-dalek's std
feature (ed25519-dalek/std -> alloc -> zeroize?/alloc and
curve25519-dalek/alloc). Dropping std from ed25519-dalek, as its 3.x
line requires, would break the build in 35 places with no code change
of ours. Declare it where it is used.

Refs #109

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

* chore(deps): move ed25519-dalek and x25519-dalek to 3.0.0 (curve25519-dalek 5)

Implements ADR-0036. ed25519-dalek drops the removed std feature and the
unused rand_core feature; x25519-dalek keeps static_secrets and zeroize.
No first-party code change.

Cargo.lock: 102 -> 88 packages; cargo tree -d -e normal -p
quantumssh-core prints nothing (was sha2, digest, rand_core,
block-buffer, crypto-common, cpufeatures in two versions each).
fmt, clippy -D warnings, test --workspace (34 + 103 + 35) and
build --release pass.

Refs #109

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

* docs(adr): ADR-0036 Accepted with the implementing PR #179

Flips Status to Accepted inside the implementing PR (repo pattern since
#128), points Links/Decision at #179, and historicises the three
drafting-time phrasings (table header, advisory sentence, ADR-0035
availability).

Refs #109

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

* docs(adr): ADR-0036 — review fixes (2.x release date, two manifest lines, present vs future controls)

claude-review on #177:
- 'The 4.x/2.x line has had no release since mid-2024' was false for
  ed25519-dalek 2.2.0 (2025-07-09); now scoped per crate.
- The diff is two manifest lines (zeroize/alloc belongs to #175).
- The Verus-loss paragraph listed Phase-3 fuzzing as a present control;
  present controls (RFC 7748 vectors, OpenSSH interop gate) are now
  separated from the future one, and the text says nothing currently
  replaces the formal guarantee.

opencode suggestions on #177 and #179:
- Refers to 'the ml-dsa ADR proposed in #174' instead of citing the
  not-yet-permanent number ADR-0035 as established.
- pkcs8/der/spki leave Cargo.lock (they are not compiled today).
- The RFC-0003 licence sentence lives in its Guide-level explanation.

Refs #109

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

* docs(adr): ADR-0036 — review fixes (2.x release date, two manifest lines, present vs future controls)

claude-review on #177:
- 'The 4.x/2.x line has had no release since mid-2024' was false for
  ed25519-dalek 2.2.0 (2025-07-09); now scoped per crate.
- The diff is two manifest lines (zeroize/alloc belongs to #175).
- The Verus-loss paragraph listed Phase-3 fuzzing as a present control;
  present controls (RFC 7748 vectors, OpenSSH interop gate) are now
  separated from the future one, and the text says nothing currently
  replaces the formal guarantee.

opencode suggestions on #177 and #179:
- Refers to 'the ml-dsa ADR proposed in #174' instead of citing the
  not-yet-permanent number ADR-0035 as established.
- pkcs8/der/spki leave Cargo.lock (they are not compiled today).
- The RFC-0003 licence sentence lives in its Guide-level explanation.

Refs #109

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

* docs(adr): ADR-0036 — ed25519-dalek 3's runtime vs optional/dev dependencies

opencode review #2 suggestion on #177: getrandom 0.4 is a dev-dependency
of ed25519-dalek 3.0.0, and rand_core 0.10 and signature 3 are optional
there (signature 3 still enters through ed25519 3, a normal dependency).
The API bullet now names the runtime moves only. Verified against the
crates.io dependency metadata of ed25519-dalek 3.0.0 and ed25519 3.0.0.

Refs #109

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

* docs(adr): ADR-0036 — yanked 4.2.0 and licence cell wording

opencode suggestions on #177 (review #3) and #179 (review #2):
- curve25519-dalek 4.2.0 was published 2025-07-09 and yanked; both
  maintenance statements now say 'no usable 4.x release since
  2024-06-18' and name it (verified on crates.io).
- The licence cell said 'all six' with no referent; it now says 'all
  three crates'.

Refs #109

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

* docs(adr): ADR-0036 — cite RFC-0003's Guide-level explanation for the primitive stack

opencode suggestion on #179 (review #3): RFC-0003 section 'Operational
dependencies of this decision' only lists four follow-up ADRs and never
mentions the dalek crates; the primitive stack (with x25519-dalek and
ed25519-dalek) is in its Guide-level explanation. Related and Links now
point there, consistent with the licence note.

Refs #109

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

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Oct 29, 2026
…ates (#219)

CLAUDE.md's status paragraph listed "no config file" among the missing
production features, but the config file landed with #128 (ADR-0029). The
remaining gap it names is per-user privilege separation, until Phase 3
(threat model §8.12). The ADR-0024 and ADR-0038 errata entries added by
#196 were dated 2026-10-26, from the draft, while #196 merged on
2026-10-28.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp

Signed-off-by: Gonzalo Fleming <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants