Skip to content

Wayfinder map: 2026-07-09 audit → phase-ready security specs #24

Closed
10 of 10 issues completed
Closed

Description

@tonibergholm

Destination

Every finding of the 2026-07-09 security audit (two Highs, one Medium, three known boundaries) has a locked decision — address now, or defer with recorded rationale — and the addressed ones are shaped into ordered, phase-ready spec issues (P31+) for the existing phase-process delivery loop. Planning only, with one Notes-sanctioned exception below.

Notes

  • Calibration: pre-1.0 hygiene — no live production deployments or real committed secrets today. Design quality outranks urgency; "document + defer behind a reverse proxy" stays a legitimate TLS resolution.
  • Dependencies: new crates are negotiable per-ticket with recorded rationale (the bar RustCrypto/ed25519-dalek cleared), not banned and not pre-approved.
  • Defer-with-rationale is a valid resolution for any finding; it must be recorded on the ticket, not implied.
  • Execution override (one item): the CI RustSec-scan ticket is executed in-map as an AFK task — everything else is decisions only.
  • Specs are GitHub issues (repo convention, docs/agents/issue-tracker.md); the repo favors small focused phases (P28/P29 pattern). Clustering into phases is the final assembly ticket's job, blocked by all decision tickets.
  • Skills: grilling tickets use /grilling + /domain-modeling; research tickets use /research.
  • Audit reference: findings cite crates/repo/src/http_transport.rs, crates/repo/src/wire.rs, .github/workflows/ci.yml, docs/THREAT-MODEL.md. Positive checks (ref traversal, hash verification, AEAD, bounds, atomic ingest) passed; cargo test --workspace and strict clippy green at audit time.

Decisions so far

  • Research: TLS & token-confidentiality options for sc+http — all options plug into one seam with PROTOCOL_VERSION unchanged; rustls is ~14 crates with blocking I/O and TOFU; the current reverse-proxy guidance is missing the client-side leg; dep-free challenge-response closes passive token theft (with a pass-the-hash caveat); framed as R1–R4 + a staged R2+R1→R3 path for the decision ticket.
  • Decide: transport confidentiality for sc+http (audit High #1) — R3 direct: in-binary rustls sc+https:// (self-signed + TOFU, PEM optional), ring provider, quarantined in a new crates/tlsio; no interim auth hardening; P29's gate tightens so a token alone no longer justifies public plaintext; corrected two-legged proxy docs + ssh:// promotion ride along.
  • Research: std-only bounded-server patterns for the HTTP listener — a fourth gap named beyond ADR-0036's three (the aggregate pack spool is unbounded, and read-only clients reach it before EC_READONLY); not clearing the existing opening timeout is already a progress-based idle deadline under P25 chunking; git receive.maxInputSize / git-daemon 32-conn default / Go's 5ms→1s accept backoff anchor the knobs; all bounds sit below the incoming rustls wrap.
  • Decide: HTTP listener resource limits (audit High #2) — all four bounds ship: --max-connections 32 with busy-status-and-close, on-by-default 300s read+write --timeout (connection-fatal, beneath the TLS wrap), 16 GiB --max-pack-size spool cap with an 8 MiB read-only drain cap, and hardcoded Go-style accept backoff; closes ADR-0036's three boundaries plus the newly named unbounded-spool gap.
  • Task: add a RustSec advisory scan to CI (audit Medium) — executed: cargo audit via rustsec/audit-check@v2 in a new daily-cron audit.yml (PR ci: add RustSec advisory scan (cargo audit) — audit Medium (#29) #37, job proven green); advisory DB deliberately live-fetched, action pinned; lockfile clean today except the expected RUSTSEC-2026-0173 unmaintained warning.
  • Decide: convergent-equality boundary — randomized protected mode or defer — randomized mode specced now (defer rejected): fresh random DEK/nonce per seal, dual-read/randomized-write (no hard break, old ciphertext readable forever, rewrap-shaped eager tip re-seal), unchanged-detection via a local stat cache + keyed-hash fallback; accepted costs recorded (identical-edit conflicts, rewrap no longer tree-identical, cross-path dedup loss); rotate-for-paths unlocked as follow-on.
  • Decide: env-var secret exposure — fd/stdin injection or defer — deferred with rationale: a same-user adversary defeats the identity key anyway, so fd injection is accident-hygiene not attack surface; env stays the default contract forever (non-env modes need child cooperation), so the additive mode has no lock-in cost; revisit on real agent-session secret use or an observed env-leak incident class.
  • Decide: signature replay boundary — position binding or defer — re-affirmed and deferred, boundary sharpened: the snapshot id already binds full ancestry, so the residue is ref binding only (rollback/ref-swap by a hostile remote); gittuf-shaped ref attestation deferred to its own effort; revisit on the first multi-writer/hosted serve deployment; P22's re-sign-after stance kept.
  • Decide: sc+https:// cert/key provisioning & TOFU pinning UX — accept-new TOFU (loud fingerprint, mismatch always hard-fails, SC_HTTPS_FINGERPRINT pre-pin + strict mode), user-level ~/.config/sc/known_hosts pinning the SPKI SHA-256, explicit --tls per listener with rcgen auto-mint into persistent .sc/serve-tls/, fingerprint in the serve banner + sc serve fingerprint.
  • Assemble & order the phase specs — three ordered ready-for-agent specs: P31: HTTP listener resource limits (also carries both defer re-affirmation THREAT-MODEL wordings), P32: in-binary TLS — sc+https:// via rustls (dependency-wired on P31), P33: randomized protected-path encryption. Destination reached — all six audit findings dispositioned: two Highs specced, Medium executed (live on main), one boundary specced, two deferred with rationale.

Not yet specified

(none — the route is fully walked)

Out of scope

  • Implementing any fix other than the CI advisory scan — fixes land via the phase specs this map produces.
  • Security work beyond the six audit findings (e.g., hosted-git bridge hardening, the P25 frame-length hostile-peer note already tracked on ROADMAP).
  • Redrawing already-accepted P28/P29 boundaries except where an audit finding names them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:mapWayfinder shared map (index issue)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions