mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
* docs: add bug-detection improvements plan
Plan for mechanical bug detection alongside the agentic hunt: activate the 14
unused Go fuzz harnesses, the configured-but-never-run Stryker setup, and
browser-mode vitest; encode recurring bug classes as semgrep rules; add
model-based and fault-injected ordering tests; add a persistent seen-ledger
and sibling-sweep lens to the hunt.
All local-only and on demand - fuzz crashers are working reproducers, and this
repo is public.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* build: add make fuzz target and ignore mutation-test output
`go test ./...` runs each Fuzz* function against its committed seed corpus
only - one pass per seed, zero generated inputs - so the 17 fuzz harnesses in
Server/ have never actually fuzzed. `make fuzz` enumerates every target and
runs each with a time budget (Go fuzzes one target per package per
invocation, hence the loop). Local-only by design: a crasher is a working
reproducer and this repo is public.
Also gitignore Client/tauri-client/.stryker-tmp/ and reports/ - a Stryker run
left 200+ untracked files, and a surviving-mutant report maps exactly which
behaviour nothing tests.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test(client): pin reconnect auth-frame and replay-dedup arming
Stryker found 14 surviving mutants across ws.ts:413/422/428 - the auth frame
built on reconnect. Every condition there could be flipped with all 4777
tests still green: the replay-dedup arming guard, the resume-vs-fresh-connect
ternary, and the conditional active_channel_id spread.
Seven tests through the public send/isReplaying surface, no new exports. Two
isolate each half of the `reconnectAttempt > 0 && lastSeq > 0` AND condition -
the combination no existing test reached, and the one an && -> || mutant
walked straight through.
Verified by flipping the line 413 guard to `if (true)`: 3 of 7 fail, revert
restores green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: record two fuzz corpus traps
Interrupting a fuzz run manufactures a false crasher: Go cannot distinguish a
worker that crashed on an input from one killed externally, so it saves the
in-flight input to testdata/fuzz/ as a suspect. It looks exactly like a real
security finding. Replay before believing it.
And committed seed corpus shares the testdata/fuzz/<Target>/ directory with
any false crasher, so clearing one by removing the directory deletes the
seeds too.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(client): enforce three prose invariants as ESLint rules
CLAUDE.md documents the voice-supersession, E2EE staleness and dispatcher
invariants in English. English fails no build, and bug hunts keep rediscovering
the same classes. Five rules encode them as an inline flat-config plugin - no
new dependency, and `npx eslint src/` is already a blocking CI gate.
- no-leave-voice-when-superseded: a global leaveVoice() inside a branch that
already confirmed supersession tears down the newer live session
- e2ee-epoch-needs-keypair-check: a non-key-holder never bumps the epoch, so
an epoch-only staleness guard cannot see a restarted session
- e2ee-verified-status-literal: keeps "verified" tied to a hand-written call
site that earned it, never a computed status
- no-identity-scope-fallback: a `?? 0` placeholder scope mints a keypair under
the wrong account
- no-store-write-in-ws-on: page-local ws.on handlers may read stores, not
write them
Each rule proven to fire by reintroducing the historical bug shape and
reverting; RuleTester cases cover both the real shapes that must stay clean
and the bug shapes that must not.
A fourth candidate - await-then-stale-snapshot - was declined as not
AST-expressible: whether an await needs a guard, and whether the guard is
sufficient, is intent rather than shape, and the rule would flag most of the
already-correct guard code in livekitSession.ts.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: correct dispatcher invariant, record Tier 2 as shipped
The client CLAUDE.md claimed ws.on(...) appears only in dispatcher.ts. Eight
handlers across main.ts, MainPage.ts and ChannelController.ts say otherwise -
page-local UI (ringing, overlays, slow-mode timers) legitimately subscribes.
The real invariant is narrower: dispatcher is the single path by which server
events WRITE to domain stores. That is what local/no-store-write-in-ws-on
enforces, and the doc now matches the code.
Also record that Tier 2 shipped as ESLint rules rather than semgrep, and why
the fourth candidate was declined.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(client): move the status-picker dot onto the avatar corner
The corner dot on the user bar avatar was a static hardcoded-green div —
never reflected real status and did nothing on click. Removed it and
relocated the actual StatusPicker trigger dot (real color, opens the
status dropdown) to that same corner instead of its own row. The
"Online"/"Idle"/... text label under the username is unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(client): return the saved password over IPC again
The remember-password box saved a password the client could never read
back. Hardening had put #[serde(skip)] on CredentialData::password, so
load_credential returned a record whose password was always absent and
the login form could not prefill it — the box appeared to work and
silently did nothing.
Drop the skip and carry the field through the TS wrapper, which now maps
a non-string password to undefined rather than trusting the payload.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* feat(client): add an auto-connect checkbox to the login form
Auto-connect already existed end to end — ServerProfile.autoConnect,
setAutoLogin(), and the boot auto-login block with its cancel overlay —
but was only reachable through the zap button on a server card. This
surfaces the same state as a checkbox under Remember password, where
users look for it.
Ticking it forces Remember password on and disables it: boot auto-login
replays the stored token, which saveCredential only writes when the
password is remembered, so the two cannot be set independently without
producing a setting that silently does nothing.
Unticking is guarded. setAutoLogin(null) clears autoConnect on every
profile, so a bare toggle-off would wipe another server's setting; the
clear now only fires when this profile is the current holder. The guard
lives in ensureProfileExists, which all four auth paths already route
through.
Also consume the password restored in the previous commit, so selecting
a saved server prefills it instead of leaving the field blank.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* chore(release): bump client to 1.2.0-alpha.2
The client version is not derived from the tag — release.yml's
verify-versions job compares the tag against package.json and
tauri.conf.json and fails the release if they drift, so all five
manifests (both lockfiles included) move together.
Also refreshes the literal version in the README and docs build
examples, and closes the Unreleased changelog section as v1.2.0-alpha.2.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* docs(changelog): record the three bug-hunt sweeps in v1.2.0-alpha.2
PRs #1328, #1331 and #1332 merged to main after v1.2.0-alpha.1 was tagged
and closed 233 verified defects between them, but none of the three left
an entry in the curated changelog — the generated list covers commits,
this file covers behaviour, and nothing bridged the two.
Verified unreleased by ancestry rather than by date (none of the three
merge commits is an ancestor of v1.2.0-alpha.1), so all of it ships for
the first time in alpha.2.
Nine entries grouped by subsystem, leading with the changes an operator
or user would actually notice: the 24h-retention desync, the avatar-
deleting orphan sweep, the zero-byte restore truncation, the six hot-mic
paths, and the TOFU re-pin that would have warned every install at once.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test(client): drop the e2e assertion for the removed user-bar status dot (#1334)
26b46cc removed the hardcoded-green `.status-dot` div from the user bar
avatar and relocated the real StatusPicker trigger dot into that corner,
adding "status picker dot sits on the avatar" to cover the new element.
The old "user bar has status dot" test was left behind and now fails on
an element that no longer exists by design.
The replacement test already asserts the corner dot is present and
visible, so removing the stale one loses no coverage.
Claude-Session: https://claude.ai/code/session_01Rkv9dVo5YEYArqrDRfW41w
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
127 lines
5.9 KiB
TOML
127 lines
5.9 KiB
TOML
[package]
|
|
name = "owncord-client"
|
|
version = "1.2.0-alpha.2"
|
|
edition = "2021"
|
|
# Effective minimum: tauri 2.11 declares rust-version = "1.77.2", so the crate
|
|
# cannot build below it. Declaring it here enables Cargo's MSRV-aware resolver
|
|
# warning instead of silently following whatever toolchain is installed.
|
|
rust-version = "1.77.2"
|
|
description = "OwnCord Desktop Client"
|
|
|
|
# Crate-level lint policy so hardening ships with every build, not only the CI
|
|
# `cargo clippy -- -D warnings` gate (which downstream/local builds don't run).
|
|
# Enables the allow-by-default rustc lints governing the Win32 FFI unsafe path.
|
|
[lints.rust]
|
|
unsafe_op_in_unsafe_fn = "deny"
|
|
unused_unsafe = "warn"
|
|
|
|
[lib]
|
|
name = "owncord_client_lib"
|
|
crate-type = ["lib", "cdylib", "staticlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[features]
|
|
default = []
|
|
devtools = ["tauri/devtools"]
|
|
|
|
[dependencies]
|
|
tauri = { version = "2", features = ["tray-icon"] }
|
|
tauri-plugin-store = "2"
|
|
tauri-plugin-notification = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
# Self-signed server certificates are handled by the Rust TOFU proxies
|
|
# (ws_proxy, livekit_proxy, http_proxy), NOT by the plugin's dangerous-settings
|
|
# feature — REST traffic is tunneled through http_proxy which pins the cert to
|
|
# the trust-on-first-use fingerprint. The plugin therefore does default TLS
|
|
# validation (used only for external hosts: image CDNs, OG previews, YouTube).
|
|
tauri-plugin-http = { version = "2.5.7", features = ["rustls-tls"] }
|
|
tauri-plugin-opener = "2"
|
|
tauri-plugin-dialog = "2"
|
|
tauri-plugin-fs = "2"
|
|
# Minor-pinned per the plugin's own guidance: configure_client hands it a
|
|
# preconfigured rustls ClientConfig, and a 2.x minor bump can change the
|
|
# plugin's bundled reqwest/rustls and break that seam at runtime.
|
|
tauri-plugin-updater = "2.10"
|
|
tauri-plugin-process = "2"
|
|
url = "2"
|
|
tokio-tungstenite = { version = "0.28.0", features = ["rustls-tls-webpki-roots"] }
|
|
futures-util = "0.3.32"
|
|
tokio = { version = "1", features = ["sync", "net", "io-util", "rt", "macros"] }
|
|
tokio-rustls = { version = "0.26", default-features = false }
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
|
# Mozilla root bundle for the updater's HostScopedVerifier: non-pinned hosts
|
|
# (the GitHub installer download) get web-PKI validation. Already in the
|
|
# dependency tree via tokio-tungstenite's rustls-tls-webpki-roots feature.
|
|
webpki-roots = "1"
|
|
ring = "0.17"
|
|
log = "0.4"
|
|
# Writes Rust logs to a rotating file under the OS app-log dir (alongside the
|
|
# TS client-logs) so a shipped user can retrieve them — a release build detaches
|
|
# the console, so stdout/stderr logging is otherwise unreachable.
|
|
tauri-plugin-log = "2"
|
|
# The backend features are NOT optional extras — keyring 3.x declares no
|
|
# `default` feature at all, and every platform arm in its lib.rs falls back to
|
|
# `pub use mock as default` when its backend feature is off. A bare
|
|
# `keyring = "3"` therefore compiles the in-memory mock store on Windows, macOS
|
|
# AND Linux: `set_password` succeeds into a per-Entry cell that is dropped when
|
|
# the Entry goes out of scope, and the next `Entry::new(..).get_password()`
|
|
# returns NoEntry. Nothing ever reaches Credential Manager / Keychain /
|
|
# Secret Service. Removing any of these silently reverts a platform to that
|
|
# store — `secret_store::tests::compiled_keyring_backend_is_persistent` fails
|
|
# the build if that happens.
|
|
# windows-native -> Windows Credential Manager (DPAPI-backed)
|
|
# apple-native -> macOS Keychain
|
|
# sync-secret-service -> Secret Service (GNOME Keyring / KWallet) over libdbus.
|
|
# Chosen over async-secret-service because our Tauri
|
|
# commands are blocking `fn`s on Tauri's worker pool;
|
|
# the async backend would need a nested runtime.
|
|
# Build-time system dep: libdbus-1-dev.
|
|
# crypto-rust -> pure-Rust session crypto for the Secret Service
|
|
# transport (avoids linking OpenSSL for it).
|
|
keyring = { version = "3", default-features = false, features = [
|
|
"windows-native",
|
|
"apple-native",
|
|
"sync-secret-service",
|
|
"crypto-rust",
|
|
] }
|
|
# Scrubs the plaintext secret copies that the DPAPI fallback has to materialize
|
|
# as `Vec<u8>` for the Win32 call.
|
|
zeroize = "1"
|
|
# Encodes the DPAPI ciphertext for the JSON fallback store. Already in the tree
|
|
# via the tauri/rustls stack, so this costs no extra build.
|
|
base64 = "0.22"
|
|
rfd = { version = "0.16", default-features = false }
|
|
|
|
# Desktop-only plugins (no mobile bundle target). single-instance carries the
|
|
# "deep-link" feature so an owncord:// link fired at a running app is forwarded
|
|
# to it instead of spawning a duplicate window.
|
|
[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
|
|
tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
|
|
tauri-plugin-window-state = "2"
|
|
tauri-plugin-autostart = "2"
|
|
tauri-plugin-deep-link = "2"
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows = { version = "0.58", features = ["Win32_UI_Input_KeyboardAndMouse"] }
|
|
# DPAPI (CryptProtectData/CryptUnprotectData) for the last-resort credential
|
|
# fallback in secret_store. Version tracks keyring's own windows-sys dep so the
|
|
# two share one build of the crate.
|
|
windows-sys = { version = "0.60", features = [
|
|
"Win32_Foundation",
|
|
"Win32_Security_Cryptography",
|
|
] }
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
device_query = "2"
|
|
# Direct access to the WebKitGTK webview for voice/video support. WebKitGTK
|
|
# denies getUserMedia/enumerateDevices permission requests by default (wry
|
|
# installs no handler on Linux, unlike its macOS backend which auto-grants),
|
|
# and ships with media-stream/WebRTC settings off — so microphones and cameras
|
|
# are invisible to the webview without this hook. Version-pinned to match
|
|
# wry's own `=2.0.2` pin so both link the same crate build; v2_38 gates the
|
|
# enable-webrtc setting.
|
|
webkit2gtk = { version = "=2.0.2", features = ["v2_38"] }
|