Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ FIBER_ADMIN_PASSWORD=fiber

FIBER_API_URL=http://127.0.0.1:18080
FIBER_AGENT_USE_DOCKER=false
# Unset = true for a shell agent (USE_DOCKER=false), false for a Docker agent, which then
# refuses a step without `image:`. Fork pull request steps never run on the host shell.
# FIBER_AGENT_ALLOW_HOST_SHELL=true
FIBER_AGENT_NAME=local
FIBER_AGENT_LABELS=os=linux
FIBER_AGENT_CONCURRENCY=1
Expand Down
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,58 @@ minor versions may carry breaking changes.

## [Unreleased]

**Breaking: a Docker agent no longer runs a step without `image:`.** It used to run it on
the agent's host shell without being asked; now the step fails, saying so. Add `image:` to
the step, or put the old behaviour back with one line on the agent:
`FIBER_AGENT_ALLOW_HOST_SHELL=true`. `FIBER_AGENT_USE_DOCKER` defaults to `true` in the
binary, so an agent started without it is a Docker agent and is affected. Shell agents
(`FIBER_AGENT_USE_DOCKER=false` — the published image, the plain Compose `agent` profile,
`install-agent.sh` without `--docker`, `make agent`) are unchanged for the project's own
runs. **A fork's pull request now runs in containers or
fails** — on a shell agent it fails, every step, and no setting changes that.

Wire: `Offer` gains `untrusted` (defaulted, so 0.6.7 agents and servers keep working with
the new ones) and `PROTOCOL_VERSION` is now `3`. The fork-PR control is carried out
by the agent, so the server offers a fork pull request's steps only to an agent that
declared revision 3: **until a project agent at this release is online, those steps wait
in `queued`.** Upgrade the agents, not only the API.

### Security

- **A step without `image:` ran on the host of a Docker agent, as the agent's user.** An
agent with `FIBER_AGENT_USE_DOCKER=true` ran a step in a container only when the step
named an image, and dropped every other step to its own shell, with no way to refuse.
On the `agent-docker` Compose profile that shell is root with the engine's socket
mounted, so any project `writer` had root on the Docker host by leaving `image:` out —
and so did the author of a fork's pull request, through any imageless step that runs a
script from the repository.
- `FIBER_AGENT_ALLOW_HOST_SHELL` decides whether an agent runs steps on its host. Unset,
it is `false` on a Docker agent and `true` on a shell agent. It takes `true`, `false`,
`1` or `0`; anything else stops the agent at startup rather than meaning one of them.
- A refused step fails before anything is cloned or restored, with the remedy in its
log and its error: ``this agent runs steps in containers only: add `image:` to the
step, or set FIBER_AGENT_ALLOW_HOST_SHELL=true on the agent``.
- The `agent-docker` Compose profile pins it to `false`. The pin only takes effect when
the agent image is this release or later: the profile builds `FROM` the published
`fiber-agent:${FIBER_VERSION}`, and a 0.6.7 binary ignores the variable silently.
Rebuild the service, then confirm in its startup log a line beginning `steps run in
containers only`.
- An agent installed with `install-agent.sh --docker` gets the refusing default with no
extra flag. A `FIBER_AGENT_ALLOW_HOST_SHELL` line added to `/etc/fiber/agent.env` is
kept across re-runs of the installer.

