harness: document sandbox threat model and credential permission requirements
This commit is contained in:
parent
66f1568e8f
commit
a6bd4cf502
1 changed files with 13 additions and 0 deletions
|
|
@ -353,6 +353,19 @@
|
|||
# fail inside the container. Enable sandbox-fallback so builds that
|
||||
# can't set up the sandbox (no user-namespaces in nspawn) fall back
|
||||
# to unsandboxed local builds rather than failing outright.
|
||||
#
|
||||
# Security note (issue #240): unsandboxed builds run as `nixbld` users
|
||||
# (non-root) and can read any world-readable file in the container.
|
||||
# Mitigations in place:
|
||||
# - /root/.claude (claude session) is mode 700, root-owned - nixbld
|
||||
# users cannot access it.
|
||||
# - /state/forge-token (Forgejo API token) is written at mode 0600 by
|
||||
# hive-c0re/src/forge.rs - nixbld users cannot access it.
|
||||
# All future credential files written to agent state dirs MUST be mode
|
||||
# 0600 or stricter. Do NOT create world-readable secret files.
|
||||
# Long-term fix: enable user namespaces in nspawn containers
|
||||
# (--private-users=inherit) so the nix sandbox actually works and
|
||||
# sandbox-fallback becomes a true last resort.
|
||||
nix.settings.sandbox-fallback = true;
|
||||
|
||||
# `claude-code` is unfree. Each per-agent container's nixosConfiguration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue