Skip to main content

Module host_paths

Module host_paths 

Source
Expand description

Host folders the operator lends every contained capsule on this host: the host_paths: list in ~/.murmur/config.yaml.

Each entry names one host directory and an access, read or read-write. On landlock+seccomp it becomes one Landlock rule for every command, plan shell step and murmur:process program; on mountns+pivot_root+landlock+seccomp it is also bound into the composed root at the directory’s own absolute path. No rule ever carries Execute, so capabilities.shell.allow stays the complete list of what a contained capsule can run. Below landlock+seccomp nothing is scoped, and an entry is checked and reported but adds nothing.

Checking happens in three steps, each refusing with the entry’s index and its path as written:

  1. declare_host_paths: the shape of what the operator wrote (path, access, ~ expansion, /, the same path twice). No filesystem access.
  2. resolve_host_paths: the entry on this host, at launch (exists, is a directory, not a system path, not read-write over murmur’s own home, not inside the work folder, not the same directory twice), and the credential locations it reaches.
  3. check_execute_roots: against what the session may run, on the applied tier, at staging and by mur run --explain-scope.

Platform-neutral: the Landlock rules and binds live in sandbox and sealed, behind the same target_os = "linux" gates as every other rule.

Structs§

CredentialLocation
A home-relative place that holds a credential, and the credential backstop patterns (shell::CREDENTIAL_ENV_PATTERNS) for the same credential, where there is one.
DeclaredHostPath
An entry whose shape is valid: ~ expanded, . and .. folded, not yet looked up on the host.
ExecuteRoot
A directory the session may run something out of: the directory of an executable file its Landlock grants name, or an executable directory grant.
HostPath
A host path a session grants: checked on this host, in config order.
HostPathContext
What resolve_host_paths checks each entry against.
HostPathEntry
One host_paths entry exactly as the config file holds it. Both fields are optional here so a missing one is refused by declare_host_paths naming the entry, rather than failing the whole file’s parse.
HostPathRefusal
Why an entry cannot be honoured. Every refusal names the entry’s index, its path as written, the directory it resolves to when it has one, and the reason.
HostPathReport
One element of ScopeReport::host_paths: --explain-scope --json and session_start.effective_grants.host_paths. Every key is always serialized.

Enums§

HostPathAccess
What a host path lets a capsule do there. Required in every entry: there is no default.
HostPathMechanism
What the applied tier does with a host path, as a stable wire name.

Constants§

CREDENTIAL_LOCATIONS
Every credential location a host path is warned about (W-SEC-035). The one list.

Functions§

check_execute_roots
Checks the read-write entries against what the session may run, under mechanism.
check_policy_execute_roots
check_execute_roots for policy’s own host paths against the execute roots its grants resolve to on this host. stage_session calls it on the applied tier, and mur run --explain-scope on the tier its report names, so both refuse the same entry.
credential_locations
Every CREDENTIAL_LOCATIONS entry that exists under home and that path is, lies under, or contains, spelled ~/<location>.
credential_warning
The W-SEC-035 line for an entry reaching a credential location, or None when it reaches none. Shared by mur run and mur doctor so the two cannot word it differently.
declare_host_paths
Checks the shape of every entry and expands ~ against home, the HOME mur runs with.
host_path_reports
The reports for host_paths under mechanism, in config order.
resolve_host_paths
Resolves every declared entry on this host and checks it, in config order.