Public internet UDP service exposed on a port (commonly 443). Likely threats:
- Handshake floods / connection churn (CPU exhaustion)
- Session floods (memory exhaustion)
- Stream-open floods (state explosion)
- Slow-read / never-read (buffer bloat)
- Datagram bursts (event loop / JS callback storms)
- Malformed / adversarial traffic triggering panics
- Safe defaults
- TLS verification enabled by default for client.
insecureSkipVerifyrequires explicittls.insecureSkipVerify: true; emits warning log when used. Dev only — never use in production.- Native diagnostics are redacted by default (log payload/message/session metadata and panic details).
Use
createServer({ debug: true, ... })only in trusted dev/debug environments to opt in to richer diagnostics. Sensitive identifiers (session/peer metadata) remain redacted by design.
- Bounded resources
- All buffering is bounded and accounted for.
- There is always a cap that prevents unbounded memory growth.
- Graceful shedding
- When overloaded, reject new handshakes/sessions/streams first.
- If a client is abusive, close that client before impacting others.
- Timeouts
- handshakeTimeoutMs (default 10s)
- idleTimeoutMs (default 60s)
- backpressureTimeoutMs (default 5s)
- Limits
- maxSessions, maxHandshakesInFlight
- max streams per session and global
- maxQueuedBytes global/per-session/per-stream
- maxDatagramSize cap
- Rate limits per peer IP and per prefix
- RateLimitOptions: per-IP handshakesBurst, per-prefix handshakesBurstPerPrefix (/24 IPv4, /64 IPv6)
- Connection churn protection
- maxHandshakesInFlight caps concurrent TLS handshakes (default 200)
- Per-IP and per-prefix limits prevent single-source exhaustion
- Panic containment
- Rust panics must be caught at task boundaries where possible
- convert to E_INTERNAL and close affected session/server
- Run behind a UDP-capable firewall with explicit allow rules.
- Monitor:
- rateLimitedCount
- limitExceededCount
- datagramsDropped
- queuedBytesGlobal
- backpressureTimeoutCount
- If queuedBytesGlobal approaches cap:
- decrease per-session limits
- decrease stream highWaterMarks
- enable datagram drop policy (optional)
- scale horizontally
- Pin wtransport + transitive QUIC/H3 dependencies (see Cargo.lock).
- Monthly dependency update cadence; security patches applied promptly.
- Respond to CVEs quickly; publish security advisories if needed.
- Report vulnerabilities via GitHub Security Advisories or a dedicated contact (see CONTRIBUTING).
- CodeQL and Trivy findings are triaged in PRs;
CRITICAL/HIGHare blocking by default. - P3.2: Release workflow runs security gates (cargo audit, Trivy fs + lib, CodeQL) before build; release is blocked on any CRITICAL/HIGH finding.
- Any suppression must include:
- clear justification,
- scope (exact package/path/CVE),
- expiration/revisit date.
- Suppressions should be minimal and temporary; broad/global ignores are not allowed.
- When a finding is accepted temporarily, track it in an issue with owner + target fix release.