[Security]: session JSON artifacts are written world-readable on unix (0o644 default umask)
- Lingua principale
- Rust
- Stelle
- 2.3k
- Fork
- 231
- Merge medio
- 2h 46m
- PR unite (30g)
- 577
Descrizione
Summary: On unix, session JSON artifacts written through JsonFileStore (session transcripts, metadata, token usage) are published with permissions inherited from the process umask — typically 0o644 — making prompt/output content world-readable on multi-user hosts.
Area: Agent runtime / core
Reproduction or evidence: `src/crates/services/services-core/src/json_store.rs:306` writes the payload to a temp file (`fs::write`) and renames it into place without any permission tightening; the file contains no `set_permissions`/`PermissionsExt`/`0o600` logic anywhere. On a unix host with default umask 022, the published artifact is world-readable (`-rw-r--r--`).
Environment: BitFun version/commit 32f2427697ee16f253ee6119860a03255c0b3e47 (origin/main); reproducible on any unix host with default umask (verified by code-path analysis; unix CI matrix exercises the fixed behavior).
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start at src/crates/services/services-core/src/json_store.rs:306 and trace how JsonFileStore writes and renames session artifacts on Unix. Verify the resulting file mode under a 0o22 umask, then confirm completion when session JSON files are not world-readable and the Unix checks pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend, security
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 78/100