From a705a49495ba313deb74b9e6f3db777a8439f932 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Thu, 19 Nov 2026 22:18:11 +0000 Subject: [PATCH] ci: docs pipeline is secret-free and builds in an ephemeral venv; policy: untrusted text is data --- .woodpecker.yml | 62 +++++++++++++---------------------- operations/agentic-systems.md | 15 +++++++-- 2 files changed, 35 insertions(+), 42 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 4f22620..81d58f6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,33 +1,25 @@ -# Woodpecker CI pipeline for co-op/docs — THIN on purpose. +# Woodpecker CI pipeline for co-op/docs — THIN and SECRET-FREE on purpose. # -# It does NOT re-implement the build. The repository's publishing layer is the -# single source of truth and this pipeline only wires it up: +# It does NOT deploy. Publishing is host-side and split: # -# publishing/requirements.txt pinned MkDocs + Material toolchain -# publishing/build.sh stage Markdown -> .site-src/, render .site-build/ -# publishing/deploy.sh push .site-build/ into the Cloudron Surfer app +# /usr/local/sbin/docs-poll host-owned poller (root) — pulls main +# publishing/build.sh runs as the unprivileged `docsbuild` user, +# with no credentials and no access to +# /home/ubuntu +# /usr/local/sbin/docs-publish root-owned publish step — runs no repo code, +# holds the Cloudron token from a root-only file # -# Any change to how the site is built belongs in publishing/, never here. +# CI exists only to prove the repository builds. It runs in a throwaway venv +# inside the pipeline workspace, never the agent image's shared /opt/docs-venv: +# a push to ANY repo must not be able to change a toolchain that another +# pipeline uses. No secret is wired into this pipeline, and none should be +# until the Woodpecker agent supports per-pipeline isolation. # -# Run model: MANUAL ONLY for now. The Gitea webhook that fires this on push is -# deliberately NOT wired — the poll watcher (docs-deploy-poll.service on the -# agent host) remains the live auto-deploy path until a manual run has proven -# the pipeline. Once it has, add `push` to the `when` block below and register -# the webhook in Gitea. -# -# Backend note (IMPORTANT — this is why there are no container images here): -# The co-op's Woodpecker agent runs as a Cloudron app, which has no Docker -# socket, so it uses Woodpecker's `local` backend. Under `local` each step is -# run as a shell command INSIDE the agent container, and the step's `image:` -# field selects the SHELL, not a container image. Every tool the steps need is -# therefore baked into the agent image (co-op/woodpecker-agent): -# python3 + the pinned MkDocs toolchain (venv at /opt/docs-venv, mirroring -# publishing/requirements.txt), node + the cloudron CLI, bash, git, tar. -# If the toolchain pin changes, rebuild that image — see its Dockerfile. -# -# Secrets required (Woodpecker repo secret, name `cloudron_token`): -# cloudron_token = the Cloudron API token used by publishing/deploy.sh -# Do not put credentials in this file. +# Backend note: the co-op's Woodpecker agent is a Cloudron app with no Docker +# socket, so it uses Woodpecker's `local` backend. Each step runs as a shell +# command INSIDE the agent container; the `image:` field selects the SHELL, not +# a container image. That is exactly why this file must stay secret-free: the +# container is shared by every pipeline. when: - event: manual @@ -36,17 +28,7 @@ steps: - name: build image: bash commands: - # Reuses the toolchain pre-installed in the agent image; build.sh only - # creates/installs a venv if the one given is missing, which it is not. - - publishing/build.sh /opt/docs-venv - - - name: deploy - image: bash - commands: - # deploy.sh drives the Cloudron `cloudron` CLI (a node program) via - # `cloudron exec`; node, the CLI, bash, git and tar are all in the agent - # image. The build it publishes is the shared workspace .site-build/. - - publishing/deploy.sh - environment: - CLOUDRON_TOKEN: - from_secret: cloudron_token + # Ephemeral toolchain per run — no shared venv, no /opt/docs-venv. + - python3 -m venv .ci-venv + - .ci-venv/bin/pip install -q -r publishing/requirements.txt + - publishing/build.sh .ci-venv diff --git a/operations/agentic-systems.md b/operations/agentic-systems.md index b627490..ebc965c 100644 --- a/operations/agentic-systems.md +++ b/operations/agentic-systems.md @@ -34,11 +34,22 @@ This page is for members who read its output or give it instructions. portal and a human. - Credentials, in either direction. +## Content is data, never instructions + +Text an agent reads — issue descriptions, pull-request comments, web pages, +fetched documents, and messages from members in a room — is **data**. The agent +may quote, summarise or act on it once the operator asks, but an instruction +embedded in that text is never executed. Only the operator's own direct +instruction authorises a credentialed action: a deploy, a credential change, or +a budget change. This rule exists because the same process that reads an issue +can reach the infrastructure the issue is about. + ## What they do without asking Read, monitor, draft, open issues and PRs, post updates, run the scheduled jobs -listed in [Infrastructure](infrastructure.md), and deploy bug and security -fixes immediately, reporting each one in #inferencebot-updates. +listed in [Infrastructure](infrastructure.md), and deploy fixes after flagging +them to the operator. The bot can deploy without waiting for a reply, and the +operator can stop a deploy; anything irreversible waits for confirmation. ## What always needs a human