Safety and permissions
Tapplack is designed to be useful without being unrestricted. Boundaries are enforced in code, not just requested in prompts. This page describes what is actually enforced.
Workspace confinement
Section titled “Workspace confinement”Agents may only read and write files under workspaceDir (default ./workspace, relative to where
you launched the CLI).
Every path is resolved and checked against the workspace root. Escapes are rejected:
..traversal,- absolute paths outside the root,
- symlink-style resolution that lands outside.
The failure is a tool error the model can read and adapt to. It is not a crash, and it is not possible to bypass by rephrasing the task.
Set a different root:
tapplack config set runtime.workspaceDir ./work# orDEFAULT_WORKSPACE=./work tapplackThe command whitelist
Section titled “The command whitelist”run_command can only start a small set of binaries:
| Binary | Purpose |
|---|---|
node |
Run a local JS/TS file, or --version. |
pnpm |
Package scripts and checks. |
npm |
Package scripts and checks. |
npx |
Run a local package binary. |
tsc |
Type-check. |
tsx |
Run TypeScript directly. |
git |
Controlled version control (see below). |
ls, cat, echo, pwd, head, tail, wc, grep, find |
Basic file inspection. |
Anything else is refused with an error naming the allowed commands. This is a code workspace, not a general shell.
Some arguments are forbidden per binary, for example global installs (pnpm --global, npm -g,
pnpm dlx). Network-touching package commands are gated by the network policy below.
No shell, no interpolation
Section titled “No shell, no interpolation”Commands run with spawn and an argument array, with shell: false. That means:
;,&&,|,>,$()and friends are inert — they are literal arguments, not shell syntax.- No globbing, redirection, or variable interpolation happens.
- Control characters (
\r,\n,\0) in arguments are rejected.
The child process gets a curated environment. Provider API keys are not passed through, so a command cannot read your secrets from its environment.
Commands run inside the workspace as their working directory. On Windows, process-tree termination
is handled with taskkill /T; elsewhere a process group is used, so a hung child does not survive
the run.
Resource limits for commands
Section titled “Resource limits for commands”| Limit | Value |
|---|---|
| Command timeout | 300 s |
| Output cap | 16,000 characters |
| Working directory | The workspace root. |
Output over the cap is truncated in the tool result, not buffered forever.
Git policy
Section titled “Git policy”Git is allowed, but with a deliberate safety policy. Read operations are open; write operations are narrowed to feature branches.
Allowed subcommands: status, diff, log, show, branch, rev-parse, ls-files, add,
commit, checkout, remote, push.
Blocked subcommands: reset, clean, rebase, filter-branch, gc, rm, mv.
Blocked flags: --force, -f, --hard.
Remote: read-only only — -v, get-url, show. Mutations (add, set-url, remove,
rename, prune, set-head) are refused.
Push: pushing to main or master is refused. Push a feature branch.
Commit: requires -m or --message, and the message must follow Conventional Commits —
<type>(<scope>): <description>, for example feat(auth): add login endpoint.
Checkout: branches only. Pathspec checkout (-- <file>, .), commit hashes, and detached HEAD
are refused. Branch names must be lowercase with digits, hyphens, and slashes.
The effect: the agent can stage and commit work and push a feature branch, but cannot rewrite history, wipe the tree, or push directly to a protected branch.
Network policy
Section titled “Network policy”Web tools (web_search, web_fetch) and network-capable package commands are controlled by
runtime.allowNetworkTools. The default config template sets it to false.
Enable it explicitly:
tapplack config set runtime.allowNetworkTools true# orALLOW_NETWORK_TOOLS=1 tapplackWhen disabled, the web tools are refused and the model is told they are unavailable. The command summary shown to the model hides network-gated binaries accordingly.
Human approval
Section titled “Human approval”write_file and run_command can be held for human review. Set autoApply: false on an agent:
tapplack config set agents.assistant.autoApply falseThe exact action is intercepted before it runs, previewed, and applied only on your instruction. See Human approval.
Secrets
Section titled “Secrets”- Config reads mask secrets (
show,get, status output). - At-rest storage is the JSON file. The
.tapplackdirectory is created with owner-only permissions (0700). - Environment variables can hold keys instead of the file.
.envfiles are not loaded automatically, so a stray.envcannot silently change behavior.- API keys are not injected into child command environments.
Do not commit a config that contains keys. If you need to share a setup, ship a template with empty
apiKey fields.
What is not protected
Section titled “What is not protected”These are honest limits, not guarantees:
- No OS sandbox. Commands run as your user. The whitelist limits what can be started, but whitelisted tools can still do real things inside the workspace.
- No network isolation when network tools are enabled.
- Workspace scope is path-based, not a container boundary.
- Approval is cooperative — if you approve an action, it runs as reviewed.
For hostile or untrusted work, run in a disposable directory, a container, or a VM, and keep network tools off.
- Human approval — the review workflow.
- Configuration — set the boundaries.
- Runs and artifacts — audit what happened.