This document defines the current security boundaries of Chatify and the hardening plan. It is intentionally explicit to avoid overstating guarantees.
- Protect message confidentiality during transport and at rest where supported by protocol design.
- Reduce the chance of silent protocol misuse or key confusion.
- Keep trust and identity behavior inspectable from client and server logs.
- Crypto helper module for key derivation and authenticated encryption flows.
- Protocol-level validation paths in server and client message handling.
- CI checks that prevent unchecked changes from bypassing lint and tests.
- Optional bridge isolation through feature flags so default builds stay minimal.
- Structured security test report is generated per release tag and attached to release assets (
.json+.md). - Server-side credential storage uses Argon2id PHC hashes for new password writes while retaining legacy PBKDF2 verification for existing rows.
- Session bearer tokens are stored only as SHA-256 digests in memory and expire by absolute and idle TTL.
- The client refuses plaintext
ws://connections to non-loopback hosts unless explicitly started with the insecure-development override. - All key-producing and security-sensitive functions are annotated
#[must_use]so the compiler warns on accidental discard of key material. - CI runs
cargo auditon every push to detect known dependency vulnerabilities. BotStatein the Discord bridge zeroizes all credentials (auth_password,channel_secret,priv_key, cached keys) on drop.- PBKDF2 iterations are set to 600,000, matching OWASP 2023 recommendations, for client-side hashing and legacy verification.
- Encryption plaintext limit is 100 MB, matching the documented client-side cap.
AuthInfoin the library crate omitsDebugto prevent accidental logging of password hashes.
- Authentication model is still under active hardening; auth-v2 is a challenge/response flow, not a full PAKE.
- Full independent security review has not been completed.
- Production threat model is not fully closed for hostile network environments.
- Certificate pinning and first-class trust-on-transport UX are not complete.
- DM encryption does not yet provide a full Signal-style Double Ratchet or MLS group security model.
- Plugin workers are restricted to trusted plugin roots and run with a scrubbed environment, but not yet OS-sandboxed with a least-privilege profile.
- Security claims should be treated as controlled-environment level unless additional hardening is applied.
- Protocol misuse from malformed payloads.
- Reliability risks from reconnect and relay loops in bridge scenarios.
- State consistency risks between in-memory channels and durable event persistence.
- Nation-state adversary model.
- Formal cryptographic proofs for protocol composition.
- Full key lifecycle governance and compliance controls.
- Replace auth-v2 credential verification with an audited PAKE/verifier design such as OPAQUE or SRP.
- Add certificate/SPKI pinning for
wss://and store server pins per profile with rotation UX. - Move DMs to an audited forward-secret protocol: Signal-style X3DH + Double Ratchet for one-to-one messaging, or MLS for groups.
- Add stronger identity trust workflow: device identity keys, signed prekeys, QR/safety-number verification, and key-transparency style audit evidence.
- Require fresh 2FA or recent re-auth for all admin and sensitive actions, including plugin install, 2FA disable, password change, DB backup/restore, bridge setup, and role changes.
- Add signed plugin manifests and OS-level job/AppContainer restrictions where available.
- Add replay and tamper-resistance tests for sensitive message flows.
- Add adversarial integration tests for malformed and reordered payloads.
Each published release tag generates a machine-readable and human-readable security report:
chatify-security-report-<tag>.jsonincludes check metadata (tag, commit, timestamp, run URL), required/optional results, and dependency-audit metrics.chatify-security-report-<tag>.mdincludes an executive summary and per-check status table with log references.
Before each minor release:
- Run all CI quality gates.
- Run targeted protocol and bridge regression tests.
- Update this file with any newly discovered limitation.
- Reject release if a high-severity security issue is unresolved.
For security findings, open a private report path first, then publish a sanitized postmortem once fixed.
Suggested disclosure template:
- Impact summary.
- Affected versions.
- Reproduction steps.
- Mitigation and fix details.
- Follow-up prevention action.