Implement optional end-to-end at-rest encryption for the complete local workspace
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Read plans/ADRs/048-at-rest-encryption.md and the prototype in src/lib/studio/at-rest-crypto.ts first. Inventory the listed plaintext surfaces and resolve the threat model, key lifecycle, migration, and recovery decisions before implementation. Done means the ADR is accepted, all acceptance criteria are verified, and real-browser migration and recovery tests pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The canonical corpus is currently stored in plaintext in IndexedDB. Encrypted exports and portable backups do not protect the live browser profile. A tested AES-256-GCM/PBKDF2 prototype exists in src/lib/studio/at-rest-crypto.ts, but it is deliberately not wired into persistence.
ADR 048 correctly keeps this proposed until the complete plaintext surface and recovery lifecycle are addressed.
Scope
Treat this as a product/security design and implementation project, not simply wiring the codec into one store.
Phase 1 — Threat model and product decision
- Define the threat model and clearly state that at-rest encryption does not protect against XSS or a compromised running browser.
- Decide optional workspace encryption vs. mandatory encryption.
- Document passphrase loss consequences and recovery requirements.
- Inventory every plaintext surface: canonical IndexedDB, Yjs/y-indexeddb replica, recovery snapshots, quarantine copies, attachments, semantic caches, exports and temporary import data.
- Decide which surfaces are encrypted, excluded with explicit rationale, or disclosed.
Phase 2 — Key lifecycle and UX
- Unlock/lock UI and session lifecycle.
- Keep passphrases and derived keys out of persistent browser storage, URLs and logs.
- Clear in-memory key material and derived sensitive caches on lock as far as browser APIs permit.
- Prevent writes and hydration when unlock fails.
- Provide a verified encrypted backup/recovery route and explicit irreversible-loss warning.
Phase 3 — Persistence migration
- Version the encrypted envelope and authenticate all header fields.
- Use vetted WebCrypto primitives; retain the tested AES-GCM implementation unless a reviewed design change is approved.
- Migrate with write → read-back/verify → commit ordering.
- Never delete plaintext until encrypted data has been verified.
- Fail closed on wrong keys, tampering, unsupported versions and partial migration.
- Ensure no plaintext fallback writes occur while encryption is enabled.
Phase 4 — Verification
- Real-browser shadow/canary tests with representative corpora.
- Kill-tab/mid-write and quota failure tests.
- Verify lock/unlock, backup restore, sync, attachments, search and recovery.
- Inspect all storage surfaces after locking and after migration.
Acceptance criteria
- ADR 048 is accepted with complete threat model and plaintext-surface inventory before shipping.
- No passphrase or raw key is persisted or logged.
- All in-scope corpus surfaces are encrypted or explicitly disclosed/excluded.
- Wrong password/tampering/version mismatch never falls back to plaintext or overwrites data.
- Migration is recoverable and verifies ciphertext before deleting plaintext.
- Encrypted backup restore works on a fresh browser profile.
- Real-browser corpus fingerprints match before and after migration.
- Security review and user-facing recovery warning are complete.
References
plans/ADRs/048-at-rest-encryption.mdsrc/lib/studio/at-rest-crypto.ts- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
- Lenguaje dominante
- TypeScript
- Estrellas
- 3
- Forks
- 2
- Merge medio
- 11 h 49 min
- PR fusionados (30 d)
- 102
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de d-oit/do-knowledge-studio
-
Migrate do-harness.toml to the current [[sensors]] schema (do-harness CLI 0.6.0 cannot parse it)Abiertochore config priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
d-oit/do-knowledge-studio#1219 ·
Los mantenedores suelen responder en 1 día
-
Dependabot only scans the root manifest — add workspace packages/* directories, cooldown, and grouped updatesPosiblemente ocupada @d-oit la tomó hoy. Abiertoci config deps priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
d-oit/do-knowledge-studio#1212 ·
Los mantenedores suelen responder en 1 día
-
documentation priority: low
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
d-oit/do-knowledge-studio#1218 ·
Los mantenedores suelen responder en 1 día
-
chore priority: low skills
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
d-oit/do-knowledge-studio#1217 ·
Los mantenedores suelen responder en 1 día
-
discussion enhancement performance priority: low search
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
d-oit/do-knowledge-studio#1216 ·
Los mantenedores suelen responder en 1 día
Todos los issues de d-oit/do-knowledge-studio
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
danielmiessler/LifeOS#3028 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Koenkk/zigbee2mqtt#33855 ·
Los mantenedores suelen responder en 1 día