Harden file permissions of settings.json, the app known_hosts and the data directory
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with src-tauri/src/settings.rs, src-tauri/src/known_hosts.rs (or the SSH host key store), src-tauri/src/lib.rs, and src/stores/settings.ts; read the two linked notes for context. Check the startup and settings save/load paths, then add the requested Unix mode and per-field fallback coverage. Done means the stated permission and settings criteria pass, with pnpm test && pnpm lint and the Rust checks when Rust changes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
The v1 smoke run found settings.json and the app's own known_hosts written 0664, and an app data directory created before the first launch (for example by scripts/demo-db.sh) stays 0775. app.db is already 0600. None of these files holds a secret, but they should be private like the database. Related settings-file robustness minors were deferred from plan 5.
To do
- Create/write
settings.jsonand the appknown_hostswith mode 0600, and tighten the data directory to 0700 at startup (also when it already exists), on Unix only. - fsync the parent directory after the atomic rename of
settings.json. - A numeric overflow or negative value in
settings.jsonresets ALL fields to defaults (serde fails on the whole struct): clamp or default per field instead. - The settings store's
load()is not sequenced against an in-flightupdate(), and a failed stale update's error is dropped silently.
Acceptance criteria
- After a fresh launch (and after launching over a 0775 directory)
statshows 0600 files and a 0700 data directory. - A
settings.jsonwith one bad number keeps its other fields. - Unit tests cover the modes (cfg(unix)) and the per-field fallback.
-
pnpm test && pnpm lintgreen (pluscargo clippy --all-targets -- -D warningsandpnpm test:rustwhen Rust changes)
Likely files touched
src-tauri/src/settings.rs,src-tauri/src/known_hosts.rs(or the SSH host key store),src-tauri/src/lib.rs(data dir setup)src/stores/settings.ts
Linked docs
docs/notes/integration-v1-smoke.md("Seen, not fixed")docs/notes/plan-05-followups.md(Settings, Task 1)
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Merge medio
- 1h 2m
- PR unite (30g)
- 41
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Cemoche/tablemax
-
accessibility area:frontend size:S status:ready type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:backend size:S status:ready type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
area:infra good first issue size:S status:ready type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
area:docs good first issue size:S status:ready type:task
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:infra size:S status:ready type:task
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Cemoche/tablemax
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
anthropics/claude-code#106183 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#60558 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno