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 32f2427 (origin/main); reproducible on any unix host with default umask (verified by code-path analysis; unix CI matrix exercises the fixed behavior).
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:306writes the payload to a temp file (fs::write) and renames it into place without any permission tightening; the file contains noset_permissions/PermissionsExt/0o600logic anywhere. On a unix host with default umask 022, the published artifact is world-readable (-rw-r--r--).Environment: BitFun version/commit 32f2427 (origin/main); reproducible on any unix host with default umask (verified by code-path analysis; unix CI matrix exercises the fixed behavior).