security: constrain dogfood delivery execution (#1487)

This commit is contained in:
2026-08-30 16:51:28 -05:00
parent 8356e72c1c
commit f194ccb8a3
13 changed files with 672 additions and 52 deletions
+8 -5
View File
@@ -226,10 +226,12 @@ seat outside the container, then set these paths in `.env`:
```dotenv
MOSAIC_DOGFOOD_WORKTREE=/path/to/mosaic-stack-worktrees/dogfood-1487
MOSAIC_DOGFOOD_COMMON_GIT_DIR=/path/to/mosaic-stack/.git
MOSAIC_DOGFOOD_SEAT_HOME=/path/to/.mosaic/fleet/agents/stack-dogfood
```
The seat home must contain only that seat's credential at
The common Git directory must match the worktree's `.git` pointer. The seat home
must contain only that seat's credential at
`secrets/gitea-mosaicstack-stack-dogfood.token`. Never place the token value in
`.env`. Start the overlay with:
@@ -240,10 +242,11 @@ docker compose \
--profile stack up -d
```
The overlay scopes regular-agent tools to the mounted checkout. For issue and PR
operations, instruct the agent to use `/opt/mosaic/tools/git/`. The gateway image
configures `git-credential-mosaic` as Git's system credential helper, so pushes and
`pr-create.sh` resolve only the `stack-dogfood` slot and fail if it is absent.
The overlay removes the general shell tool for every session, including admins.
File tools stay inside the mounted checkout. Two dedicated delivery tools stage
explicit paths, run the CI queue guard, push through `git-credential-mosaic`, and
open PRs through `pr-create.sh`. They resolve only the `stack-dogfood` slot and fail
if it is absent.
This deployment route is separate from the local source-development restrictions
below.