Enable access for the task at hand
Tools operate with the access granted by their configuration and host environment. Shell execution is off by default. Turning on a tool, allowing a file, and granting permission to write are separate choices.
For a first file-reading task, use utilities and a restricted root:
mini-a useutils=true utilsroot=./docs \
goal="List and summarize the Markdown documents available under the configured root."
The root must exist. If access is denied, inspect the configured root and fileallow before widening permissions. File allowlists constrain built-in file access; external MCP servers and shell processes have their own access boundaries.
Use read-only access when a task only needs to inspect information. For shell tasks, choose allowlists, approval rules, and an OS sandbox as appropriate. Advanced web grants trusted console authority, so protect its token and network access. Exact defaults and applicability are in Tools and permissions.
Security Features
fileallow constrains built-in access to selected existing local files/directories, including skills, prompt files and wiki roots. Omitted means existing access; [] denies covered access. Advanced sessions cannot widen the server list. It composes with existing permissions and requires separate isolation for shell/external tools. See file-access boundaries.
mini-a is designed to be secure by default. Potentially dangerous features require explicit opt-in.
| Feature | Description | Default |
|---|---|---|
| Shell execution | Run arbitrary shell commands | Disabled |
| Read-only mode | Prevent file modifications | Available |
| Command allowlist | Only permit specific shell commands | shellallow="cmd1,cmd2" |
| Command ban list | Block specific shell commands | shellbanextra="rm,shutdown" |
| Encrypted key storage | API keys stored encrypted via model manager | Supported |
| Docker isolation | Run in a container sandbox | Available |
| OS sandbox | Built-in OS-level sandbox for shell commands | usesandbox=off |
# Enable shell with allowlist only
mini-a useshell=true shellallow="ls,cat,grep,find"
# Enable shell but ban destructive commands
mini-a useshell=true shellbanextra="rm,rmdir,dd,mkfs"
# Enable sandbox (auto-detects OS)
mini-a useshell=true usesandbox=auto
# Sandbox without network access
mini-a useshell=true usesandbox=auto sandboxnonetwork=true
These controls can be combined. For example, running inside Docker with a shell allowlist provides defense in depth. The built-in OS sandbox (usesandbox) adds an extra layer by wrapping shell commands in platform-specific OS-level restrictions — no separate container setup required.
Prompt Safety and Untrusted Data Handling
mini-a explicitly labels all untrusted content — user goals, tool outputs, attached files, and conversation history — with BEGIN_UNTRUSTED_* … END_UNTRUSTED_* markers in the system prompt. The LLM is instructed not to follow embedded instructions that conflict with developer rules.
Additional safeguards:
- Policy-lane probe detection — requests that attempt to extract the system prompt are detected and refused before reaching the LLM.
- Prompt normalization — line endings are unified, stray control characters are stripped, and oversized inputs are rejected.
- Web API prompt size limit (
maxpromptchars, default 120,000) — configurable character cap on incoming web API payloads.
# Restrict accepted prompt size in the web server
./mini-a-web.sh onport=8888 maxpromptchars=40000
Advanced Shell
mini-a’s shell integration includes security controls that let you precisely define what the agent can and cannot execute.
Command Allowlists
Restrict the agent to a specific set of commands. Only the listed commands will be permitted:
mini-a useshell=true shellallow='git,npm,docker'
Any attempt to run a command not on the allowlist will be blocked.
Command Ban Lists
Alternatively, block specific dangerous commands while allowing everything else:
mini-a useshell=true shellbanextra='rm,sudo,shutdown,reboot'
Allowlists and ban lists give you layered control over shell safety.
Decision-based shell guard
When a decision model is configured (modeldec or OAF_DECIDE_MODEL), every built-in shell command is risk-assessed before it runs (shellguard=auto, the default):
| Assessed risk | Default action |
|---|---|
low (inspection) |
Runs |
medium (scoped, reversible changes) |
Asks for one-time approval (shellguardask=medium) |
high (destructive, privileged or external effects) |
Asks for approval |
critical (broad irreversible damage, credential disclosure) |
Denied (shellguarddeny=critical) |
mini-a useshell=true readwrite=true shellguard=auto shellguardask=medium shellguarddeny=critical
shellguard=offopts out locally.shellguard=deciderequires an enabled decision model.usedecide=falsealso disables the guard.- Unknown effects, oversized input, invalid answers and provider failures need approval. Headless or
shellbatch=trueruns block them.shellguardtimeout(default5000ms) bounds the call. - Approvals apply once and are never cached.
readwrite=trueskips the built-in token and pipe checks. Neitherreadwrite=truenor legacy “Always” approvals bypasscheckall, policy-required approval or guard-required approval. - Compatibility: with a decision model configured, commands and their execution context are now sent to that provider automatically. Local children inherit the guard. Remote workers use their own decision credentials and block approvals they cannot ask for.
The guard supplements deterministic restrictions and sandboxing; a model answer is not a safety guarantee. Audit events shell_guard and shell_guard_approval record risk, action, reason and timing.
Docker Isolation
For maximum safety, run shell commands inside a Docker container. This isolates the agent’s shell access from your host system entirely:
docker run --rm -e OAF_MODEL="(type: openai, model: gpt-5.2, key: '...')" -v $(pwd):/work openaf/mini-a useshell=true goal='Analyze the project in /work'
The agent can execute commands freely inside the container without risk to your host filesystem or system.
Read-Only Mode
By default, readwrite=false prevents the agent from modifying files on disk. This is the safe default for exploratory and analytical tasks:
mini-a readwrite=false useshell=true
Set readwrite=true only when you explicitly want the agent to create or modify files.
Built-in file-access boundaries
fileallow accepts existing files/directories as an array, JSON/SLON string, or comma-separated string. Files allow that exact file; directories allow descendants. Omit it to preserve existing access, or use fileallow='[]' to deny covered access. Empty entries, invalid lists and nonexistent entries are errors. Use arrays for paths containing commas or significant surrounding spaces. Paths resolve from the process working directory with canonical symlink, .. and directory-boundary checks; globs are not expanded.
# These directories must already exist; include separately stored skills too.
mini-a useutils=true utilsroot=/srv/project \
extraskills=/srv/skills fileallow='["/srv/project", "/srv/skills"]' \
goal="Review the project"
Coverage includes prompt/agent/plan files and automatic AGENTS.md, local skills/references, attachments from local paths, utility file/document/image operations, local-file URLs, validator and proxy parameter files, local wiki roots/mounts/index directories, ingestion/absorption inputs, evaluation files, plugin manifests and explicit output paths. utilsroot, readwrite and policy restrictions still apply. Allow the containing directory for new outputs/backups. Existing wiki indexes cannot bypass a denied root.
Advanced web treats the list as server-controlled: browser settings, presets, restored sessions and agent-profile metadata cannot widen it. Children inherit it. Restart the server after changes; start a new conversation to discard previously loaded content.
The list covers built-in data access. Managed runtime/history/log/cache/temp files still operate; browser uploads authorize only their staged bytes. Shell commands, external MCP servers, hooks, custom libraries and executable plugin code require separate isolation. Remote HTTP/S3/Elasticsearch content is outside this list. Canonical checks are application checks and cannot prevent concurrent filesystem replacement atomically.
OS Sandboxing
mini-a includes built-in OS-level sandboxing via usesandbox. Use this when you want the agent’s shell commands to run inside a restricted OS environment without setting up a container runtime. For custom runtimes (Docker, Podman, firejail, custom wrappers), use shell= instead.
Built-in presets
| Value | Behavior |
|---|---|
auto |
Detects host OS and applies the default preset for that platform. |
linux |
Uses bwrap (bubblewrap). Host filesystem is read-only; private temp/home area; readwrite=true widens writes to the current working directory and temp paths only; sandboxnonetwork=true adds --unshare-net. |
macos |
Uses sandbox-exec. If sandboxprofile is omitted, mini-a auto-generates a restrictive profile with read access to the host, private temp/home writes, optional current-directory writes via readwrite=true, and network blocked when sandboxnonetwork=true. |
windows |
Best-effort PowerShell wrapper with ConstrainedLanguage mode, isolated temp/home paths, and a narrowed environment. sandboxnonetwork=true applies proxy/environment blocking. Does not provide Linux-equivalent filesystem or guaranteed network isolation — combine with WDAC/AppContainer for stronger policy. |
If the selected backend is unavailable (e.g. bwrap or sandbox-exec is missing), mini-a warns and continues without sandboxing.
macOS (sandbox-exec)
- Use the built-in restriction flags when you only need to block specific binaries (combine
shellallow,shellbanextra,shellallowpipes,checkall=true). - Use
usesandbox=macoswhen you want mini-a to generate a restrictive host sandbox automatically. - Use
shell=when you want a custom.sbprofile or a stronger container boundary. readwrite=truewidens writes to the current working directory and temp paths only.sandboxnonetwork=trueremoves network access from the generated profile.
mini-a goal="catalog ~/Projects" useshell=true usesandbox=macos
Linux (bubblewrap)
- Use
usesandbox=linuxwhenbwrapis installed and you want read-only host access with a private temp/home area. - Use
shell=when you need a containerized runtime, custom namespace/network policy, or a guaranteed writable environment beyondreadwrite=true. readwrite=trueadds writes to the current working directory and temp paths only.sandboxnonetwork=trueadds--unshare-net.
Windows (best-effort PowerShell)
- Use
usesandbox=windowsfor safer defaults around temp/home isolation without extra tooling. - Use
shell=or platform tooling (WDAC, AppContainer, Windows Sandbox) when you need enforceable OS policy. sandboxnonetwork=trueis best-effort only via proxy/environment blocking.
macOS Sequoia (container CLI)
On macOS 15+, you can run mini-a inside an Apple container-managed environment via shell=:
container run --detach --name mini-a --image docker.io/library/ubuntu:24.04 sleep infinity
mini-a goal="inspect /work" useshell=true shell="container exec mini-a"
Docker and Podman via shell=
Run every shell command inside a long-lived container by setting shell= to the exec command:
# Docker
docker run -d --rm --name mini-a-sandbox -v "$PWD":/work -w /work ubuntu:24.04 sleep infinity
mini-a goal="summarize git status" useshell=true shell="docker exec mini-a-sandbox"
# Podman (rootless)
podman run -d --rm --name mini-a-sandbox -v "$PWD":/work -w /work docker.io/library/fedora:latest sleep infinity
mini-a goal="list source files" useshell=true shell="podman exec mini-a-sandbox"
Hook alternatives (recommended for strict policy)
- Use
before_shellhooks to deny commands by path, arguments, time window, or user context. - Use
after_shellhooks to audit output, redact sensitive data, and trigger alerts. - Combine hooks with
usesandboxorshell=so both policy checks and OS-level sandboxing are active.
Tip:
shellallow,shellbanextra,shellallowpipes,checkall, andbefore_shell/after_shellhooks are separate policy layers that remain active even whenusesandboxorshell=is set.