ISSUE A1 — Runtime state (incl. signing seed) is owned by the supervised user; no privilege boundary (root of CW-15 / CW-16)
Summary
Labels: security, runtime, isolation, key-custody, high
RELATED: root cause shared with unicity-aos/codewall ISSUE C3 and the
plane-side detection unicitynetwork/semanticd ISSUE S1 / S2.
Summary
The runtime state (the volume holding the enforcer trust anchor, the active-policy
pointer, and the endpoint telemetry signing seed) is protected only by file mode
0o600/0o700 owned by the running user, and the daemon runs as that same uid —
the same OS account as the supervised agent. There is no privilege boundary
between the subject Codewall polices and the state Codewall trusts, so the
supervised user can read the signing seed and can write the enforcer's KV. Every
guarantee holds against a remote attacker or a different OS user, but not against
local code at the supervised uid, which is the primary adversary for an agent
guardrail.
Affected component
- Runtime daemon process ownership / privilege model (single-uid).
- Volume storage:
crates/astrid-storage(principal-scoped KV, plaintext at rest). - File-permission-only protection:
crates/astrid-kernel/src/socket.rs,storage_mount.rs.
Steps to reproduce (read-only)
- As the supervised uid, read the runtime volume.
- Confirm
identity_seed_hex(endpoint signing seed) is present in plaintext and that the daemon runs as the same uid (see the script incodewallISSUE C3).
Actual result
The daemon runs as the supervised uid; the volume is owned by and readable / writable by that uid; the signing seed and enforcer KV are reachable by the supervised subject.
Expected result
The enforcer's trust store and signing key are outside the supervised user's reach: the daemon (or at least the key-holding component and its state) runs under a separate service account, and the signing key is sign-only / sealed, so the supervised user can neither read the seed nor write the enforcer KV.
Proposed fix
Introduce a separate service account (or equivalent isolation) for the daemon / key-holding component, or a sign-only key custody backend, so the supervised uid cannot extract the seed or tamper with enforcer state. This is the deepest fix and unblocks closing CW-15 / CW-16 at the root.
Reproduction Steps
Steps to reproduce (read-only)
- As the supervised uid, read the runtime volume.
- Confirm
identity_seed_hex(endpoint signing seed) is present in plaintext and that the daemon runs as the same uid (see the script incodewallISSUE C3).
Expected Behavior
Expected result
The enforcer's trust store and signing key are outside the supervised user's reach: the daemon (or at least the key-holding component and its state) runs under a separate service account, and the signing key is sign-only / sealed, so the supervised user can neither read the seed nor write the enforcer KV.
Environment
Affected component
- Runtime daemon process ownership / privilege model (single-uid).
- Volume storage:
crates/astrid-storage(principal-scoped KV, plaintext at rest). - File-permission-only protection:
crates/astrid-kernel/src/socket.rs,storage_mount.rs.
Logs / Backtrace
Source: astrid-runtime/astrid