From b7b9459ccab3c09e0b4b262b94cf63f1b98aa26f Mon Sep 17 00:00:00 2001 From: shoemoney Date: Tue, 23 Jun 2026 03:22:20 -0500 Subject: [PATCH] =?UTF-8?q?docs:=20sync=20README=20=E2=80=94=20badge=20bum?= =?UTF-8?q?p,=20M7.5/M7.6=20in=20summary,=20new=20Security=20section=20?= =?UTF-8?q?=F0=9F=94=90=F0=9F=93=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - status badge: 'v1 complete Β· M0–M7' β†’ 'πŸ›‘οΈ v1 Β· audited + hardened' - Go badge 1.22+ β†’ 1.26+ (matches go.mod) - top milestone summary now carries M7.5 (audit) + M7.6 (hardening), consistent with the detailed table - new 'πŸ” Security & Durability' section (table + a mermaid of the integrity/path guard chain) + TOC entry β€” showcases the audit/hardening honestly under the single-owner threat model --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b3fcb94..c17ad91 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@
-![status](https://img.shields.io/badge/status-%F0%9F%8E%89%20v1%20complete%20%C2%B7%20M0%E2%80%93M7%20%E2%9C%85-brightgreen?style=for-the-badge) -![language](https://img.shields.io/badge/Go-1.22%2B-00ADD8?style=for-the-badge&logo=go&logoColor=white) +![status](https://img.shields.io/badge/status-%F0%9F%9B%A1%EF%B8%8F%20v1%20%C2%B7%20audited%20%2B%20hardened-brightgreen?style=for-the-badge) +![language](https://img.shields.io/badge/Go-1.26%2B-00ADD8?style=for-the-badge&logo=go&logoColor=white) ![license](https://img.shields.io/badge/license-AGPLv3-blue?style=for-the-badge) ![platforms](https://img.shields.io/badge/Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-βœ“-success?style=for-the-badge) @@ -46,6 +46,8 @@ > | M6 β€” Versioning: `log` / `restore` + hub GC | βœ… done β€” restore reverted a file on the fleet πŸ•°οΈ | > | M6.5 β€” `devbox deploy` (pin a mount to a snapshot, no push) | βœ… done β€” **blue/green-deployed v1 on a real box while head stayed v2** πŸš€ | > | M7 β€” Hardening: `devbox doctor`, reconnect/backoff, rescan fallback, name-clash, release builds | βœ… done β€” **doctor/stop/hooks + share-name guard + dead-watcher rescan fleet-verified** πŸ›‘οΈ | +> | M7.5 β€” Adversarial security/data-loss audit + fixes (path-traversal, blob integrity, never-clobber, safe GC) | βœ… done β€” **26 findings, all promise-breakers fixed, race-clean** πŸ” | +> | M7.6 β€” Hardening: fsync durability Β· DoS caps + timeouts Β· pidfile PID-reuse guard Β· join proof-of-possession | βœ… done β€” fleet-verified on arm64 πŸ›‘οΈ | --- @@ -56,8 +58,8 @@ | πŸ€” [Why devbox?](#-why-devbox) | 🧠 [Core Concepts](#-core-concepts) | πŸ—οΈ [Architecture](#%EF%B8%8F-architecture) | | πŸ”„ [How Sync Works](#-how-sync-works) | πŸ’₯ [Conflicts](#-conflicts-never-lose-a-byte) | πŸš€ [Quick Start](#-quick-start) | | 🧰 [CLI Reference](#-cli-reference) | πŸͺ [Hooks](#-hooks) | πŸ™ˆ [.devignore & Secrets](#-devignore--secret-guard) | -| πŸ•°οΈ [Versioning & Deploy](#%EF%B8%8F-versioning--deploy) | πŸ–₯️ [Cross-Platform](#%EF%B8%8F-cross-platform) | πŸ—ΊοΈ [Roadmap](#%EF%B8%8F-roadmap) | -| βš–οΈ [License & Open-Core](#%EF%B8%8F-license--open-core) | πŸ™Œ [Contributing](#-contributing) | | +| πŸ•°οΈ [Versioning & Deploy](#%EF%B8%8F-versioning--deploy) | πŸ–₯️ [Cross-Platform](#%EF%B8%8F-cross-platform) | πŸ” [Security & Durability](#-security--durability) | +| πŸ—ΊοΈ [Roadmap](#%EF%B8%8F-roadmap) | βš–οΈ [License & Open-Core](#%EF%B8%8F-license--open-core) | πŸ™Œ [Contributing](#-contributing) | --- @@ -453,6 +455,45 @@ gitGraph --- +## πŸ” Security & Durability + +> Threat model: **single-owner, multi-device** (every enrolled device is *yours*). Within that, +> v1 went through an adversarial audit β€” every data-loss and arbitrary-file path is closed. πŸ›‘οΈ + +| Layer | Protection | +|---|---| +| πŸͺͺ **Device identity** | ed25519 keypair per device; `join` requires **proof-of-possession** (a signed challenge β€” you can't claim a key you don't hold), and a bad request never burns the one-time token | +| 🎟️ **Auth** | bearer tokens, **hashed at rest** (hub stores no plaintext creds), device-**revocable** | +| 🧊 **Content integrity** | every chunk **and** manifest is re-verified against its BLAKE3 hash on download β€” a corrupt/truncated transfer or hostile hub can't write wrong bytes into your tree | +| 🚧 **Path safety** | hub rejects any blob key that isn't 64-hex (no `..%2f` traversal β†’ no arbitrary file read); the client refuses manifest paths that escape the mount root | +| πŸ”‘ **Secret guard** | case-insensitive deny-list (`.ENV` == `.env`); `.env`/keys/`*.env`/`.aws/credentials` **never leave the machine**, independent of `.devignore` | +| πŸ›Ÿ **Never lose a byte** | losing local edits become `.conflict` copies; ignored/guarded on-disk files are preserved **before** any hub overwrite; atomic writes are **fsync'd** (power-loss safe) | +| 🧹 **Safe GC** | mark-and-sweep from every live head β€” never frees a chunk a share still needs, even if refcounts are off | +| πŸšͺ **DoS bounds** | request-body caps (256 MiB blob / 8 MiB JSON β†’ `413`) + server read/idle timeouts | +| πŸ†” **Daemon** | single-instance pidfile with a **PID-reuse guard** (start-time token) so `stop` never signals a stranger | + +
+πŸ”¬ how the integrity + path guards chain + +```mermaid +flowchart LR + P["πŸ“₯ pull"] --> G{"64-hex
blob key?"} + G -->|no| X1["🚫 404 β€” no traversal"] + G -->|yes| F["⬇️ fetch blob"] + F --> H{"BLAKE3
matches key?"} + H -->|no| X2["🚫 integrity fail"] + H -->|yes| C{"path inside
mount?"} + C -->|no| X3["🚫 refuse escape"] + C -->|yes| W["βš›οΈ atomic write + fsync"] + style X1 fill:#5a1e1e,stroke:#ff6b6b,color:#fff + style X2 fill:#5a1e1e,stroke:#ff6b6b,color:#fff + style X3 fill:#5a1e1e,stroke:#ff6b6b,color:#fff + style W fill:#1e5a2e,stroke:#51cf66,color:#fff +``` +
+ +--- + ## πŸ—ΊοΈ Roadmap ```mermaid