Daemon policy: require every host command to be fenced (image:, sandbox:), with a two-key opt-out
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with accept() in internal/cli/daemon.go and visitContainerSettings in internal/config/container.go, then trace how daemon configuration is loaded and how set and restore report acceptance failures. The proposal spans policy checks, several command types, validation, and UI reporting; first agree on the staged scope. Done means the selected stages enforce the documented fence rules and opt-outs, with warn and enforce behavior verified for set, restore, and validate.
Written by the indexing model from the issue text.
Description
Problem
Whether a command runs fenced (image:, sandbox: true, a docker+ worker) is entirely the pipeline author's choice. A daemon operator has no way to say "nothing runs bare on this machine". A pipeline someone else sets, or an old one nobody updated, runs model-chosen or third-party commands as the daemon's own user.
Proposal
A steps web option, so it can live in the web: key of --config:
web:
fence: off | warn | enforce
allow-unfenced:
some-pipeline: [task post, resource_type archive]
off: today's behavior.warn: accept, but list unfenced entities inset's answer and in the UI.enforce: refuse atset, and at boot restore. A stored pipeline that no longer complies is shown broken, the same path a--workerchange takes.
Where it plugs in
accept()ininternal/cli/daemon.goalready runs on bothsetand restore, and already refuses with reasons the terminal prints.CheckSecretSourcesis the precedent for a daemon-config fact deciding acceptance.visitContainerSettings(internal/config/container.go) already visits every command-running entity with its resolvedimage:andsandbox:. The check is one more visitor.- The config file is already the privilege boundary: owner-only permissions, never discovered from a repo. A pipeline cannot loosen the policy that judges it.
What counts as fenced
| Fenced | No command, nothing to fence | Unfenced |
|---|---|---|
image: without privileged: true |
expr: types, Go built-ins, approval:, load_var: |
everything else |
sandbox: true, only when the daemon is darwin |
agent file tools on the host (path-confined by steps) | |
placed on docker+ssh://, aws://, gcp://, do:// |
These are machine facts, so they belong in accept(), not the file validator:
sandbox: trueon a Linux daemon is refused atset; today it fails at the step.- A step placed on a bare
ssh://worker counts as unfenced. privileged: truecounts as unfenced.
Opt-out: two keys
An entity is exempt under enforce only when both hold:
- The pipeline declares it, e.g.
unfenced: "<reason>"on the entity. The reason shows in diffs and the UI. - The daemon config allowlists it (
allow-unfenced:, keyed by pipeline and entity).
Why both:
- A pipeline-only opt-out is self-certification, worthless against a pipeline you didn't write.
- A config-only opt-out hides the reason from whoever reads the pipeline.
- A renamed entity drops off the allowlist and is refused. That's the safe direction.
Alternatives considered:
- Approval pinned to content. An admin approves an entity's merkle digest, and any edit needs re-approval (Jenkins script approval). Strongest; a candidate later for multi-tenant daemons.
- Role-gated opt-outs. Only an admin's
setmay carry them. Depends on auth being on.
Gaps to close before enforce is usable
Today these have no fence option at all, so enforce would refuse them with no way to comply:
- Inline
run:steps, including every job hook.sandbox:exists only ontasks:/agents:/resource_types:entries. Proposal: acceptsandbox: trueon the step itself. A true-only setting cannot weaken an entry's fence. - The built-in
gittype runs hostgit, and a custom type cannot reuse the name to add animage:.- Plain gets could be sandboxed automatically.
fetch: trueon a localuri:writes into the source clone, outside the workspace, so it needs an opt-out or a "built-ins are engine code" rule.
- Stdio MCP servers are documented as not fenced under either setting. Needs
image:/sandbox:on the server definition. A server whosecommand:isdocker run …is fenced in practice, but steps cannot tell. - The CLI agent process is always a host subprocess, and with
settings: projectit executes the target repo's.claude/hooks on the host. Suggested rule: fenced enough withoutsettings:;settings: projectneeds an opt-out. mcp_exportscustom commands have nosandbox:;image:covers them.
Edges
steps runandsteps testnever consult the daemon (--configis ignored). That's fine, since the operator is the one running them. Butsteps validate --config <file>should report against the policy, so a pipeline can be checked beforeset.sandbox:fences writes, not reads. Reads stay open except credential paths, and the network stays open unlessnetwork: none. A stricter mode requiringnetwork: noneshould be a separate knob, not folded into this one.expr:file()/env()read the host in-process. They are out of scope, since no command runs.- Rollout:
warnfirst.enforceturns every non-compliant stored pipeline into broken on the next restart.
Suggested order
- Step-level
sandbox: true(gap 1). It unblocks the most and is useful on its own. fence: warn, plus thesteps validate --configreport.- The two-key opt-out and
fence: enforce. - MCP server fencing and the built-in
gitdecision (gaps 2–3).
- Dominant language
- Go
- Stars
- 14
- Forks
- 2
- Avg merge
- 2h 28m
- Merged PRs (30d)
- 21
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jtarchie/steps
-
Linear: confirm issue history comes back newest-first, or a retry from the board can stop workingOpen
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 49/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
jtarchie/steps#259 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
messaging/v1: IsGRPCProtocol and InternalMetadataToGrpcMetadata panic on empty or nil metadata valuesPossibly taken @patelshivani2283-lab claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
stacklok/toolhive-catalog#2024 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day