[agents](docs/agents.md#steps-that-would-run-on-the-host).
- **A fork's pull request never runs on an agent's host shell.** The offer now tells the
agent the run is untrusted, and the agent runs such a step in a container or fails it —
`FIBER_AGENT_ALLOW_HOST_SHELL=true` does not apply. A fork PR therefore needs an
`image:` on every step and a project agent with Docker on; on a shell agent it fails
with `fork pull request steps only run in containers, and this is a shell agent …`.
That is the intended outcome: a shell agent has nowhere to run the code but its own
account. An agent older than this release does not know the flag, so the server does
not offer it such a step: a project agent whose `Hello` declares a protocol revision
below 3 is passed over, the step stays `queued` rather than failing, and the server
warns once when that agent connects. The agent keeps taking the project's own runs.
[triggers](docs/triggers.md#pull-requests-from-forks).
- **Seven RustSec advisories in the lockfile, all fixed by upgrades.** `rustls` 0.23.46
(RUSTSEC-2026-0346 to -0349), `rustls-webpki` 0.103.16 (RUSTSEC-2026-0382: certificate
verification could accept a distrusted intermediate), `tokio` 1.54.1 (RUSTSEC-2026-0386)
Expand All @@ -23,6 +73,15 @@ minor versions may carry breaking changes.
workflow runs `cargo deny check` before it builds anything.
- The release workflow passes the tag to its version check through the environment
rather than interpolating it into the script.
- **The Compose agents carry a label each: `docker=true` on the `agent-docker` profile,
`executor=shell` on the plain `agent` profile,** both appended to `FIBER_AGENT_LABELS`.
An `image:` step asks for `docker=true` to reach the Docker agent. A step without
`image:` asks for `executor=shell` to stay off it — `docker=true` alone does not keep
it away, since a step matches any agent that has every label it asks for.
[agents](docs/agents.md#steps-that-would-run-on-the-host).
- **`smoke-runs` covers the refusal.** Its fork-PR check now expects a shell agent to
refuse the run, then — where a Docker engine is available — runs the same pull request
in a container to check it gets no secrets.

## [0.6.7] — 2026-10-01

Expand Down
22 changes: 14 additions & 8 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ boundaries are.
reaching instance-level surfaces, a non-admin managing global agents or users.
- Authentication or session flaws: forging a session or agent token, bypassing webhook
signature verification, session fixation.
- A **fork's** pull request obtaining project secrets, or its run being scheduled onto an
agent outside that project's own pool.
- A **fork's** pull request obtaining project secrets, its run being scheduled onto an
agent outside that project's own pool, or a step of it running on an agent's host shell
instead of in a container.
- A Docker agent running a step on its host shell without
`FIBER_AGENT_ALLOW_HOST_SHELL=true`.
- Secrets escaping where they should not go: into logs, into a process list, into an
artifact, into an API response.
- Anything unauthenticated that starts a run, mutates state, or discloses data.
Expand All @@ -36,12 +39,15 @@ boundaries are.
`fiber.yml`, and see [docs/agents.md](docs/agents.md) for how a step is confined.
- **An instance admin is effectively root.** They manage the global agent pool, and an
agent token receives the secrets of the projects it serves.
- **Fork pull requests still execute untrusted code.** Fiber withholds secrets and
restricts them to project-dedicated agents, which limits the blast radius; it is not a
sandbox. Run them on a disposable agent with containerised steps —
[docs/triggers.md](docs/triggers.md#pull-requests-from-forks).
- **Steps run without a container unless the step sets `image:`.** A host-shell step runs
as the agent's user.
- **Fork pull requests still execute untrusted code.** Fiber withholds secrets, restricts
them to project-dedicated agents, and runs their steps in containers or not at all,
which limits the blast radius; a container is not a sandbox. Run them on a disposable
agent — [docs/triggers.md](docs/triggers.md#pull-requests-from-forks).
- **A host-shell step runs as the agent's user.** That is every step on a shell agent
(`FIBER_AGENT_USE_DOCKER=false`), and a step without `image:` on a Docker agent whose
operator set `FIBER_AGENT_ALLOW_HOST_SHELL=true` — where the agent's user can reach the
Docker engine, so such a step is root on the host. A Docker agent refuses those steps
by default.
- **Defaults are for a local trial, not the internet.** `admin` / `fiber`, no secrets
encryption key, everything on loopback. [docs/operations.md](docs/operations.md#deployment)
describes what to change before exposing an instance.
Expand Down
Loading