Expand description
Process hardening: best-effort defense-in-depth measures.
Functions§
- agent_
context - Whether murk is running on behalf of an AI agent, via the explicit
MURK_AGENTopt-in. Agent context forces strict mode (seestrict_mode) so the honest path never falls back to the operator’s stored key.murk agent execsets it (alongsideMURK_STRICT) for the child. This is a safe default, not a sandbox: a child that controls its own environment or can read~/.config/murk/keysdirectly is outside murk’s boundary — real containment is OS-level isolation (see the note indocs/ai-agents.md). - ci_
context - Whether murk appears to be running in CI (the conventional
CIvariable set truthy). Advisory only: CI context drives a nudge toward the scoped agent path but — unlikeagent_context— does not by itself flip strict mode, so existing pipelines are never silently changed. - disable_
core_ dumps - Disable core dumps for this process.
- is_
ram_ backed - Whether
pathlives on a RAM-backed filesystem (tmpfs/ramfs), meaning data written there never hits persistent storage. - self_
scope - Whether the operator opted into self-scoping: honoring the vault’s agent
allow-tag policy for their OWN key, as if they were an agent. On via an
explicit
MURK_SELF_SCOPE, or implicitly in anagent_context(declaringMURK_AGENTbinds you to the policy even with your own key). A no-op on a vault with no policy set. - stdout_
is_ regular_ file - Whether this process’s stdout is a regular file (as opposed to a pipe, terminal, or device).
- strict_
mode - The effective strict setting: strict is ON when either the operator set a
truthy
MURK_STRICTor this is anagent_context(MURK_AGENT). There is deliberately no way to turn strict OFF from inside an agent context — an operator who wants convenience simply doesn’t opt into agent context. Strict mode trades convenience for a safer default: don’t write a secret to disk (seeis_ram_backed) and don’t fall back to the operator’s stored key (seeenv::resolve_key_with_source). This is the toggle the strict gates read.