pub struct FilesystemSecurityConfig {
pub workspace_only: bool,
pub protected_paths: Vec<String>,
pub extra_protected_paths: Vec<String>,
pub script_fs_confinement: bool,
pub script_allowed_paths: Vec<PathBuf>,
pub tool_allowed_paths: Vec<PathBuf>,
}Expand description
Filesystem security policy for agent tools and skill scripts.
Controls two distinct surfaces:
- Tool layer:
workspace_onlyconfines agent file tools to the workspace root;protected_pathsblocks access to sensitive files as defense-in-depth. - Script layer:
script_fs_confinementenables OS-level sandbox (macOSsandbox-exec) restricting scripts toskills_dir,workspace_dir,/tmp, and anyscript_allowed_paths.
Fields§
§workspace_only: boolWorkspace-only mode: tool file operations confined to workspace root. When true, absolute paths outside the workspace are denied by the policy engine. Default: true.
protected_paths: Vec<String>Protected path patterns (blacklist). Case-insensitive substring match. Default: ~25 patterns covering secrets, system files, agent internals.
extra_protected_paths: Vec<String>Additional user-defined protected paths (merged with defaults at runtime). Keeps defaults intact — users add patterns here without overriding.
script_fs_confinement: boolOS-level filesystem confinement for skill scripts via sandbox-exec (macOS) or Landlock (Linux 5.13+). Default: true.
script_allowed_paths: Vec<PathBuf>Additional absolute paths scripts may access beyond skills_dir and
workspace_dir. Read-only access unless the path is also the workspace.
tool_allowed_paths: Vec<PathBuf>Absolute paths that agent tools (read_file, write_file, etc.) may
access even in workspace_only mode. Auto-populated from feature
configs (e.g. obsidian.vault_path) during config expansion.
Trait Implementations§
Source§impl Clone for FilesystemSecurityConfig
impl Clone for FilesystemSecurityConfig
Source§fn clone(&self) -> FilesystemSecurityConfig
fn clone(&self) -> FilesystemSecurityConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more