Installation
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install docker-sandboxes-kits@skills-hub
Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled).
Plugin docker-sandboxes-kits v1.0.0 follows the Agent Plugins spec.
gh skills-hub install docker-sandboxes-kits Don't have the extension? Run gh extension install samueltauil/skills-hub first.
Download and extract to your repository:
.github/skills/docker-sandboxes-kits/ Extract the ZIP to .github/skills/ in your repo. The folder name must match docker-sandboxes-kits for Copilot to auto-discover it.
Skill Files (14)
SKILL.md 20.6 KB
---
name: docker-sandboxes-kits
description: >-
Use this skill when authoring, verifying, publishing, or composing a Docker Sandboxes kit, even if the user just says they want to "add a tool to a sandbox agent", "package a CLI or agent as a kit", "publish a kit to a registry", or "give a mixin its own credentials and network access". Covers the v3 kit descriptor (`# syntax=docker/sandbox-kit:3`, `kind: workload` or `mixin`, typed capabilities, provides/requires, content recipes), building with docker buildx, checking with kit-tck and `sbx kit inspect`, composing onto a workload, referencing and pinning a kit from an `sbxenv.yaml` `agent:`/`kits:` entry, and publishing and signing. Legacy v2 `spec.yaml` kits are not covered; `sbx kit validate` is not a substitute for kit-tck conformance and runtime checks.
license: Apache-2.0
compatibility: Experimental. Needs docker buildx, kit-tck, and an sbx release with Kits v3 support (adapted from docker/sandbox-kit-spec at 4d932451613f8df89c8468e2bb7c5286882897ca; build/conformance tested 2026-11-02; authenticated inspect/validate and composition tested on sbx v0.50.1 with optional agent-context@2; sbxenv.yaml kit-reference rules sourced from sbx v0.51.0 docs, help, and earlier runtime records, not re-run here). Not the legacy docker sandbox wrapper. See references/sources.md.
---
# Docker Sandboxes: Kits (v3 descriptors)
## Overview
A **kit** extends a sandbox with a tool, an agent, credentials, or policy. In
v3 a kit is one OCI image: its layers are the content, and a manifest
annotation carries the **descriptor**, which says what the kit offers, what it
needs from the host as typed capability requests, and what it needs from
other kits. An engine that does not read the annotation runs it as an
ordinary image.
The source is a `<kit>.yaml` whose first line is
`# syntax=docker/sandbox-kit:3` with `schemaVersion: "3"`, usually beside a
`<kit>.dockerfile` content recipe. The kinds are `workload`, `mixin`, and
`set` (a list of other kits). Build and check with `docker buildx build`,
`kit-tck validate`, `sbx kit inspect`, and a real `sbx run` composition.
Scope and guardrails:
- **Legacy v2 `spec.yaml` kits (`schemaVersion: "2"`, `kind: sandbox`) are
not covered here.** This is the skill's routing boundary, not a claim that
v2 has been deprecated or removed. This skill neither authors nor debugs
them. If the user has one, say so and offer to write the v3
equivalent as a new descriptor (see "Migrating from v2").
- **`sbx kit validate` is not a conformance check.** The v0.50.1 code supplies
a v3 builder to both normal `validate` and `inspect`. Both need an
authenticated daemon; `--offline` deliberately omits the builder and
rejects v3 source kits. A normal validate success is therefore allowed,
but does not replace `kit-tck` or real runtime composition.
- Do not carry v2 vocabulary into v3: `name`, `sandbox:`,
`permissions.network`, `credentials:`, `setup.*`, and `--kit-arg` are not v3
fields, and v2 composition rules (additive allow lists, duplicate-service
credential failures) are not established for v3.
- This skill is experimental. The source calls the schema-3 grammar
unfinished and says the Go implementation wins over its docs, so re-check
fine details against the spec before relying on them.
- No minimum `sbx` version for Kits v3 is established by the source, which
says only that current stable releases support it in local and cloud mode.
Check the installed `sbx` rather than assuming.
## When to use this skill
Activate this skill when:
- The user wants to create a new kit: package a CLI or agent as a kit, add a
tool, credential, or policy to an existing agent, or add a `-mixin` variant.
- The user asks what a kit descriptor should contain, whether to write a
workload or a mixin, or which capabilities a kit should request.
- The user wants to pin a tool version, declare `provides`/`requires`, or
write the content recipe (`<kit>.dockerfile`) for a kit.
- The user wants to build, check, publish, or sign a kit, or to compose a
built kit onto a workload and test it.
- The user has an existing v2 `spec.yaml` and wants it converted to v3.
- The user wants to reference, configure, or pin a kit from an `sbxenv.yaml`
file's `agent:` and `kits:` fields, or asks which file fields a kit's
capabilities need (bindings, mounts, ports).
## Do not use this skill when
Do not use this skill when:
- The task is creating, running, or removing the sandbox a kit is composed
into, independent of the kit's own content — use
`docker-sandboxes-lifecycle`.
- The task is what a credential or network rule actually does at runtime
(proxy injection, allow/deny precedence, the policy a sandbox currently
has), where a user stores a secret value, or secrets and policy unrelated
to any kit — use `docker-sandboxes-network-credentials`.
- The task is the rest of an `sbxenv.yaml` file — lifecycle hooks, the
approval plan, multi-file merging, user defaults, or the format of its
`secrets:`/`registries:` blocks.
No skill in this catalog owns those; use `docker-docs` to answer from the
current Docker Docs environment files page. This skill owns only the
`agent:`/`kits:` references and the fields a kit's capabilities map onto.
- The task is general Dockerfile or image-build optimization unrelated to a
kit's recipe — use `docker-build-strategies`.
- The task is to author, validate, or debug a legacy v2 `spec.yaml`. It is out
of scope; offer migration instead.
- The task is a bulk migration of v2 kits to v3. The source names a
`migrate-kit-to-v3` skill and a field-by-field mapping, but that skill is
not part of this catalog and may not be installed; do not route to it
unless it is available. See "Migrating from v2" below.
## Core guidance
### v3: choose workload or mixin first
Everything else follows from the kind.
| | `kind: workload` | `kind: mixin` |
|---|---|---|
| Layers are | a root filesystem | an overlay landing on a workload |
| Per composition | exactly one | zero or more |
| Owns | entrypoint, env, user, workdir, a legacy context profile | env, labels, ports and volumes, which merge; an agent mixin can select an explicit context profile |
| Must have content | yes | no — may be declaration-only |
- Write a **workload** when you own the environment the agent runs in. Write a
**mixin** when you add a tool, a credential, or a policy to somebody else's.
Most new kits should be mixins; a tool worth shipping as a workload is
usually worth shipping as both (the source's `claude` and `claude-mixin`
examples are that pair).
- A mixin cannot set `ENTRYPOINT`, `CMD`, `USER` or `WORKDIR` and have it take
effect: the workload anchors the composition and owns those fields. The
additive fields merge (env, labels, ports, volumes), so a mixin's `ENV`
reaches the composed image and `PATH` is appended rather than replaced.
- Prefer `ENV` for static environment: it is what the agent process sees,
whereas profile and rc files do not run for the agent, so an
`/etc/profile.d/<kit>-env.sh` drop reaches a terminal the user opens but not
the agent. Use profile.d only when two mixins might set one variable to
different values (a hard composition failure) or the value only makes sense
in an interactive shell.
### v3: layout and descriptor
The default form is a companion pair found by filename stem: `<kit>/<kit>.yaml`
(first line `# syntax=docker/sandbox-kit:3`) and `<kit>/<kit>.dockerfile`
(omitted for a declaration-only mixin). Every key is `lowerCamelCase`, and
decoding is **strict**: an unrecognized key is an error, deliberately, because
a silently ignored misspelling would be a policy silently absent.
- `assets/v3-mixin-egress.yaml` is a complete declaration-only mixin. Its
build and all 19 layout conformance checks passed on 2026-11-02; runtime
composition initially failed on v0.50.1 because `agent-context@2` was
required. The explanatory note is now optional; the network request remains
required. Corrected composition and npm HTTPS access passed under the test
host policy. See `checks/authenticated-results.md` for scope and limits.
- `references/v3-capabilities.md` has the annotated descriptor skeleton, the
other authoring forms, and every capability type with its common mistakes.
### v3: capabilities — least privilege, and the rules most often missed
A capability is a typed request the host answers. The default is required and
fails resolution closed; `optional: true` means the kit degrades without it.
Request only what the kit needs. The rules below prevent the most common
failures; the full table is in `references/v3-capabilities.md`.
- `network-policy@1` is **phase-scoped**: an absent phase grants nothing.
Install-hook hosts go in `install`, runtime hosts in `runtime`, shared hosts
in both. `network-policy@2` bounds by HTTP method and path, is exclusive
with `@1`, and its bound should be verified on the target runtime before it
is treated as a security boundary.
- `credential@1` entries are required by default; add `optional: true` unless
the kit cannot run unauthenticated. Every `inject[].domain` must appear
exactly in each listed phase's allow list; a wildcard does not satisfy a
specific subdomain. Never put secret values in a descriptor, arg, or recipe.
- `ssh-agent@1`: set `unrestricted: false` and bound it (`sign: [git]`,
`authenticate: [git@github.com]`); the default signs anything with every key
the user's agent holds. Prefer `credential@1` over HTTPS when a token will do.
- `lifecycle@1` hook environments are deny-by-default; declare every variable
a hook or its child processes read, including `HTTP_PROXY`/`HTTPS_PROXY`.
- `privileged@1`, `host-mount@1`, `host-port@1` and `dockerd@1` widen what the
kit can touch. Do not declare them on speculation; host mounts are shared
with the host user and survive sandbox removal.
- Verify every flag in `agent-sessions@1` and `agent-interactive-sessions@1`
against the tool's real CLI; never invent one.
### v3: versions, provides, and requires
- **Pin the tool once.** Declare a build-phase `version` arg, wire it through
to the installer, and reference it from both `provides` and the top-level
`version:`, so one value drives the install, the matchable capability, the
published version, and the tag.
- **A pinned provide is a claim about content, so make the build enforce it:**
re-read the installed version and fail on mismatch. Pinning the provide
without pinning the install is worse than floating.
- **An unversioned provide is not a resting place.** Under `version: "1.0.0"`
it publishes `<tool>@1.0.0`, the kit's release number wearing the tool's
name; with no `version:` the build fails. Pin it, or drop the provide.
- **`requires` is a closed-set check.** A name nothing in the composition
provides makes the kit refuse to compose anywhere. It constrains the
composed runtime, not your build stage. Never require the platform floor
(`bash`, `sh`, `curl`, `git`, a CA store, the `agent` user at uid 1000), and
do not try to express a conditional dependency: let the hook probe and fail
with an actionable message. The test is "what must already be present, on
every base, for this kit to work at all"; usually that is nothing.
- Where a requirement is real, use `deb/` names (derived from a workload's
dpkg database; on multi-platform workloads, the intersection across
platforms), and never author a `deb/` provide yourself.
### v3: content recipes
Recipes for both kinds, the overlay ownership rules, the virtualenv trap, and
the audit are in `references/v3-recipes.md`. Read it before writing a mixin:
overlay ownership is the most common way a working-looking kit is broken. In
short: a mixin overlay stages under `/out` and copies into `scratch`, keeps
out of `/home/agent` where it can, and states numeric ownership for every
directory level it ships (`/home` root-owned, `/home/agent` uid 1000).
### v3: build, run, and verify
Create a named container builder once and select it for exports and
publication. The `docker` driver with the classic image store can drop
manifest annotations, leaving an image that is no longer a kit.
```sh
docker buildx create --name kit-builder --driver docker-container --bootstrap
```
```sh
# Run from the parent of <kit> and <workload>; subshells preserve that directory.
# 1. validate — the descriptor is checked before content is built. cacheonly
# drops the EXPORT, not the build: once valid, the whole recipe still solves.
(cd <kit> && docker buildx build --builder kit-builder . \
-f <kit>.yaml --output type=cacheonly)
# 2. build, exporting a layout so kit-tck can judge it without a registry
(cd <kit> && docker buildx build --builder kit-builder . -f <kit>.yaml -t <kit>:<version> \
--output type=oci,dest=/tmp/<kit>-layout,tar=false)
# 3. conformance — the tag alone, not <kit>:<version>
kit-tck validate --layout /tmp/<kit>-layout <version>
# 4. run it, no registry needed
sbx run ./<kit> . # a workload
sbx run ./<workload> --kit ./<kit> . # a mixin, composed
sbx kit inspect ./<kit> # requires authenticated daemon; see below
```
- `--app-name` isolates the Docker login store as well as daemon state.
Sign in explicitly to the test app before normal source inspection.
`--offline` is not an auth workaround for v3 sources: it deliberately
disables the builder to keep the command daemon-free. The observed
offline rejection is expected, not evidence that normal inspect is broken.
- v0.50.1 inspection shows a legacy-shaped summary, not the raw descriptor.
Use `kit-tck inspect --descriptor --layout <layout> <tag>` to read the typed
requests. Do not copy `sbx kit inspect --format json` output as v3 YAML.
- v0.50.1 supports v3 kits but not `agent-context@2` at composition time.
Only mark this request optional when its guidance is nonessential, as in
the egress asset; otherwise use a host with explicit support. Successful
inspection/validation does not prove required capability availability.
- **A build is not proof the kit works.** For a mixin, compose the built
overlay onto a real workload and run the tool with `sbx exec <sandbox> <tool>
--version`. Arguments after `--` on `sbx run` are agent arguments, so they
never execute the overlay's binary. Details and the ownership audit are in
`references/v3-recipes.md`.
- Inside a sandbox the kit is self-describing: `/usr/share/sandbox/kit/<kit>/kit.yaml`
is the published descriptor, `kit.dockerfile` the recipe, and
`/var/log/sbx-kit-startup.log` the startup hook output.
- Local recipe builds use host Docker Buildx when available, otherwise the
shared builder sandbox; see `references/v3-publish-and-sign.md` for the
`BUILDX_BUILDER` and `SBX_KIT_BUILDER` selectors.
- Install `kit-tck` from a pinned release or commit, not `@latest`, and record
which one you used. The source's `go install` line uses `@latest`.
### v3: publish and sign
Publishing is the build with `--push`: there is no pack step and no
`kit push` subcommand. Push both platforms in one invocation, tag the version
and `latest` together, and run `kit-tck validate` on the pushed reference.
Signing is optional: sign the digest from `--metadata-file`, never the tag,
and pin the whole certificate identity (repository, workflow file, and ref),
not an organization prefix. Commands and reasoning are in
`references/v3-publish-and-sign.md`.
A push writes to a registry and this skill cannot undo it. Get explicit
approval for the exact registry, repository, and tags first, and use a scratch
namespace for trials.
### v3: referencing a kit from sbxenv.yaml
An `sbxenv.yaml` (its own `schemaVersion: "1"`) composes kits through
`agent:` and `kits:`. The full rules and the capability-to-field table are in
`references/sbxenv-kit-references.md`; the ones that most affect kit authors:
- `agent:` is a built-in agent or the **handle** (last repository path
segment, `dir=` basename, or directory name) of the single `kind: workload`
kit under `kits:`; every other entry must be a mixin.
- An entry is a bare reference or `{source, args}`. Only `./…`, `../…`, `.`,
`..`, or `*.zip` are local paths (resolved against the declaring file);
pin OCI references as `tag@sha256:<digest>` and git ones with
`#ref=<commit>`, because tags are republished.
- A published kit accepts only **create-phase** args; build-phase args such
as `version` were fixed at publish time, so consumers change versions by
changing the tag.
- A required `credential@1` without a `bindings:` entry makes create fail;
an optional one is skipped silently. A `host-mount@1` path can be bound to
a chosen host directory with an optional `mounts:` entry.
- `sbx env plan` does not resolve kit references, and a mixin that
under-declares `requires` still plans cleanly. Only a disposable
`sbx env create` proves a composition installs.
### Safety boundaries and inverse operations
- Never run source examples blindly. Build, run, push, and sign commands here
are templates with placeholders; the operator runs them against disposable
resources.
- **Inverse operations are destructive and need explicit confirmation:** the
named builder is removed with `docker buildx rm kit-builder`, a test sandbox
with `sbx rm` (flags in `docker-sandboxes-lifecycle`), and local test images
with `docker rmi` (see `docker-destructive-guardrails`). Name only what you
created. Removing a sandbox instance deletes its volumes; host-mounted data
survives and stays visible to the host user.
- Keep descriptors, args, recipes, and build output free of secrets. Use
`credential@1` for credentials and let the host answer it.
- A registry push, a tag move, and a signature are not reversible by this
skill. State exactly what was pushed and signed.
### Migrating from v2
The v2-to-v3 field mapping is not part of the supplied source material, so this
skill does not map fields; do not guess one. For a request to convert a v2
`spec.yaml`: confirm the installed `sbx` can read v3, keep the v2 kit only as
a reference for intent, and write the v3 kit as a new descriptor using the
sections above. Check it with the v3 workflow (buildx, `kit-tck`, a real
composition); do not substitute `sbx kit validate` for those checks. If the
`migrate-kit-to-v3` skill or its mapping is available in the user's environment, use it as an
additional reference and say that it came from outside this catalog.
## Related skills
- For the sandboxes a kit is composed into (`sbx create`/`run --kit`, and
removing a test sandbox), use `docker-sandboxes-lifecycle`.
- For what a kit's credential and network declarations mean at runtime (proxy
injection, allow/deny precedence, the effective policy once global or
per-sandbox policy is included, where the user stores a secret value), use
`docker-sandboxes-network-credentials`. That skill's vocabulary is v2-era;
for v3, the capability rules in this skill apply to what a kit asks for.
- For `sbxenv.yaml` fields beyond `agent:`, `kits:`, and the capability
mappings above, no skill in this catalog applies; use `docker-docs` to answer
from current Docker Docs.
- For Dockerfile and build practices beyond kit recipes, use
`docker-build-strategies`.
- Before removing builders, images, or volumes created while testing a kit,
use `docker-destructive-guardrails`.
## References
- `references/v3-capabilities.md` — v3 descriptor skeleton, authoring forms, every capability type with common mistakes, volume and host-mount semantics, groups, and final-environment references.
- `references/v3-recipes.md` — workload and mixin overlay recipes, ownership rules, and how to verify an overlay.
- `references/v3-publish-and-sign.md` — publishing with buildx, tagging, cosign signing and verification, and tooling notes.
- `references/sbxenv-kit-references.md` — `agent:`/`kits:` reference shapes, handles, kit args, pinning, the capability-to-`sbxenv.yaml` field mapping, and what `sbx env plan` does not prove.
- `references/sources.md` — provenance, unverified claims, and conflicts.
## Assets
- `assets/v3-mixin-egress.yaml` — a complete declaration-only v3 mixin
(`schemaVersion: "3"`) with a required network-policy request and optional explanatory agent context.
## Checks
- `checks/verification.md` — a manually exercised v3 runbook (inspect, buildx descriptor check, `kit-tck`, strict decoding, daemon-backed validation versus offline rejection, optional composition, scoped cleanup). It uses isolated names and no registry publishing or signing.
- `checks/runtime-results.md` — 2026-11-02 commands, output, versions, pass/fail results, and the source-inspection limitation.
- `checks/authenticated-results.md` — authenticated A2/A6/A7, original failures, descriptor correction, successful runtime checks and cleanup.
- `scripts/audit-layer-owners.py` — fail-closed numeric ownership inventory of manifest-referenced OCI layers (Python 3.11+; uncompressed/gzip layers).
skill.yaml 2.1 KB
schema: v1
id: docker-sandboxes-kits
version: 1.0.4
title: 'Docker Sandboxes: Kits (v3 descriptors)'
description: Author, verify, publish, and compose sandbox kits with the v3 descriptor (workload/mixin, capabilities, buildx, kit-tck), and reference them from sbxenv.yaml.
owns:
- sbx-kit
- kit-spec-v3
- sandbox-kit-v3-descriptor
- kit-tck
- sbxenv-kit-references
use_when:
- The user wants to create a new kit, such as packaging a CLI or agent, adding a tool, credential, or policy to an existing agent, or adding a mixin variant, using the v3 descriptor.
- The user asks whether a kit should be a workload or a mixin, what a kit descriptor should contain, or which capabilities, provides, and requires it needs.
- The user wants to write a kit's content recipe, build it with docker buildx, check it with kit-tck and sbx kit inspect, compose it onto a workload, publish it, or sign it.
- The user has an existing v2 spec.yaml kit and wants it converted to a new v3 descriptor.
- The user wants to reference, configure, or pin a kit from an sbxenv.yaml agent or kits entry, or asks which sbxenv.yaml fields a kit's capabilities need.
do_not_use_when:
- The task is creating, running, or removing the sandbox a kit is composed into, independent of the kit's own content.
- The task is what a credential or network rule a kit declares actually does at runtime, where a secret value is stored, or secrets and policy unrelated to any kit.
- The task is sbxenv.yaml lifecycle hooks, approval plans, merging, user defaults, or the secrets/registries block format, which no skill in this catalog owns.
- The task is general Dockerfile or image-build optimization unrelated to a kit's recipe.
- The task is to author, validate, or debug a legacy v2 spec.yaml, which this skill no longer covers.
- The task is a bulk v2-to-v3 migration that needs the migrate-kit-to-v3 skill, which is not part of this catalog.
delegates_to:
- docker-sandboxes-lifecycle
- docker-sandboxes-network-credentials
- docker-docs
- docker-build-strategies
- docker-destructive-guardrails
openai.yaml 0.4 KB
interface:
display_name: 'Docker Sandboxes: Kits (v3 descriptors)'
short_description: Author, verify, publish, and compose sandbox kits with the v3 descriptor. Experimental.
default_prompt: Use this skill when creating, building, verifying, publishing, or composing a Docker Sandboxes kit with the v3 descriptor, or referencing one from sbxenv.yaml.
policy:
allow_implicit_invocation: true
v3-mixin-egress.yaml 0.9 KB
# syntax=docker/sandbox-kit:3
# Complete declaration-only v3 mixin. Save it as <kit>/<kit>.yaml (for example
# extra-egress/extra-egress.yaml). It ships no content, so it needs no companion
# <kit>.dockerfile. Build, conformance and runtime connectivity tested on sbx v0.50.1.
# Recheck on your tools before relying on it (see checks/verification.md).
schemaVersion: "3"
kind: mixin
displayName: Extra egress
description: Requests runtime egress to the npm registry and says so to the agent.
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow: [registry.npmjs.org]
- type: com.docker.sandbox/agent-context@2
# Explanatory only: older hosts may omit this note, but not the network request.
optional: true
config:
content: This kit requests runtime egress to registry.npmjs.org. The host decides whether the request is granted.
authenticated-results.md 36.2 KB
# Authenticated v3 verification — 2026-11-02
## Final verdict
**Composition and runtime connectivity passed on sbx v0.50.1 after correcting
the mixin's capability requirement.** No Sandboxes code or installed binary
was changed. The original failures are retained below.
| Step | Original expectation | Actual result / corrected expectation |
| --- | --- | --- |
| A1 | Isolated builder and scratch | Pass on each attempt; reused only the explicitly authenticated app `kit-v3-1102`. |
| A2 | Prints both typed capability names | Original expectation fails: normal inspect succeeds but shows a legacy-shaped summary. JSON includes the npm allow list, not raw capability declarations. Corrected A2 passes. |
| A3 | cacheonly succeeds | Pass on corrected asset. |
| A4 | TCK reports no failures | Pass: 19 checks, 19 passed. TCK descriptor inspection prints both capability types and optional context. |
| A5 | Unknown `capabilites` fails | Pass: expected exit 1 names the misspelled field. |
| A6 | Normal validate must fail | Original expectation contradicted: normal validation exits 0, `valid (directory)`. Offline exits 1 by design. Corrected A6 passes. |
| A7 | Compose and observe host decision | Initially failed on required `agent-context@2`, then on workload name collision. After fixes, sandbox starts; policy allows npm:443; curl returns HTTP 200. |
| A8 | Remove only test resources | Pass: sandbox, three named builders, all scratch directories, isolated daemon and app runtime state removed. |
## Versions and fixture
- macOS arm64; installed `/opt/homebrew/bin/sbx` v0.50.1,
revision `ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4`.
- Docker client/engine 29.9.1 / Desktop 4.96.0; Buildx v0.38.0,
revision `0dbe87f36ed472fe36b6796c3f70b4210a731fc5`.
- TCK commit `4d932451613f8df89c8468e2bb7c5286882897ca`, Go module version
`v3.0.0-m.11.0.20261031103226-4d932451613f`, Go 1.26.10.
The version command prints `dev`; build metadata retains the pin.
- Kit frontend `3.0.0-m.11 (92835bb7)`:
`sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805`.
- Trusted fixture: `tests/e2e/kits/testdata/shell` in the operator's Sandboxes
checkout `aaa96b72111a83a8326419630ab6ad18c0fde0c5`. A disposable copy pins
`docker.io/sbx/shell-docker-image` to index digest
`sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d`
and renames the companion pair to `kit-probe/kit-probe.yaml` and
`kit-probe/kit-probe.dockerfile`. Its only capability is `sbx@1`; entrypoint
is `sh`. The source checkout was not modified.
## Corrections and limits
1. `--app-name` isolates credentials. The operator explicitly signed in to
the test app. Offline is not a workaround: it deliberately omits the v3
builder. Both normal inspect and validate build/import through the daemon.
2. v0.50.1 uses `newKitV2View` for inspect JSON even for v3. Its output is a
projection, not authoring YAML. TCK descriptor inspection is the verified
way to see the raw typed requests in the exported layout.
3. Validation does not select all required capabilities for composition.
The original asset validated but failed to run because v0.50.1 does not
support required `agent-context@2`. The note is explanatory, so the asset
now marks only that capability `optional: true`. Network policy remains
required. Delivery of the optional note is **not** verified on this host.
4. A local workload named `shell` collides with v0.50.1's built-in agent.
Renaming only the disposable fixture avoids it. Use `--detach`, not the
runbook's earlier `--detached` spelling.
5. The successful test used the isolated app's balanced policy. Policy check
reported "Allowed" and "Local policy only"; policy listing also reported
managed governance. We record both outputs without generalizing governance
semantics. HTTP 200 confirms connectivity, **not** that the mixin alone
granted access: existing package-registry rules may also permit it. No
differential deny/allow control or security-boundary test was performed.
6. The shipped descriptor is readable at
`/usr/share/sandbox/kit/extra-egress/kit.yaml`, and exec ran as uid 1000.
No arbitrary tool-overlay, cloud, publication, signing or other capability
behavior is established by this test.
7. Cleanup removed 3.2 GiB of this app's runtime state after stopping its
daemon. No default daemon/state was touched. The operator-created isolated
keychain sign-in is preserved (no logout). Standard Go/download caches and
Docker's shared builder image may remain; no global prune ran.
## Commands and output
The three transcripts below retain failures and exit codes. `$WORK` replaces
each run's generated short canonical temp directory, `$SKILLS_REPO` and
`$SANDBOXES_REPO` replace checkout paths, and `$HOME` replaces the home path.
The managed policy identifier is redacted. After the passing run, the asset's
verification-status comment was updated; descriptor fields are unchanged. Each attempt used one zsh process:
```sh
unset DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND DOCKER_CLI_PLUGIN_SOCKET
export NO_COLOR=1 BUILDKIT_PROGRESS=plain
APP=kit-v3-1102
WORK=$(mktemp -d /tmp/kit-v3.XXXXXX)
WORK=$(cd "$WORK" && pwd -P)
BUILDER="kit-live-$$"
export BUILDX_BUILDER="$BUILDER"
# Capture each exit code; continue expected failures; EXIT trap performs A8.
# Select the scratch TCK after installation: export PATH="$WORK/bin:$PATH"
```
Build commands with context `.` ran in `$WORK/extra-egress` or `$WORK/typo`
as appropriate. Other commands use absolute paths. The first two attempts
aborted A7 before sandbox creation, so their cleanup reports "not found";
the final attempt successfully removes the running sandbox. Only the last
run reaches the policy, HTTP and in-sandbox descriptor checks.
## Attempt 1: original required context
```text
UTC: 2026-11-02T16:00:47Z
APP=kit-v3-1102
WORK=$WORK
BUILDER=kit-live-26464
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 version
sbx version v0.50.1 ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4
[exit 0]
$ docker buildx version
github.com/docker/buildx v0.38.0 0dbe87f36ed472fe36b6796c3f70b4210a731fc5
[exit 0]
$ mkdir $WORK/extra-egress $WORK/shell $WORK/workspace
[exit 0]
$ cp $SKILLS_REPO/skills/docker-sandboxes-kits/assets/v3-mixin-egress.yaml $WORK/extra-egress/extra-egress.yaml
[exit 0]
$ cp $SANDBOXES_REPO/tests/e2e/kits/testdata/shell/shell.yaml $WORK/shell/shell.yaml
[exit 0]
$ python3 -c from\ pathlib\ import\ Path\;\ import\ sys\;\ p=Path\(sys.argv\[1\]\)\;\ Path\(sys.argv\[2\]\).write_text\(p.read_text\(\).replace\(\"docker.io/sbx/shell-docker-image:latest\",\ \"docker.io/sbx/shell-docker-image@sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d\"\)\) $SANDBOXES_REPO/tests/e2e/kits/testdata/shell/shell.dockerfile $WORK/shell/shell.dockerfile
[exit 0]
$ cat $WORK/shell/shell.yaml $WORK/shell/shell.dockerfile
# syntax=docker/sandbox-kit:3
schemaVersion: "3"
kind: workload
description: Shell workload for shortcut selection and reattachment.
capabilities:
- type: com.docker.sandbox/sbx@1
# syntax=docker/dockerfile:1
FROM docker.io/sbx/shell-docker-image@sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d
ENTRYPOINT ["sh"]
[exit 0]
$ docker buildx create --name kit-live-26464 --driver docker-container --bootstrap
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 1.0s done
#1 creating container buildx_buildkit_kit-live-264640
#1 creating container buildx_buildkit_kit-live-264640 0.4s done
#1 DONE 1.4s
kit-live-26464
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon start --detach --policy balanced
✓ daemon — started (PID 26490)
socket $HOME/.sbx/run_kit-v3-1102/d/sandboxd.sock
logs $HOME/Library/Application Support/com.docker.sandboxes/sandboxes-kit-v3-1102/sandboxd/daemon.log
[exit 0]
=== A2 normal inspection ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit inspect $WORK/extra-egress
KITS
○ $WORK/extra-egress — building…
✓ $WORK/extra-egress — built (7s)
sbx-kit-src:extra-egress-e50b7db3b40b
Name: extra-egress
Kind: mixin
Schema: v3
Display: Extra egress
Description: Requests runtime egress to the npm registry and says so to the agent.
Template: sbx-kit-src:extra-egress-e50b7db3b40b
Policies:
Network: 1 allow, 0 deny
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit inspect $WORK/extra-egress --format json
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-e50b7db3b40b
{
"schemaVersion": "3",
"kind": "mixin",
"name": "extra-egress",
"displayName": "Extra egress",
"description": "Requests runtime egress to the npm registry and says so to the agent.",
"sandbox": {
"image": "sbx-kit-src:extra-egress-e50b7db3b40b"
},
"permissions": {
"network": {
"allow": [
"registry.npmjs.org"
]
}
}
}
[exit 0]
=== A6 normal and offline validation ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit validate $WORK/extra-egress
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-e50b7db3b40b
✓ $WORK/extra-egress — valid (directory)
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit validate $WORK/extra-egress --offline
error: kit $WORK/extra-egress is a v3 source kit and this load path has no kit builder configured; artifact validation failed
[exit 1]
=== A7 runtime composition ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 run $WORK/shell --kit $WORK/extra-egress --detach --name kit-v3-check --cpus 2 --memory 2g $WORK/workspace
KITS
○ $WORK/shell — building…
✓ $WORK/shell — built (49s)
sbx-kit-src:shell-884aec520dce
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-e50b7db3b40b
error: resolve kits: $WORK/extra-egress:1:269: capabilities[1]: required capability selection rejected (item capabilities[1]); original source $WORK/extra-egress capabilities[1]; unsupported capability type com.docker.sandbox/agent-context@2 | 1 | {"schemaVersion":"3","displayName":"Extra egress","description":"Requests runtime egress to the npm registry and says so to the agent.","kind":"mixin","capabilities":[{"type":"com.docker.sandbox/network-policy@1","config":{"runtime":{"allow":["registry.npmjs.org"]}}},{"type":"com.docker.sandbox/agent-context@2","config":{"content":"This kit requests runtime egress to registry.npmjs.org. The host decides whether the request is granted."}}]} | ^
[exit 1]
=== A8 cleanup ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 rm --force kit-v3-check
error: sandbox 'kit-v3-check' not found
try: sbx ls
[exit 1]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon stop
Stopped daemon
[exit 0]
$ docker buildx rm kit-live-26464
kit-live-26464 removed
[exit 0]
$ rm -rf $WORK
[exit 0]
$ test ! -e $WORK
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon status
Status: stopped
Socket: $HOME/.sbx/run_kit-v3-1102/d/sandboxd.sock (not connected)
[exit 0]
```
## Attempt 2: optional context, workload name collision
```text
UTC: 2026-11-02T16:02:23Z
APP=kit-v3-1102
WORK=$WORK
BUILDER=kit-live-26681
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 version
sbx version v0.50.1 ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4
[exit 0]
$ docker buildx version
github.com/docker/buildx v0.38.0 0dbe87f36ed472fe36b6796c3f70b4210a731fc5
[exit 0]
$ mkdir $WORK/extra-egress $WORK/shell $WORK/workspace
[exit 0]
$ cp $SKILLS_REPO/skills/docker-sandboxes-kits/assets/v3-mixin-egress.yaml $WORK/extra-egress/extra-egress.yaml
[exit 0]
$ cp $SANDBOXES_REPO/tests/e2e/kits/testdata/shell/shell.yaml $WORK/shell/shell.yaml
[exit 0]
$ python3 -c from\ pathlib\ import\ Path\;\ import\ sys\;\ p=Path\(sys.argv\[1\]\)\;\ Path\(sys.argv\[2\]\).write_text\(p.read_text\(\).replace\(\"docker.io/sbx/shell-docker-image:latest\",\ \"docker.io/sbx/shell-docker-image@sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d\"\)\) $SANDBOXES_REPO/tests/e2e/kits/testdata/shell/shell.dockerfile $WORK/shell/shell.dockerfile
[exit 0]
$ cat $WORK/shell/shell.yaml $WORK/shell/shell.dockerfile
# syntax=docker/sandbox-kit:3
schemaVersion: "3"
kind: workload
description: Shell workload for shortcut selection and reattachment.
capabilities:
- type: com.docker.sandbox/sbx@1
# syntax=docker/dockerfile:1
FROM docker.io/sbx/shell-docker-image@sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d
ENTRYPOINT ["sh"]
[exit 0]
$ docker buildx create --name kit-live-26681 --driver docker-container --bootstrap
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 0.9s done
#1 creating container buildx_buildkit_kit-live-266810
#1 creating container buildx_buildkit_kit-live-266810 0.4s done
#1 DONE 1.3s
kit-live-26681
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon start --detach --policy balanced
✓ daemon — started (PID 26707)
socket $HOME/.sbx/run_kit-v3-1102/d/sandboxd.sock
logs $HOME/Library/Application Support/com.docker.sandboxes/sandboxes-kit-v3-1102/sandboxd/daemon.log
[exit 0]
=== A2 normal inspection ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit inspect $WORK/extra-egress
KITS
○ $WORK/extra-egress — building…
✓ $WORK/extra-egress — built (2s)
sbx-kit-src:extra-egress-53991acf39c0
Name: extra-egress
Kind: mixin
Schema: v3
Display: Extra egress
Description: Requests runtime egress to the npm registry and says so to the agent.
Template: sbx-kit-src:extra-egress-53991acf39c0
Policies:
Network: 1 allow, 0 deny
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit inspect $WORK/extra-egress --format json
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
{
"schemaVersion": "3",
"kind": "mixin",
"name": "extra-egress",
"displayName": "Extra egress",
"description": "Requests runtime egress to the npm registry and says so to the agent.",
"sandbox": {
"image": "sbx-kit-src:extra-egress-53991acf39c0"
},
"permissions": {
"network": {
"allow": [
"registry.npmjs.org"
]
}
}
}
[exit 0]
=== A6 normal and offline validation ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit validate $WORK/extra-egress
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
✓ $WORK/extra-egress — valid (directory)
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit validate $WORK/extra-egress --offline
error: kit $WORK/extra-egress is a v3 source kit and this load path has no kit builder configured; artifact validation failed
[exit 1]
=== Corrected asset conformance and strict decoding ===
$ mkdir $WORK/bin $WORK/typo
[exit 0]
$ env GOBIN=$WORK/bin go install github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck@4d932451613f8df89c8468e2bb7c5286882897ca
go: github.com/docker/sandbox-kit-spec/v3@v3.0.0-m.11.0.20261031103226-4d932451613f requires go >= 1.26.10; switching to go1.26.10
[exit 0]
$ kit-tck version
dev
[exit 0]
$ go version -m $WORK/bin/kit-tck
$WORK/bin/kit-tck: go1.26.10
path github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck
mod github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.11.0.20261031103226-4d932451613f h1:dS5huJIhcyTPidx3Z/+gS6vKwv1N/ttTzJJiXvOnj2U=
dep github.com/containerd/log v0.2.0 h1:BewD/umNgVnoczglOpX8eRMyEy5t5iPlu5AIpnWDONc=
dep github.com/containerd/platforms v1.0.0-rc.5 h1:vXd569rDrz8LeMXzAnBsy6LADV5YtsD8oyaRarxdmSU=
dep github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
dep github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4=
dep github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
dep github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
dep github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo=
dep golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
dep golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
dep golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
dep golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
dep gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
dep oras.land/oras-go/v2 v2.6.4 h1:l4uv+UT7QK4Hju+KOEZ/c8iOjq3iZH7cULoRpUnSDAU=
build -buildmode=exe
build -compiler=gc
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=arm64
build GOOS=darwin
build GOARM64=v8.0
[exit 0]
$ docker buildx build --builder kit-live-26681 . -f extra-egress.yaml --output type=cacheonly
#0 building with "kit-live-26681" instance using docker-container driver
#1 [internal] load build definition from extra-egress.yaml
#1 transferring dockerfile: 937B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.2s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor extra-egress.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 39B done
#4 DONE 0.0s
#5 [kit] stage sources /usr/share/sandbox/kit/extra-egress
#5 CACHED
View build details: docker-desktop://dashboard/build/kit-live-26681/kit-live-266810/my12u8y0ig64biaq8brjjy0zd
[exit 0]
$ docker buildx build --builder kit-live-26681 . -f extra-egress.yaml -t extra-egress:0.0.0 --output type=oci,dest=$WORK/layout,tar=false
#0 building with "kit-live-26681" instance using docker-container driver
#1 [internal] load build definition from extra-egress.yaml
#1 transferring dockerfile: 937B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.2s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor extra-egress.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 39B done
#4 DONE 0.0s
#5 [kit] stage sources /usr/share/sandbox/kit/extra-egress
#5 CACHED
#6 exporting to oci image format
#6 exporting layers done
#6 exporting manifest sha256:731ae4ec7a2d7ba09a0576a4c3f7a6fcc493364dc30ea1c048bdbe91a07fc5db done
#6 exporting config sha256:98526907c4ac9bdccc85a81963d9582347b613a8c23e24aee9e7d0367eceb283 done
#6 DONE 0.0s
View build details: docker-desktop://dashboard/build/kit-live-26681/kit-live-266810/pjc85rocit5jtkc69abrdd5if
[exit 0]
$ kit-tck validate --layout $WORK/layout 0.0.0
kit-tck dev · validate · $WORK/layout 0.0.0
19 checks · 19 passed
✓ conforms
[exit 0]
$ kit-tck inspect --descriptor --layout $WORK/layout 0.0.0
schemaVersion: "3"
displayName: Extra egress
description: Requests runtime egress to the npm registry and says so to the agent.
kind: mixin
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow:
- registry.npmjs.org
- type: com.docker.sandbox/agent-context@2
optional: true
config:
content: This kit requests runtime egress to registry.npmjs.org. The host decides whether the request is granted.
[exit 0]
$ python3 -c from\ pathlib\ import\ Path\;\ import\ sys\;\ Path\(sys.argv\[2\]\).write_text\(Path\(sys.argv\[1\]\).read_text\(\).replace\(\"capabilities:\",\"capabilites:\",1\)\) $WORK/extra-egress/extra-egress.yaml $WORK/typo/typo.yaml
[exit 0]
$ docker buildx build --builder kit-live-26681 . -f typo.yaml --output type=cacheonly
#0 building with "kit-live-26681" instance using docker-container driver
#1 [internal] load build definition from typo.yaml
#1 transferring dockerfile: 928B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.2s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor typo.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 928B done
#4 DONE 0.0s
ERROR: failed to build: failed to solve: decode kit descriptor: yaml: unmarshal errors:
line 10: field capabilites not found in type spec.Descriptor
View build details: docker-desktop://dashboard/build/kit-live-26681/kit-live-266810/fwj4sug32v94ddyhgth6bixaj
[exit 1]
=== A7 runtime composition ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 run $WORK/shell --kit $WORK/extra-egress --detach --name kit-v3-check --cpus 2 --memory 2g $WORK/workspace
KITS
✓ $WORK/shell — cached
sbx-kit-src:shell-884aec520dce
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
error: agent "shell" is already registered (built-in agents cannot be overridden by a kit)
[exit 1]
=== A8 cleanup ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 rm --force kit-v3-check
error: sandbox 'kit-v3-check' not found
try: sbx ls
[exit 1]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon stop
Stopped daemon
[exit 0]
$ docker buildx rm kit-live-26681
kit-live-26681 removed
[exit 0]
$ rm -rf $WORK
[exit 0]
$ test ! -e $WORK
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon status
Status: stopped
Socket: $HOME/.sbx/run_kit-v3-1102/d/sandboxd.sock (not connected)
[exit 0]
```
## Attempt 3: corrected mixin and renamed workload
```text
UTC: 2026-11-02T16:02:55Z
APP=kit-v3-1102
WORK=$WORK
BUILDER=kit-live-26938
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 version
sbx version v0.50.1 ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4
[exit 0]
$ docker buildx version
github.com/docker/buildx v0.38.0 0dbe87f36ed472fe36b6796c3f70b4210a731fc5
[exit 0]
$ mkdir $WORK/extra-egress $WORK/kit-probe $WORK/workspace
[exit 0]
$ cp $SKILLS_REPO/skills/docker-sandboxes-kits/assets/v3-mixin-egress.yaml $WORK/extra-egress/extra-egress.yaml
[exit 0]
$ cp $SANDBOXES_REPO/tests/e2e/kits/testdata/shell/shell.yaml $WORK/kit-probe/kit-probe.yaml
[exit 0]
$ python3 -c from\ pathlib\ import\ Path\;\ import\ sys\;\ p=Path\(sys.argv\[1\]\)\;\ Path\(sys.argv\[2\]\).write_text\(p.read_text\(\).replace\(\"docker.io/sbx/shell-docker-image:latest\",\ \"docker.io/sbx/shell-docker-image@sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d\"\)\) $SANDBOXES_REPO/tests/e2e/kits/testdata/shell/shell.dockerfile $WORK/kit-probe/kit-probe.dockerfile
[exit 0]
$ cat $WORK/kit-probe/kit-probe.yaml $WORK/kit-probe/kit-probe.dockerfile
# syntax=docker/sandbox-kit:3
schemaVersion: "3"
kind: workload
description: Shell workload for shortcut selection and reattachment.
capabilities:
- type: com.docker.sandbox/sbx@1
# syntax=docker/dockerfile:1
FROM docker.io/sbx/shell-docker-image@sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d
ENTRYPOINT ["sh"]
[exit 0]
$ docker buildx create --name kit-live-26938 --driver docker-container --bootstrap
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 0.9s done
#1 creating container buildx_buildkit_kit-live-269380
#1 creating container buildx_buildkit_kit-live-269380 0.4s done
#1 DONE 1.3s
kit-live-26938
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon start --detach --policy balanced
✓ daemon — started (PID 26963)
socket $HOME/.sbx/run_kit-v3-1102/d/sandboxd.sock
logs $HOME/Library/Application Support/com.docker.sandboxes/sandboxes-kit-v3-1102/sandboxd/daemon.log
[exit 0]
=== A2 normal inspection ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit inspect $WORK/extra-egress
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
Name: extra-egress
Kind: mixin
Schema: v3
Display: Extra egress
Description: Requests runtime egress to the npm registry and says so to the agent.
Template: sbx-kit-src:extra-egress-53991acf39c0
Policies:
Network: 1 allow, 0 deny
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit inspect $WORK/extra-egress --format json
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
{
"schemaVersion": "3",
"kind": "mixin",
"name": "extra-egress",
"displayName": "Extra egress",
"description": "Requests runtime egress to the npm registry and says so to the agent.",
"sandbox": {
"image": "sbx-kit-src:extra-egress-53991acf39c0"
},
"permissions": {
"network": {
"allow": [
"registry.npmjs.org"
]
}
}
}
[exit 0]
=== A6 normal and offline validation ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit validate $WORK/extra-egress
KITS
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
✓ $WORK/extra-egress — valid (directory)
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 kit validate $WORK/extra-egress --offline
error: kit $WORK/extra-egress is a v3 source kit and this load path has no kit builder configured; artifact validation failed
[exit 1]
=== Corrected asset conformance and strict decoding ===
$ mkdir $WORK/bin $WORK/typo
[exit 0]
$ env GOBIN=$WORK/bin go install github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck@4d932451613f8df89c8468e2bb7c5286882897ca
go: github.com/docker/sandbox-kit-spec/v3@v3.0.0-m.11.0.20261031103226-4d932451613f requires go >= 1.26.10; switching to go1.26.10
[exit 0]
$ kit-tck version
dev
[exit 0]
$ go version -m $WORK/bin/kit-tck
$WORK/bin/kit-tck: go1.26.10
path github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck
mod github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.11.0.20261031103226-4d932451613f h1:dS5huJIhcyTPidx3Z/+gS6vKwv1N/ttTzJJiXvOnj2U=
dep github.com/containerd/log v0.2.0 h1:BewD/umNgVnoczglOpX8eRMyEy5t5iPlu5AIpnWDONc=
dep github.com/containerd/platforms v1.0.0-rc.5 h1:vXd569rDrz8LeMXzAnBsy6LADV5YtsD8oyaRarxdmSU=
dep github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
dep github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4=
dep github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
dep github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
dep github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo=
dep golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
dep golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
dep golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
dep golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
dep gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
dep oras.land/oras-go/v2 v2.6.4 h1:l4uv+UT7QK4Hju+KOEZ/c8iOjq3iZH7cULoRpUnSDAU=
build -buildmode=exe
build -compiler=gc
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=arm64
build GOOS=darwin
build GOARM64=v8.0
[exit 0]
$ docker buildx build --builder kit-live-26938 . -f extra-egress.yaml --output type=cacheonly
#0 building with "kit-live-26938" instance using docker-container driver
#1 [internal] load build definition from extra-egress.yaml
#1 transferring dockerfile: 937B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 ...
#3 [auth] docker/sandbox-kit:pull token for registry-1.docker.io
#3 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 1.2s
#4 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#4 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 0B / 6.70MB 0.2s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 1.05MB / 6.70MB 0.6s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 2.10MB / 6.70MB 0.9s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 3.15MB / 6.70MB 1.4s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 4.19MB / 6.70MB 1.7s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 5.24MB / 6.70MB 2.1s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 6.29MB / 6.70MB 2.4s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 6.70MB / 6.70MB 2.5s done
#4 extracting sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 0.1s done
#4 DONE 2.6s
#5 [internal] load kit descriptor extra-egress.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#5 transferring dockerfile: 937B done
#5 DONE 0.0s
#6 [kit] stage sources /usr/share/sandbox/kit/extra-egress
#6 DONE 0.0s
View build details: docker-desktop://dashboard/build/kit-live-26938/kit-live-269380/c9l2bydydlduvo1zscryojtiq
[exit 0]
$ docker buildx build --builder kit-live-26938 . -f extra-egress.yaml -t extra-egress:0.0.0 --output type=oci,dest=$WORK/layout,tar=false
#0 building with "kit-live-26938" instance using docker-container driver
#1 [internal] load build definition from extra-egress.yaml
#1 transferring dockerfile: 937B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.2s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor extra-egress.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 39B done
#4 DONE 0.0s
#5 [kit] stage sources /usr/share/sandbox/kit/extra-egress
#5 CACHED
#6 exporting to oci image format
#6 exporting layers 0.0s done
#6 exporting manifest sha256:b45820c1c7cfc2cd6c8c10b46dc26bd0f427f20786fbd2b87fbb75ca99ab6832 done
#6 exporting config sha256:dcb9a44b48756814f2edca2bf71147996c18784a65755557bc7902e9d98d8b13 done
#6 DONE 0.1s
View build details: docker-desktop://dashboard/build/kit-live-26938/kit-live-269380/r593fau2jbcwud213rgvm0zam
[exit 0]
$ kit-tck validate --layout $WORK/layout 0.0.0
kit-tck dev · validate · $WORK/layout 0.0.0
19 checks · 19 passed
✓ conforms
[exit 0]
$ kit-tck inspect --descriptor --layout $WORK/layout 0.0.0
schemaVersion: "3"
displayName: Extra egress
description: Requests runtime egress to the npm registry and says so to the agent.
kind: mixin
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow:
- registry.npmjs.org
- type: com.docker.sandbox/agent-context@2
optional: true
config:
content: This kit requests runtime egress to registry.npmjs.org. The host decides whether the request is granted.
[exit 0]
$ python3 -c from\ pathlib\ import\ Path\;\ import\ sys\;\ Path\(sys.argv\[2\]\).write_text\(Path\(sys.argv\[1\]\).read_text\(\).replace\(\"capabilities:\",\"capabilites:\",1\)\) $WORK/extra-egress/extra-egress.yaml $WORK/typo/typo.yaml
[exit 0]
$ docker buildx build --builder kit-live-26938 . -f typo.yaml --output type=cacheonly
#0 building with "kit-live-26938" instance using docker-container driver
#1 [internal] load build definition from typo.yaml
#1 transferring dockerfile: 928B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.3s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor typo.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 928B done
#4 DONE 0.0s
ERROR: failed to build: failed to solve: decode kit descriptor: yaml: unmarshal errors:
line 10: field capabilites not found in type spec.Descriptor
View build details: docker-desktop://dashboard/build/kit-live-26938/kit-live-269380/c5j2nrmc8uw2dmtrtctdfvvsz
[exit 1]
=== A7 runtime composition ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 run $WORK/kit-probe --kit $WORK/extra-egress --detach --name kit-v3-check --cpus 2 --memory 2g $WORK/workspace
KITS
○ $WORK/kit-probe — building…
✓ $WORK/kit-probe — built (4m31s)
sbx-kit-src:kit-probe-6f3084bb320f
✓ $WORK/extra-egress — cached
sbx-kit-src:extra-egress-53991acf39c0
SANDBOX
Name: kit-v3-check
Agent: kit-probe
Kits: $WORK/kit-probe
$WORK/extra-egress
Workspace: $WORK/workspace (rw)
Image: sbx-kit-src:kit-probe-6f3084bb320f
CPU: 2
Memory: 2g
IMAGE
○ image — checking…
✓ image — ready
AGENT
assembling kit image from 2 kits
pulling kit image $WORK/extra-egress
✓ assembled kit image (19 layers)
✓ Created sandbox kit-v3-check
✓ sandbox kit-v3-check — running detached
workspace $WORK/workspace
c897aa43-4036-481f-b70a-90d00fbc477a
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 policy check network --sandbox kit-v3-check registry.npmjs.org
Allowed: registry.npmjs.org:443
Governance: Local policy only
Context: sandbox:kit-v3-check
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 policy ls kit-v3-check
Policy for sandbox: kit-v3-check
Governance: Managed by docker · Sync: OK, last synced 17:07:59
NETWORK
• allow 196 hosts from [managed-policy-id], local-policy
FILESYSTEM
• read allow all paths from local-policy
• write allow all paths from local-policy
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 exec kit-v3-check curl --max-time 30 --silent --show-error --output /dev/null --write-out HTTP\ %\{http_code\}\\n https://registry.npmjs.org/
HTTP 200
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 exec kit-v3-check sh -c id\;\ ls\ /usr/share/sandbox/kit\;\ cat\ /usr/share/sandbox/kit/extra-egress/kit.yaml
uid=1000(agent) gid=1000(agent) groups=1000(agent),27(sudo),1001(docker)
extra-egress
kit-probe
# syntax=docker/sandbox-kit:3
# Complete declaration-only v3 mixin. Save it as <kit>/<kit>.yaml (for example
# extra-egress/extra-egress.yaml). It ships no content, so it needs no companion
# <kit>.dockerfile. Build and conformance tested; runtime grants remain untested.
# Recheck on your tools before relying on it (see checks/verification.md).
schemaVersion: "3"
kind: mixin
displayName: Extra egress
description: Requests runtime egress to the npm registry and says so to the agent.
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow: [registry.npmjs.org]
- type: com.docker.sandbox/agent-context@2
# Explanatory only: older hosts may omit this note, but not the network request.
optional: true
config:
content: This kit requests runtime egress to registry.npmjs.org. The host decides whether the request is granted.
[exit 0]
=== A8 cleanup ===
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 rm --force kit-v3-check
Removed sandbox kit-v3-check
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon stop
Stopped daemon
[exit 0]
$ docker buildx rm kit-live-26938
kit-live-26938 removed
[exit 0]
$ rm -rf $WORK
[exit 0]
$ test ! -e $WORK
[exit 0]
$ /opt/homebrew/bin/sbx --app-name kit-v3-1102 daemon status
Status: stopped
Socket: $HOME/.sbx/run_kit-v3-1102/d/sandboxd.sock (not connected)
[exit 0]
```
## Final app-scoped cleanup
```text
Scoped cleanup after daemon stop (credentials preserved; no logout)
$ du -sh $HOME/Library/Application\ Support/com.docker.sandboxes/sandboxes-kit-v3-1102
3.2G $HOME/Library/Application Support/com.docker.sandboxes/sandboxes-kit-v3-1102
$ pgrep -lf sandboxes-kit-v3-1102
[exit 1; 1 means no matching process]
$ rm -rf $HOME/Library/Application\ Support/com.docker.sandboxes/sandboxes-kit-v3-1102 $HOME/.sbx/run_kit-v3-1102 /tmp/sboxd-501-sandboxes-kit-v3-1102
PASS: absent: $HOME/Library/Application Support/com.docker.sandboxes/sandboxes-kit-v3-1102
PASS: absent: $HOME/.sbx/run_kit-v3-1102
PASS: absent: /tmp/sboxd-501-sandboxes-kit-v3-1102
$ docker ps --filter name=kit-live- --format {{.Names}}
```
runtime-results.md 16.0 KB
# Manual v3 verification — 2026-11-02
## Superseded by authenticated verification
This is the initial unauthenticated transcript, retained as historical evidence.
The [authenticated follow-up](authenticated-results.md) records successful
inspection/validation and runtime composition after making explanatory context
optional and renaming the test workload. The original A2 output expectation
and A6 mandatory-failure expectation were wrong; neither should be used as a
current acceptance criterion. See the corrected runbook and follow-up verdict.
## Scope and verdict
Ran A1-A6 and A8 from `skills/docker-sandboxes-kits` on macOS arm64.
A7 was skipped: no trusted v3 workload was supplied. **Build and layout
conformance passed; source inspection failed; runtime behavior is unverified.**
The prerequisite of a working v3 source-inspection path was not met on the
installed stable CLI. Buildx/TCK checks are independent of that limitation.
| Step | Result against runbook | Observation |
| --- | --- | --- |
| A1 | Pass | Created a unique container builder and scratch directory. |
| A2 | Fail | Normal inspect requires sign-in in the isolated app. Offline retry recognizes v3 but fails with `no kit builder configured`; no capabilities printed. |
| A3 | Pass | `cacheonly` build succeeds. |
| A4 | Pass | OCI directory export succeeds; bare-tag TCK validation reports 19 checks, 19 passed. |
| A5 | Pass (expected failure) | Exit 1 names unknown field `capabilites`. |
| A6 | Pass with qualification | Normal command exits 1 for sign-in, which is inconclusive. Offline retry exits 1 explicitly rejecting the v3 source load path. |
| A7 | Skipped | No composition, effective host-policy decision, or runtime egress test. |
| A8 | Pass | Removed only the run's builder and scratch directory; confirmed scratch removal and builder absence. |
## Versions and reproducibility
- Skill checkout HEAD before edits: `f571e99312b6880cf2c09a87fef7cdd43f84d887`.
- `sbx v0.50.1`, revision `ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4`.
- Buildx `v0.38.0`, revision `0dbe87f36ed472fe36b6796c3f70b4210a731fc5`.
- Docker client/engine `29.9.1`, Docker Desktop `4.96.0 (243774)`.
- TCK installed into scratch `GOBIN` from commit
`4d932451613f8df89c8468e2bb7c5286882897ca`. `kit-tck version` prints `dev`;
`go version -m` identifies module version
`v3.0.0-m.11.0.20261031103226-4d932451613f`, built with Go `1.26.10`.
- Frontend `docker/sandbox-kit:3` resolved to
`sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805`,
reporting `sandbox-kit 3.0.0-m.11 (92835bb7)`.
- Ran once on the original asset, then again after changing only its comment
from "unexecuted" to the observed verification status. Results matched.
The transcript below is the second run, including its asset SHA-256.
## Surprises and limits
1. Inherited `DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND` and
`DOCKER_CLI_PLUGIN_SOCKET` caused `sbx version` to print Docker plugin help,
and `sbx --app-name ...` to reject that flag. Unsetting these variables in
the test shell exposed the standalone CLI. No installed tool was replaced.
2. A2 did not reach authenticated source inspection. `--offline` bypasses daemon-backed policy, not the loader;
it fails even for this declaration-only mixin. No successful inspection
release or minimum runtime version was established. No sign-in attempted.
3. A6 demonstrates offline rejection only, not rejection by normal validate. An auth failure
alone would not substantiate the claim. Future releases must be rechecked.
4. A pinned Go installation still reports TCK version `dev`; build metadata
records the actual pin. Go downloaded the required toolchain automatically.
5. The runbook does access registries to pull the builder/frontend, but
publishes and signs nothing. Successful pull using the existing Docker
configuration does not prove anonymous availability.
6. Final `buildx ls` reported unavailable sockets for four pre-existing,
unrelated builders. These were not used, repaired, or removed. Their names
and paths below are replaced with placeholders for publication.
7. Scratch included the TCK binary and OCI layout and was deleted. Standard
Go download caches and the builder image pulled into Docker may remain;
no global cache or image pruning was performed. No sandbox was created.
## Commands and output
Transcript normalization: `$WORK` replaces the generated absolute temporary
path and `$HOME` replaces the operator's home directory. Other output, including
failures and exit codes, is retained, except the unrelated builder identifiers
noted above. Commands ran in one zsh process. A3/A4 build commands ran in
`$WORK/extra-egress`; A5's build ran in `$WORK/typo`, each in a subshell.
Other commands ran from the skill directory. Setup and logging wrapper:
```sh
unset DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND DOCKER_CLI_PLUGIN_SOCKET
export NO_COLOR=1 BUILDKIT_PROGRESS=plain
cd skills/docker-sandboxes-kits
APP="k-$(date +%s)-$$"
BUILDER="kit-eval-$$"
WORK=$(mktemp -d)
# kit-tck is installed below into $WORK/bin, then selected with:
export PATH="$WORK/bin:$PATH"
# Each command's status is captured so expected failures do not stop the run.
# An EXIT trap removes the named builder and scratch directory (A8).
```
```text
UTC: 2026-11-02T15:38:58Z
APP=k-1793633938-25255
BUILDER=kit-eval-25255
WORK=$WORK
Environment: unset DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND DOCKER_CLI_PLUGIN_SOCKET; NO_COLOR=1 BUILDKIT_PROGRESS=plain
$ git rev-parse HEAD
f571e99312b6880cf2c09a87fef7cdd43f84d887
[exit 0]
$ sbx --app-name k-1793633938-25255 version
sbx version v0.50.1 ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4
[exit 0]
$ docker buildx version
github.com/docker/buildx v0.38.0 0dbe87f36ed472fe36b6796c3f70b4210a731fc5
[exit 0]
$ docker version
Client:
Version: 29.9.1
API version: 1.56
Go version: go1.26.9
Git commit: dfc520d
Built: Wed Oct 14 18:31:22 2026
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.96.0 (243774)
Engine:
Version: 29.9.1
API version: 1.56 (minimum version 1.40)
Go version: go1.26.9
Git commit: b26fb77
Built: Wed Oct 14 18:31:50 2026
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: v2.4.2
GitCommit: b7a25261e029d68978bbf290df0a62fc819b3c51
runc:
Version: 1.5.2
GitCommit: v1.5.2-0-g29dd3dc2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[exit 0]
=== A1: scratch resources ===
$ mkdir $WORK/extra-egress $WORK/workspace $WORK/bin
[exit 0]
$ cp assets/v3-mixin-egress.yaml $WORK/extra-egress/extra-egress.yaml
[exit 0]
$ shasum -a 256 assets/v3-mixin-egress.yaml
f82813e8ac7fb6adb268e05969930b64c1109f8e8022a2a5d11710006605a6e5 assets/v3-mixin-egress.yaml
[exit 0]
$ docker buildx create --name kit-eval-25255 --driver docker-container --bootstrap
#1 [internal] booting buildkit
#1 pulling image moby/buildkit:buildx-stable-1
#1 pulling image moby/buildkit:buildx-stable-1 0.9s done
#1 creating container buildx_buildkit_kit-eval-252550
#1 creating container buildx_buildkit_kit-eval-252550 0.4s done
#1 DONE 1.3s
kit-eval-25255
[exit 0]
=== Install pinned kit-tck (isolated GOBIN) ===
$ env GOBIN=$WORK/bin go install github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck@4d932451613f8df89c8468e2bb7c5286882897ca
go: github.com/docker/sandbox-kit-spec/v3@v3.0.0-m.11.0.20261031103226-4d932451613f requires go >= 1.26.10; switching to go1.26.10
[exit 0]
$ kit-tck version
dev
[exit 0]
$ go version -m $WORK/bin/kit-tck
$WORK/bin/kit-tck: go1.26.10
path github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck
mod github.com/docker/sandbox-kit-spec/v3 v3.0.0-m.11.0.20261031103226-4d932451613f h1:dS5huJIhcyTPidx3Z/+gS6vKwv1N/ttTzJJiXvOnj2U=
dep github.com/containerd/log v0.2.0 h1:BewD/umNgVnoczglOpX8eRMyEy5t5iPlu5AIpnWDONc=
dep github.com/containerd/platforms v1.0.0-rc.5 h1:vXd569rDrz8LeMXzAnBsy6LADV5YtsD8oyaRarxdmSU=
dep github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
dep github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4=
dep github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
dep github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
dep github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo=
dep golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
dep golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
dep golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
dep golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
dep gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
dep oras.land/oras-go/v2 v2.6.4 h1:l4uv+UT7QK4Hju+KOEZ/c8iOjq3iZH7cULoRpUnSDAU=
build -buildmode=exe
build -compiler=gc
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=arm64
build GOOS=darwin
build GOARM64=v8.0
[exit 0]
=== A2: inspect ===
$ sbx --app-name k-1793633938-25255 kit inspect $WORK/extra-egress
error: not signed in to Docker
try: sbx login
[exit 1]
=== A2 diagnostic: bypass daemon policy, not descriptor decoding ===
$ sbx --app-name k-1793633938-25255 kit inspect $WORK/extra-egress --offline
error: kit $WORK/extra-egress is a v3 source kit and this load path has no kit builder configured
[exit 1]
=== A3: cacheonly ===
$ docker buildx build --builder kit-eval-25255 . -f extra-egress.yaml --output type=cacheonly
#0 building with "kit-eval-25255" instance using docker-container driver
#1 [internal] load build definition from extra-egress.yaml
#1 transferring dockerfile: 833B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 ...
#3 [auth] docker/sandbox-kit:pull token for registry-1.docker.io
#3 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 1.1s
#4 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#4 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 2.10MB / 6.70MB 0.2s
#4 sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 6.70MB / 6.70MB 0.2s done
#4 extracting sha256:e82cb93883f6d13d4487a7059dded45fd79fdec4147dfc96d597285c8b5cca38 0.1s done
#4 DONE 0.3s
#5 [internal] load kit descriptor extra-egress.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#5 transferring dockerfile: 833B done
#5 DONE 0.0s
#6 [kit] stage sources /usr/share/sandbox/kit/extra-egress
#6 DONE 0.0s
View build details: docker-desktop://dashboard/build/kit-eval-25255/kit-eval-252550/czg4g4jo2ewbyfzl8vj9zg6br
[exit 0]
=== A4: export and conformance ===
$ docker buildx build --builder kit-eval-25255 . -f extra-egress.yaml -t extra-egress:0.0.0 --output type=oci,dest=$WORK/layout,tar=false
#0 building with "kit-eval-25255" instance using docker-container driver
#1 [internal] load build definition from extra-egress.yaml
#1 transferring dockerfile: 833B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.2s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor extra-egress.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 39B done
#4 DONE 0.0s
#5 [kit] stage sources /usr/share/sandbox/kit/extra-egress
#5 CACHED
#6 exporting to oci image format
#6 exporting layers 0.0s done
#6 exporting manifest sha256:621196cc8dc9f041a5cd3e5949a4f9db1aea1c5d517ea0ebd8b71953d9cf71ff done
#6 exporting config sha256:a029f184270ed55685e9f87024c9843fe1bb9bf7dfe8bd40d4bbea8b46529c15 done
#6 DONE 0.1s
View build details: docker-desktop://dashboard/build/kit-eval-25255/kit-eval-252550/hxq7xdrqsyucvrlqy7k4uo93r
[exit 0]
$ kit-tck validate --layout $WORK/layout 0.0.0
kit-tck dev · validate · $WORK/layout 0.0.0
19 checks · 19 passed
✓ conforms
[exit 0]
=== A5: misspelled key ===
$ mkdir $WORK/typo
[exit 0]
$ python3 -c import\ pathlib,sys\;\ src=pathlib.Path\(sys.argv\[1\]\).read_text\(\)\;\ pathlib.Path\(sys.argv\[2\]\).write_text\(src.replace\(\"capabilities:\",\ \"capabilites:\",\ 1\)\) $WORK/extra-egress/extra-egress.yaml $WORK/typo/typo.yaml
[exit 0]
$ docker buildx build --builder kit-eval-25255 . -f typo.yaml --output type=cacheonly
#0 building with "kit-eval-25255" instance using docker-container driver
#1 [internal] load build definition from typo.yaml
#1 transferring dockerfile: 824B done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/sandbox-kit:3
#2 DONE 0.2s
#3 docker-image://docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805
#3 resolve docker.io/docker/sandbox-kit:3@sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805 done
#3 CACHED
#4 [internal] load kit descriptor typo.yaml · sandbox-kit 3.0.0-m.11 (92835bb7)
#4 transferring dockerfile: 824B done
#4 DONE 0.0s
ERROR: failed to build: failed to solve: decode kit descriptor: yaml: unmarshal errors:
line 10: field capabilites not found in type spec.Descriptor
View build details: docker-desktop://dashboard/build/kit-eval-25255/kit-eval-252550/dub24jxdpu607w92elwrky67k
[exit 1]
=== A6: sbx validate ===
$ sbx --app-name k-1793633938-25255 kit validate $WORK/extra-egress
error: not signed in to Docker
try: sbx login
[exit 1]
=== A6 diagnostic: bypass daemon policy ===
$ sbx --app-name k-1793633938-25255 kit validate $WORK/extra-egress --offline
error: kit $WORK/extra-egress is a v3 source kit and this load path has no kit builder configured; artifact validation failed
[exit 1]
=== A7: SKIPPED; no trusted v3 workload supplied ===
=== A8: cleanup ===
$ docker buildx rm kit-eval-25255
kit-eval-25255 removed
[exit 0]
$ rm -rf $WORK
[exit 0]
$ test ! -e $WORK
[exit 0]
$ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
default docker
\_ default \_ default running v0.34.0 linux/amd64 (+2), linux/arm64, linux/ppc64le, linux/s390x, (2 more)
desktop-linux* docker
\_ desktop-linux \_ desktop-linux running v0.34.0 linux/amd64 (+2), linux/arm64, linux/ppc64le, linux/s390x, (2 more)
preexisting-builder-1 error
preexisting-builder-2 error
preexisting-builder-3 error
preexisting-builder-4 error
Cannot load builder preexisting-builder-1: failed to connect to the docker API at unix://$HOME/.docker/sandboxes/vm/preexisting-builder-1/docker-public.sock; check if the path is correct and if the daemon is running: dial unix $HOME/.docker/sandboxes/vm/preexisting-builder-1/docker-public.sock: connect: no such file or directory
Cannot load builder preexisting-builder-2: failed to connect to the docker API at unix://$HOME/.docker/sandboxes/vm/preexisting-builder-2/docker-public.sock; check if the path is correct and if the daemon is running: dial unix $HOME/.docker/sandboxes/vm/preexisting-builder-2/docker-public.sock: connect: no such file or directory
Cannot load builder preexisting-builder-3: failed to connect to the docker API at unix://$HOME/.docker/sandboxes/vm/preexisting-builder-3/docker-public.sock; check if the path is correct and if the daemon is running: dial unix $HOME/.docker/sandboxes/vm/preexisting-builder-3/docker-public.sock: connect: no such file or directory
Cannot load builder preexisting-builder-4: failed to connect to the docker API at unix://$HOME/.docker/sandboxes/vm/preexisting-builder-4/docker-public.sock; check if the path is correct and if the daemon is running: dial unix $HOME/.docker/sandboxes/vm/preexisting-builder-4/docker-public.sock: connect: no such file or directory
[exit 0]
```
verification.md 8.9 KB
# Verification runbook for v3 kits
A manual runbook for v3 kit descriptors. A1-A8 were exercised on 2026-11-02.
The corrected asset passed build/conformance and runtime composition on
sbx v0.50.1. See [initial results](runtime-results.md) and
[authenticated results](authenticated-results.md) for commands, failures,
corrections, versions and limits. A2/A6 expectations below incorporate the
observed CLI behavior; A7 verifies connectivity, not a policy security boundary.
Prerequisites: Docker with Buildx, a pinned `kit-tck` release or commit that
you have recorded, and an `sbx` release you have confirmed supports Kits v3.
Normal source inspection/validation and composition require sign-in to the
isolated app. `--app-name` isolates credentials too; arrange an interactive
`sbx --app-name "$APP" login` with the operator, never copy credentials.
This runbook publishes nothing and signs nothing. Builds may pull the builder
and frontend from registries; the exported layout is validated locally. It
creates one uniquely named builder and one scratch directory, and the cleanup
step removes only test resources, including app-scoped daemon state. Use an
isolated, unique `--app-name` (at most 20
characters) on every `sbx` invocation. Run from the skill directory in one
shell. If inherited `DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND` and
`DOCKER_CLI_PLUGIN_SOCKET` make standalone `sbx` act as a Docker plugin,
unset them in this test shell first. Record `sbx version`, `docker buildx
version`, `kit-tck version`, and (for a Go-installed TCK) `go version -m`
on the binary. `kit-tck version` alone may print only `dev`.
## A1. Set up scratch resources
```bash
RUN_ID=$(python3 -c 'import uuid; print(uuid.uuid4().hex)')
APP="k-${RUN_ID:0:18}" # fresh suffix, at most 20 characters
BUILDER="kit-eval-$RUN_ID"
BUILDER_CREATED=false
WORK=$(mktemp -d /tmp/kit-v3.XXXXXX)
WORK=$(cd "$WORK" && pwd -P) # short canonical path for macOS runtime sockets
mkdir "$WORK/extra-egress" "$WORK/workspace"
cp assets/v3-mixin-egress.yaml "$WORK/extra-egress/extra-egress.yaml"
if docker buildx create --name "$BUILDER" --driver docker-container; then
BUILDER_CREATED=true
export BUILDX_BUILDER="$BUILDER" # also select it for sbx source builds
docker buildx inspect --builder "$BUILDER" --bootstrap
else
printf '%s\n' 'Builder creation failed; stop here and perform A8 without removing that name.' >&2
fi
```
Continue only if create and bootstrap both succeeded. Creation and bootstrap
are separate so a bootstrap failure still leaves ownership recorded for A8.
A failed create never grants permission to remove that name, even if a builder
with it exists. Keep `BUILDER_CREATED` in this shell; do not recreate it by
checking whether the builder exists.
The v3 asset is a companion-pair kit by stem: `extra-egress/extra-egress.yaml`
with no `.dockerfile`, because it is declaration-only. Before A2, have the
operator sign in with this same `$APP` and initialize only its network policy:
```bash
sbx --app-name "$APP" login
sbx --app-name "$APP" daemon start --detach --policy balanced
```
Do not generate a new app name after signing in. Always perform A8, including
after a failed build or composition.
## A2. Inspect the declarations
```bash
sbx --app-name "$APP" kit inspect "$WORK/extra-egress"
sbx --app-name "$APP" kit inspect "$WORK/extra-egress" --format json
```
Pass on v0.50.1: both succeed, report schema v3/kind mixin, and JSON includes
`registry.npmjs.org` in the projected network allow list. This CLI uses a
legacy-shaped view (`sandbox`, `permissions`), not the raw v3 descriptor;
it does **not** print both typed capability names. Do not copy its output as
authoring YAML or treat inspection as capability selection/conformance proof.
The initial v0.50.1 run stopped at sign-in. Its `--offline` retry deliberately
omits the builder and cannot load v3 sources; that is not a substitute for
A2. Source inspection is daemon-backed and may build/import an image. After
operator sign-in, use this normal command. Do not classify an authentication
failure as an unsupported-v3 error.
## A3. Check the descriptor through the frontend
```bash
(cd "$WORK/extra-egress" && docker buildx build --builder "$BUILDER" . \
-f extra-egress.yaml --output type=cacheonly)
```
Pass: the build succeeds. The descriptor is checked before any content is
built, so a bad field fails here quickly.
## A4. Export a layout and judge it with `kit-tck`
```bash
(cd "$WORK/extra-egress" && docker buildx build --builder "$BUILDER" . \
-f extra-egress.yaml -t extra-egress:0.0.0 \
--output type=oci,dest="$WORK/layout",tar=false)
kit-tck validate --layout "$WORK/layout" 0.0.0
kit-tck inspect --descriptor --layout "$WORK/layout" 0.0.0
```
Pass: `kit-tck` reports no failures. Pass the tag alone (`0.0.0`), not
`extra-egress:0.0.0`. Descriptor inspection prints both typed capabilities,
with only the explanatory `agent-context@2` request marked optional. The
required network policy must not be made optional. A build alone is not
proof the kit works.
## A5. Confirm strict decoding rejects a misspelled key
```bash
mkdir "$WORK/typo"
python3 - "$WORK/extra-egress/extra-egress.yaml" "$WORK/typo/typo.yaml" <<'PYCODE'
import pathlib, sys
src = pathlib.Path(sys.argv[1]).read_text()
pathlib.Path(sys.argv[2]).write_text(src.replace('capabilities:', 'capabilites:', 1))
PYCODE
(cd "$WORK/typo" && docker buildx build --builder "$BUILDER" . \
-f typo.yaml --output type=cacheonly)
```
Pass: the build fails with an unrecognized-key error naming `capabilites`, not
a silent no-op.
## A6. Compare daemon-backed validation with offline rejection
```bash
sbx --app-name "$APP" kit validate "$WORK/extra-egress"
sbx --app-name "$APP" kit validate "$WORK/extra-egress" --offline
```
Pass on v0.50.1: the normal command accepts this valid source through its
configured builder; the offline command rejects it with "no kit builder
configured". Authentication/daemon failures are blockers, not evidence that
the descriptor is invalid. Record both exit codes and messages. Other releases
must be checked rather than assumed to have the same behavior.
This corrects the original A6 expectation that normal validation must fail:
the exact v0.50.1 implementation wires a builder into both normal inspect and
validate. Neither command replaces the layout conformance check or A7.
Authenticated v0.50.1 validation subsequently succeeded; offline validation
failed as expected. Both outcomes are recorded in the results.
## A7. Optional: compose onto a v3 workload (manual)
Only if you have a v3 workload kit you trust at `./<workload>`; this skill
does not supply one. Use a short, canonical scratch workspace on macOS to
avoid Unix socket path limits (for example, `mktemp -d /tmp/kit-v3.XXXXXX`,
then resolve it with `pwd -P`). Initialize network policy only for the isolated
app, for example with `sbx --app-name "$APP" daemon start --detach --policy balanced`.
```bash
sbx --app-name "$APP" run ./<workload> --kit "$WORK/extra-egress" \
--detach --name kit-v3-check "$WORK/workspace"
sbx --app-name "$APP" policy check network --sandbox kit-v3-check registry.npmjs.org
```
Use a workload stem that does not collide with an installed built-in agent:
v0.50.1 rejects a local workload named `shell`; a disposable copy named
`kit-probe/kit-probe.yaml` plus `kit-probe.dockerfile` avoids that collision.
The supplied mixin keeps its explanatory `agent-context@2` optional because
v0.50.1 does not support that capability at composition time. Hosts may omit
the note; the network request remains required.
Observe and record the decision. Do not assume the egress request was granted
just because it is declared; the host decides. For a mixin that ships a tool,
run the tool with `sbx exec` (not as an argument after `--` on `sbx run`).
## A8. Clean up (consented removal of only what this runbook created)
```bash
sbx --app-name "$APP" rm --force kit-v3-check # only if A7 was run
sbx --app-name "$APP" daemon stop # if any daemon-backed step ran
if [ "${BUILDER_CREATED:-false}" = true ]; then
if docker buildx rm "$BUILDER"; then
BUILDER_CREATED=false
fi
fi
rm -rf "$WORK"
```
Normal A2/A6 may start a daemon even without A7. After confirming it stopped,
remove only this session's app-scoped runtime state. On the tested macOS host:
```bash
STATE_DIR="$HOME/Library/Application Support/com.docker.sandboxes/sandboxes-$APP"
RUN_DIR="$HOME/.sbx/run_$APP"
FALLBACK_ALIAS="/tmp/sboxd-$(id -u)-sandboxes-$APP"
# Verify these paths name only this session before removing them.
rm -rf "$STATE_DIR" "$RUN_DIR" "$FALLBACK_ALIAS"
```
Verify these paths are absent and no process for `sandboxes-$APP` remains.
Resolve platform-specific paths before using this on another OS. Never remove
the default app's state. This does not remove the isolated keychain sign-in;
coordinate logout separately with the operator.
The builder name is unique to this run. Do not remove a builder you did not
create, and do not substitute `docker buildx prune`, `docker system prune`,
or any unscoped removal.
docker-sandboxes-kits.md 10.1 KB
# Eval: docker-sandboxes-kits
Skill under test: `skills/docker-sandboxes-kits/`
The skill covers v3 kit descriptors only. Legacy v2 `spec.yaml` kits are out
of scope; a correct answer never presents a v2 command (`sbx kit validate`)
as validating a v3 descriptor.
Verification snippets are illustrative, not standalone integration tests.
Run them only against disposable resources with a fresh `APP` suffix (at
most 20 characters) and a uniquely named builder. Follow the skill's
`checks/verification.md` for prerequisites and cleanup. Never substitute the
default daemon, use a shared builder or registry, or approve untrusted files
just to execute an eval. The deterministic checks in `evals/eval-checks.yaml`
assert skill text and checked-in assets only, not live model behavior or a
live `sbx`.
---
## Prompt 1: a new kit for a CLI (mixin vs workload, version pin)
**Prompt to agent:**
> I want to package the `gh` CLI as a reusable Docker Sandboxes kit I can
> attach to any agent. How should I structure it, how do I pin the
> version, and how do I declare network access for both build-time downloads
> and runtime API calls?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Recommends a v3 `kind: mixin` (it adds a tool to somebody else's
environment) and explains the workload-versus-mixin distinction.
- [ ] Uses the companion-pair layout: `<kit>.yaml` whose first line is
`# syntax=docker/sandbox-kit:3`, plus a `<kit>.dockerfile` content
recipe.
- [ ] Declares one build-phase `version` arg that drives the install.
- [ ] Requests egress with phase-scoped `network-policy@1` (install versus
runtime hosts).
### Must not
- [ ] Must NOT author a `spec.yaml`, use `schemaVersion: "2"` or
`kind: sandbox`, or give `sbx kit validate` as the workflow.
- [ ] Must NOT add `requires: ["deb/curl"]` or similar for tools every base
is entitled to provide.
- [ ] Must NOT present an unverified download URL or checksum as verified.
### Verification
Static: `assets/v3-mixin-egress.yaml` is the checked-in v3 example. For a
live check, follow `checks/verification.md` (builder, `kit-tck`,
`sbx kit inspect`) against a disposable builder.
---
## Prompt 2: mixin ownership of entrypoint and the agent's home
**Prompt to agent:**
> My mixin's Dockerfile sets `ENTRYPOINT` and `USER`, and it copies files with
> `COPY --chown=1000:1000 tool /home/agent/tool`. A reviewer says both are
> wrong. Why, and what should I do instead?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Explains that a mixin cannot set `ENTRYPOINT`, `CMD`, `USER` or
`WORKDIR` and have it take effect: the workload anchors the composition
and owns them, while additive fields merge.
- [ ] Recommends staging under `/out` and using numeric ids for ownership,
or avoiding `/home/agent` and using `/usr/local` or `/opt`.
### Must not
- [ ] Must NOT recommend using user names in chown (a `scratch` overlay has no
`/etc/passwd`).
### Verification
Static text check against `references/v3-recipes.md`. Live: build the
overlay, export an OCI layout, and run `kit-tck validate --layout`.
---
## Prompt 3: is `sbx kit validate` enough for a v3 kit?
**Prompt to agent:**
> I wrote `my-kit.yaml` with `# syntax=docker/sandbox-kit:3`. Is
> `sbx kit validate ./my-kit` enough to know the kit is valid?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Says no: normal `sbx kit validate` is not a substitute for conformance
and runtime checks.
- [ ] Recommends additional validation steps beyond `sbx kit validate`, such as
building the kit, running `kit-tck` conformance checks, or composition testing.
- [ ] Says a successful build is not proof the kit works.
### Must not
- [ ] Must NOT report `sbx kit validate` output as full kit conformance.
### Verification
Steps A2-A6 of `checks/verification.md`, including the check that
normal `sbx kit validate` can accept the source while `--offline` rejects it.
---
## Prompt 4: capabilities for network, a token, and hook environment
**Prompt to agent:**
> My v3 kit's install hook and the running agent both call `api.example.com`,
> and the API needs a token. Which capabilities should I declare, and what
> will go wrong if I get them slightly off?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Uses `network-policy@1` and puts the host in both `install` and
`runtime`, explaining that an absent phase grants nothing.
- [ ] Uses `credential@1` and discusses when to mark it `optional: true` (for
APIs that work without auth) versus required (when auth is essential).
- [ ] Keeps the token out of the descriptor, args, and recipe.
### Must not
- [ ] Must NOT claim a wildcard entry satisfies a specific credential domain.
- [ ] Must NOT put a token value in a descriptor or build arg.
### Verification
Static text check against `references/v3-capabilities.md` and the skill's
core guidance.
---
## Prompt 5: publishing and signing a multi-platform v3 kit
**Prompt to agent:**
> How do I publish my v3 kit for amd64 and arm64 to our registry and sign it
> so consumers can verify where it came from?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Explains that v3 kits are published via `docker buildx build --push` or similar
build-and-push workflow (not `sbx kit push`).
- [ ] Mentions signing the image digest (not the tag) for verification.
### Must not
- [ ] Must NOT use `sbx kit push` or `sbx kit sign` for a v3 kit (these are v2 commands).
- [ ] Must NOT push two single-platform builds to the same tag (should use multi-platform build).
### Verification
Static text check against `references/v3-publish-and-sign.md`. Do not run a
real push in an eval.
---
## Prompt 6: an existing v2 kit and the migration skill
**Prompt to agent:**
> I have a kit with `schemaVersion: "2"` in a `spec.yaml`. Can you fix its
> validation error, and which skill converts it to v3 for me?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Says legacy v2 `spec.yaml` kits are out of scope for this skill or
explains that v3 uses a different format.
- [ ] Offers guidance on v3 kits or mentions where to get migration help.
### Must not
- [ ] Must NOT perform or claim to perform a mechanical field-by-field v2-to-v3 conversion
(mentioning that a separate migration skill exists is acceptable).
- [ ] Must NOT treat `sbx kit validate` alone as conformance proof for a v3 kit
(kit-tck is different and acceptable).
### Verification
Static text check against the skill's "Migrating from v2" guidance and
`references/sources.md`.
---
## Prompt 7: proving an overlay works when composed
**Prompt to agent:**
> My mixin builds and `kit-tck` passes, but I want proof the tool actually
> runs once it is composed onto a workload. What should I run?
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Composes the built overlay onto a real workload with
`sbx run ./<workload> --kit ./<kit>` and runs the tool with
`sbx exec <sandbox> <tool> --version`.
- [ ] Explains that arguments after `--` on `sbx run` are agent arguments and
never execute the overlay's binary.
### Must not
- [ ] Must NOT suggest `sbx run ... -- tool --version` as the check.
### Verification
Static text check against `references/v3-recipes.md`. Live composition needs
an operator-supplied v3 workload (step A7 of `checks/verification.md`).
---
## Prompt 8: referencing a published kit from sbxenv.yaml
**Prompt to agent:**
> I published my `gh` mixin as `acme/gh:2.1.0`. How does a teammate add it to
> their checked-in `sbxenv.yaml` on top of the `claude` agent, and can they
> set the `gh` version there? The mixin requires a GitHub token.
>
> (AUTOMATED EVAL: You MUST NOT ask questions or request clarification. Proceed immediately with best-practice defaults. Create all necessary files even if the workspace appears empty.)
### Expected behaviors
- [ ] Keeps `agent: claude` and lists the mixin under `kits:`.
- [ ] Says the version of a published kit is chosen by its tag, not by a kit
arg, because build-phase args were fixed at publish time.
- [ ] Approves the token through a `bindings:` entry (or the sbx credential
store) rather than writing its value into the file.
- [ ] Recommends pinning a digest or says a clean `sbx env plan` does not
prove the kit reference resolves.
### Must not
- [ ] Must NOT write a token value into `sbxenv.yaml` or a `--kit-arg`.
- [ ] Must NOT set `version` as a kit arg on the published kit.
### Verification
Static text check against `references/sbxenv-kit-references.md`. A live check
needs an operator-approved disposable `sbx env create` and `sbx env rm`.
---
## Should not trigger
- "How do I run this kit in a sandbox right now?" → `docker-sandboxes-lifecycle`
- "How do I actually store the API key value this credential needs?" → `docker-sandboxes-network-credentials`
- "How do I add a `postCreate` lifecycle hook to my sbxenv.yaml?" → `docker-docs` (no catalog skill owns the rest of `sbxenv.yaml`)
- "How do I shrink the layers of my application's Dockerfile?" → `docker-build-strategies`
- "Clean up the builders and images I created while testing" → `docker-destructive-guardrails`
sbxenv-kit-references.md 7.2 KB
# Referencing a kit from sbxenv.yaml
What a kit author or consumer needs to know about how an `sbxenv.yaml`
environment file (`schemaVersion: "1"`, experimental `sbx env`) references
and configures a kit. The file's own schema `"1"` is unrelated to a kit
descriptor's `schemaVersion: "3"`. This page covers only the `agent:` and
`kits:` fields and the fields a kit's capabilities map onto. The rest of the
file (lifecycle hooks, approval plan, merging, secrets provisioning) is not
covered by this catalog; answer it from the Docker Docs
[environment files](https://docs.docker.com/ai/sandboxes/configuration/environment-files/)
page. Provenance is in `sources.md`.
## `agent:` and `kits:`
```yaml
schemaVersion: "1"
agent: shell # built-in agent, or a workload kit's handle
kits:
- sbx/example:1.2.3 # OCI, tag
- sbx/example:1.2.3@sha256:<digest> # OCI, tag + digest (reproducible)
- source: sbx/example-mixin:4.5.6 # OCI with kit args
args:
model: ${{ env.args.model }}
- ./kits/dev-tools # local directory, built on create
- ./dist/tool.zip # local ZIP
- git+https://github.com/org/repo.git#ref=<commit>&dir=kits/tool # git, pinned (or git+ssh://)
workspace: .
```
The references above illustrate shapes only; they are not recommendations.
Resolve a real reference's tag and digest from the registry at the time you
write it.
- **One workload.** A composition has exactly one workload and any number of
mixins. `agent:` is a built-in agent (`claude`, `codex`, `shell`, …) or the
**handle** of the one `kind: workload` kit under `kits:`. To add tools to a
built-in agent, keep the built-in name and list only mixins. On sbx v0.51.0
the built-in `shell` agent resolves as the kit `docker.io/sbx/shell`.
- **Handle.** A v3 kit's handle is the last path segment of its repository
(`sbx/claude` → `claude`); for a git source it is the `dir=` basename, for
a local directory the directory name. This is why a workload's directory
name matters: a local workload named after a built-in agent (for example
`shell`) collides with it.
- **`X` and `X-mixin`.** When both exist, `X` is the workload and `X-mixin`
layers that agent onto another workload. Use the mixin only when the user
wants a different base.
- **Relative sources.** Only `./…`, `../…`, `.`, `..`, or a path ending in
`.zip` are file paths, resolved against the **declaring file's directory**.
A bare `kits/tool` is a registry reference.
- **Pin for reproducibility.** A tag can be republished (on 2026-11-12
`sbx/playwright:1.61.1` moved to a new digest), so a tag alone is not
reproducible. Prefer `tag@sha256:<digest>` for OCI and `#ref=<commit>` for
git. Pick the highest version release tag, not the most recently pushed
tag or `latest`.
- **Allowed sources.** Remote sources must match the `kit.allowedSources`
setting (Docker Hub by default). `sbx settings set kit.allowedSources
'[...]'` replaces the whole allowlist.
- **Merged files.** When several environment files are merged, `kits`
entries naming the same source fold into one entry whose `args` merge key
by key.
- **Changes need recreation.** On an existing environment, changes to
`kits:`, kit host mounts, ports, secrets, bindings, workspaces, and
`sandboxOptions` take effect only after `sbx env rm` and a new create.
## Upgrading a referenced kit
Before moving an entry to a new release, compare the old and new descriptors
(for example the published `/usr/share/sandbox/kit/<kit>/kit.yaml` inside a
disposable sandbox composed with each release), and reconcile:
- **args:** remove an arg the new release no longer declares, set a new
required arg, and check the file's values against a tightened
`enum`/`pattern`.
- **credentials:** a new service, mechanism, or domain needs a binding change.
- **kind and handle:** a changed handle or kind can require changing `agent:`;
a new required grant (such as `ssh-agent@1`) needs a prerequisite note.
To pin, resolve the digest of the exact tag you inspected, for example with
`docker buildx imagetools inspect <org>/<kit>:<tag>`, and write
`<org>/<kit>:<tag>@sha256:<digest>`. This skill does not search or rank the
public kit catalog.
## Kit args
- Keys in an entry's `args:` are the bare create-phase arg names the kit
declares. An undeclared arg is an error, and values must satisfy the kit's
`enum`/`pattern`.
- A **published (OCI) kit accepts only create-phase args.** Build-phase args
(typically `version`) were fixed at publish time; choose another tag to
change them. Local-directory and git sources build on create, so their build
args apply. Build secrets are build inputs only, never runtime credentials.
- For a kit author this is why the single build-phase `version` arg described
in `SKILL.md` drives the tag: consumers change the tool version by changing
the tag, not with an arg.
- `--kit-arg name=value` (all kits) or `--kit-arg <handle>.name=value` (one
kit) overrides `args` for one invocation; `--kit-args-file` reads
`name=value` lines. Both are experimental. Never pass a secret as an arg; use
`credential@1` and the credential store.
## Where a kit's capabilities surface in the file
| Kit declares | Consumer's `sbxenv.yaml` |
|---|---|
| `credential@1` (required) | A `bindings.<service>` entry naming only the mechanism used: `apiKey` with the kit's inject domains (an `apiKey` read only through `apiKeyEnv`, with no inject rules, has an empty domain list), or `oauth` (a one-time host sign-in, no secret). Without it, create fails. An optional credential without a binding is skipped silently. The secret value lives in the sbx credential store (see `docker-sandboxes-network-credentials`), never in the file. A service or domain that references a kit arg resolves from the value the file sets; never copy a `${{ … }}` expression into a binding. |
| `host-mount@1` | A grant the user is asked to approve. The runtime owns the host location by default; an optional top-level `mounts:` entry binds the kit's sandbox path to a chosen existing host directory instead (local only). |
| `port@1` | Optional `ports:` entry to pin the host port; otherwise the host port is ephemeral. |
| `ssh-agent@1` (required) | A prerequisite: an SSH agent with a key loaded on the host (`ssh-add -l`). |
| `privileged@1`, `dockerd@1`, `host-port@1`, `host-mount@1` | Grants the user is asked to approve; explain them before asking. |
| A private kit image | A `registries:` entry for that registry. |
## What a clean plan does and does not prove
- `sbx env plan` does **not** resolve kit references. On sbx v0.51.0 it
planned cleanly for a nonexistent tag and a nonexistent kit; the missing tag
failed only at create, after approval. An unknown field, by contrast, fails
strict decoding.
- A mixin can under-declare `requires`. On sbx v0.51.0, `sbx/playwright`
reported `requires: []`, but composing it onto the bare `shell` agent
failed at create with `env: 'node': No such file or directory`. A kit
author should treat that as a reason to make the install hook probe and
fail with an actionable message; a consumer should treat only a disposable
`sbx env create` (reviewed plan, no `--force`) followed by `sbx env rm` as
proof that a composition installs.
sources.md 16.2 KB
# Sources
## v3 track: docker/sandbox-kit-spec at 4d932451613f8df89c8468e2bb7c5286882897ca
Adapted, not copied, from the operator-supplied authoring skill and recipes.
Their paths and content were confirmed through the GitHub contents API on
2026-11-02 at the pinned commit:
- [create-kit-v3/SKILL.md](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/skills/create-kit-v3/SKILL.md)
- [create-kit-v3/RECIPES.md](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/skills/create-kit-v3/RECIPES.md)
These sources establish authoring guidance, not support in every sbx release.
The source's blanket rejection claim about `sbx kit validate` is contradicted
by the recorded v0.50.1 tests and is corrected in this skill.
Where each part went:
- `create-kit-v3` `SKILL.md`: kind decision, layout, and the workflow in this
skill's `SKILL.md`; the descriptor skeleton, capability table, volume and
host-mount rules, bundled skills, groups, and environment references in
`v3-capabilities.md`; publishing and signing in `v3-publish-and-sign.md`.
- `RECIPES.md`: `v3-recipes.md`, with its links to the source `SKILL.md`
rewritten to this skill's `SKILL.md`.
- `assets/v3-mixin-egress.yaml` is original to this adaptation. It uses only
descriptor keys and capability types that appear in the source skeleton,
and it passed build and layout conformance checks on 2026-11-02. After
making explanatory context optional, runtime composition and npm HTTPS
connectivity also passed on v0.50.1; see the scoped evidence below.
Changes made while adapting (not source behavior):
- The workload recipe's `ENTRYPOINT` no longer carries a permission-bypass
flag, and a checksum-pinning note was added.
- `kit-tck` installation is described as pinned rather than `@latest`.
- Approval, scratch-namespace, and inverse-operation (cleanup) guidance was
added around registry pushes, builders, test sandboxes, and local images.
- References to source-repository paths (`examples/...`, the `migrate-kit-to-v3`
skill and its `FIELD-MAPPING.md`) were removed or marked unavailable, since
they are not part of this catalog and were not supplied.
## Public specification cross-check
Fetched and read these pinned public pages on 2026-11-02:
- [SPEC-v3](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/SPEC-v3.md): §3 companion-pair authoring;
§7 typed requests, optionality and unknown types; §10 staged descriptors,
additive image-config merging, PATH appending, overlay ownership and link
checks; §12 the platform floor. These are specification contracts, not
proof that every recipe base or runtime implements them.
- [network-policy@1](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/capabilities/com.docker.sandbox/network-policy@1.md)
and [network-policy@2](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/capabilities/com.docker.sandbox/network-policy@2.md):
phase-scoped policy, mutually exclusive versions within one descriptor,
bounded request shapes, deny precedence and fail-closed runtime duties.
- [agent-context@2](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/capabilities/com.docker.sandbox/agent-context@2.md):
inline content, profiles, selected-version exclusivity and runtime surfacing.
The page explicitly requires consumers to advertise @2 support before
accepting required requests; schema version 3 alone is insufficient.
- [dockerd@1](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/capabilities/com.docker.sandbox/dockerd@1.md):
`autoStart`, privilege/storage surface and runtime refusal.
- [host-mount@1](https://github.com/docker/sandbox-kit-spec/blob/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/capabilities/com.docker.sandbox/host-mount@1.md):
runtime-owned host location, shared storage identity and persistence.
The pinned authoring skill also states that its grammar is unfinished and
implementation wins on disagreement. This verifies that attribution, not
that every implementation behavior conforms to the specification. The other
capability summaries remain source-derived guidance; consult the
[pinned capability directory](https://github.com/docker/sandbox-kit-spec/tree/4d932451613f8df89c8468e2bb7c5286882897ca/docs/spec/capabilities/com.docker.sandbox)
before using a type. Runtime support must still be checked on the target host.
## Removal of the legacy v2 track
An earlier revision of this skill also covered v2 `spec.yaml` kits
(`schemaVersion: "2"`, verified against docker/sandboxes
`df5c96ba60484fa2c375469dbac912c205da6c37`). That guidance, its assets, and
its evidence were removed on the operator's instruction that v2 is being
retired and v3 is the standard. That retirement is an operator statement; the
supplied v3 source gives no deprecation or removal timeline for v2, so this
skill gives no date and cites no source for it.
The earlier evidence is in the Git history of this repository, not in this
skill. Nothing in the v3 sources was used to restate, confirm, or extend it.
## Remaining scope limits and review questions
The tested example is not a certification of the whole skill:
1. `sbx v0.50.1` is a tested local release, not the first supporting release
or evidence for cloud support. Do not infer capability support from the
schema version; required `agent-context@2` failed on that release.
2. The capability table describes source/spec contracts. Only the egress
example was exercised at runtime. Optional context delivery, bounded
network security, credentials, privileged grants and other capabilities
were not tested. A reviewer should check any broader claims against the
pinned specification, not extrapolate from the HTTP 200 result.
3. PR image check run `41481808170` performed anonymous manifest/platform
checks: 14 occurrences passed, one local CLI-output tag was misclassified,
and `dhi.io/debian-base:trixie-dev` was not checked. The real references
that passed were `docker/sandbox-kit:3`, `docker/dockerfile:1`, and the
pinned `docker.io/sbx/shell-docker-image` index used by the runtime test.
This establishes anonymous manifest availability with amd64/arm64 entries
at check time, not full anonymous layer downloads or future tag stability.
After correcting case-sensitive Compose-key detection, the full local
`task images:check` passed: 66 occurrences, 21 unique references, 65 ok,
zero errors/warnings, and the one unsupported-registry notice.
4. The illustrative `dhi.io` recipe bases and tool downloads are not verified.
Inspect and pin a suitable base before using them; the platform floor is a
spec requirement, not a verified property of every named image.
5. Tool-bearing overlays, env/file ownership interactions, volumes, host mounts,
startup-log behavior, publishing and signing were not run. Source-backed
recipes are templates that require their own build, TCK and runtime tests.
6. `BUILDX_BUILDER` and the in-sandbox descriptor path were exercised.
`SBX_KIT_BUILDER` overrides were source-reviewed only.
7. No public v2 retirement policy was established. Excluding v2 is a routing
decision for this skill, not a product deprecation/removal announcement.
## sbxenv.yaml kit references
`sbxenv-kit-references.md` carries over the kit-related rules from the
retired `docker-sandboxes-env` skill (removed from this catalog on
2026-11-12; last version 0.2.1 at commit
`188afba` of this repository). Its provenance was:
- [Docker Docs: Sandbox environment files](https://docs.docker.com/ai/sandboxes/configuration/environment-files/),
retrieved 2026-11-10: `agent:`/`kits:` shapes, relative-source resolution,
create-phase args, `kit.allowedSources`, `--kit-arg`/`--kit-args-file`,
`mounts:`, `ports:`, `bindings:`, `registries:`, and the
recreate-on-change rule.
- Installed `sbx env` help, sbx v0.51.0
(`7d55286de0c775148b985ed349f760f1eba06203`): flag availability.
- docker/sandboxes `sandboxlib/sbxenv/types.go` and `sandboxlib/kit/git.go`
at the same commit (internal, not publicly verifiable): the
`git+…#ref=…&dir=…` source shape.
- [docker/sandbox-kit-spec `skills/sbxenv`](https://github.com/docker/sandbox-kit-spec/tree/75b2696a80163497b0d0d1cd73d3fb7ccaa050fe/skills/sbxenv)
at `75b2696a80163497b0d0d1cd73d3fb7ccaa050fe`: handle rules and the
capability-to-field handling.
- Runtime observations recorded by that skill on sbx v0.51.0, macOS arm64,
2026-11-10 and 2026-11-12, and not re-run for this skill: `sbx env plan`
accepted a nonexistent tag and a nonexistent kit; the nonexistent tag failed
only at create; `sbx/playwright:1.61.1` (`requires: []`) failed at create on
the `shell` agent with `env: 'node': No such file or directory`;
`sbx/task:3.50.0` composed and ran; the `sbx/playwright` tag was republished
with a new digest; and `shell` resolved as `docker.io/sbx/shell`.
- The local-workload `shell` name collision comes from this skill's own
v0.50.1 runtime results, not from the environment-file sources. The
`docker buildx imagetools inspect` pinning example and the upgrade
checklist's descriptor-comparison step are this adaptation's
substitutes for the retired helper and have not been exercised against an
`sbxenv.yaml`.
`sbx env` and environment-file `schemaVersion: "1"` are experimental. The
retired skill's live Docker Hub helper (`scripts/kits.py`) was not carried
over; this skill does not search or rank the public kit catalog.
## Conflicts and gaps
- `docker-sandboxes-lifecycle` states that `sbx --cloud` is out of scope for
its skill set, while the v3 source says Kits v3 work in cloud mode. This
skill makes no cloud-mode claims of its own.
- The v2-to-v3 field mapping (`FIELD-MAPPING.md` in the source's
`migrate-kit-to-v3` skill) was not supplied. No mapping is given here, and
`migrate-kit-to-v3` is not a skill in this catalog.
- The kit-spec source does not say how v3 credential values are provided to
a sandbox (for example whether `sbx secret set` applies), or how `args` are
supplied at create time. The `sbxenv.yaml` and `--kit-arg` rules in
`sbxenv-kit-references.md` come from the separate sources listed under
"sbxenv.yaml kit references" above, not from the kit spec.
- The sibling skills `docker-sandboxes-lifecycle` and
`docker-sandboxes-network-credentials` still describe kits in v2-era
vocabulary (`spec.yaml`, `credentials:`, `permissions.network:`). Their
routing to this skill remains correct, but their wording has not been
reconciled with v3.
- The original adaptation was unexecuted. The 2026-11-02 verification below
supersedes that statement for build/layout checks, authenticated source
loading and the corrected asset's local runtime composition. Publishing and
signing remain untested.
## Executed verification: 2026-11-02
See [commands and output](../checks/runtime-results.md). Tested on macOS arm64,
Docker Engine 29.9.1 / Desktop 4.96.0, Buildx v0.38.0, and `sbx v0.50.1`
(`ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4`). `kit-tck` was installed at
`4d932451613f8df89c8468e2bb7c5286882897ca`; its version command printed `dev`,
while Go build metadata recorded
`v3.0.0-m.11.0.20261031103226-4d932451613f` (Go 1.26.10).
Verified, scoped to this asset and these tools:
- A3: declaration-only companion-pair descriptor builds with `cacheonly`.
- A4: OCI directory export and bare-tag `validate --layout ... 0.0.0`
succeed: **19 checks, 19 passed**. No correction was needed for build
conformance; runtime testing later required making explanatory context optional.
- A5: misspelling `capabilities` as `capabilites` fails strict decoding and
names the bad field.
- A6: the offline source validation path rejects this v3 source kit with
"no kit builder configured; artifact validation failed". The normal
command's sign-in failure alone is not evidence for v3 rejection.
- The frontend pulled as `docker/sandbox-kit:3` at
`sha256:adbc0d1ea63451871d5d78111120bb29f2fd2b265e63d39c664ae2c3d722c805`,
reporting `3.0.0-m.11 (92835bb7)`.
Initial-run limit: normal inspection stopped at sign-in, and offline
inspection rejected the source as expected for a builder-free path. A7 was
skipped without a trusted workload. That initial run did not verify runtime
behavior; see the authenticated follow-up below for subsequent evidence.
A1/A8 created and removed only that run's builder and scratch resources.
## Source follow-up: A2 and A6
Inspected the operator's `docker/sandboxes` checkout at
`aaa96b72111a83a8326419630ab6ad18c0fde0c5` and used `git show` to read the exact
installed v0.50.1 revision `ddb0268d7124b9cf98955d0b08ffd71a0dfcebe4`.
These code findings explain the initial failures; authenticated results
are recorded in the follow-up below:
- `cli-plugin/commands/kit.go`: normal validate sets
`V3Builder: defaultKitBuilder{}`; offline validate/inspect deliberately omit
it. `images_mirror.go` supplies that builder for normal inspect.
- `sandboxlib/kit/source_v3.go`: the observed error is the nil-builder guard,
before descriptor build. `TestKitInspectCmd_OfflineRejectsV3SourceKit` and
`TestKitValidateCmd_OfflineRejectsV3SourceKit` explicitly expect it.
- This design was introduced by commit
`865f481537d6bb6d3951e5a2ff4cf70fcb748343` (2026-10-08), present in the
installed release. No CLI patch or upgrade is needed to explain A2.
- `sandboxlib/auth/defaultstore.go`: a non-default app name selects a separate
auth store, so the default app's login is not inherited.
- The original blanket claim "validate does not accept v3 source" is wrong:
normal validation is builder-enabled in v0.50.1. A6's offline failure
cannot support that claim. Authenticated validation subsequently passed.
- v0.50.1 `kit_source_builder.go` selects host Buildx or the sandbox builder;
the current checkout adds in-process synthesis for declaration-only kits,
followed by daemon import. Do not conflate these implementations.
- Installed help spells detached mode `--detach`, not the original A7
`--detached`; the runbook now uses the supported spelling.
A7 candidate: the checkout's `tests/e2e/kits/testdata/shell` is a two-file v3
workload with `ENTRYPOINT ["sh"]` and only `com.docker.sandbox/sbx@1`.
For a disposable copy, pin its base `docker.io/sbx/shell-docker-image` to the
resolved index digest
`sha256:6c84996b07b743154fc8f26c662b642cee8fb6dd410803b2c40d5d3a537c838d`.
The index includes linux/arm64. The disposable workload was renamed to
`kit-probe` because v0.50.1 rejects a kit named `shell` as a collision with its
built-in agent. The operator signed in only to the isolated app; no auth
bypass or credential copying was attempted.
## Authenticated runtime follow-up: 2026-11-02
[Full commands and output](../checks/authenticated-results.md) supersede the
initial run's A2/A6/A7 conclusions. The same sbx v0.50.1 binary was used after
operator sign-in to an isolated app; no Sandboxes code change was needed.
- A2 succeeds but prints a projected summary, not both typed capabilities.
Its JSON uses `newKitV2View`; do not copy that output into a v3 descriptor.
- A6 normal validate succeeds (`valid (directory)`); offline fails intentionally.
Thus the original "must fail" expectation was wrong.
- A7 initially rejects required `agent-context@2` despite successful validation.
The host does not support it. Corrected the asset to make only the
explanatory context optional, leaving the network request required.
- The fixture stem `shell` also collides with a v0.50.1 built-in agent;
renaming the disposable companion pair to `kit-probe` resolves this.
- Corrected A3/A4/A5 pass again: 19 TCK checks, raw descriptor inspection,
and explicit rejection of `capabilites`.
- Corrected A7 starts the composed sandbox, policy check allows npm:443,
and an in-sandbox curl returns HTTP 200. The kit descriptor is present at
`/usr/share/sandbox/kit/extra-egress/kit.yaml`; exec runs as uid 1000.
- This tests the observed host policy, not whether the mixin alone added
access: the host also permits package registries. Optional context delivery
is not verified; neither are cloud, signing or other capabilities.
- All run-created sandboxes, builders, scratch directories and isolated daemon
runtime state were removed. The operator's isolated sign-in was preserved.
v3-capabilities.md 18.0 KB
# v3 descriptor and capabilities
Adapted from the `create-kit-v3` skill in docker/sandbox-kit-spec at
`4d932451613f8df89c8468e2bb7c5286882897ca`. Claims here rest on that source
and the pinned public spec. Only the bundled egress example was exercised
on a live `sbx`; see [sources.md](sources.md) for the cross-check and limits. Section numbers
(§) refer to SPEC-v3 as cited by the source.
The source describes the schema-3 grammar as unfinished, and says that where
the docs and the Go implementation disagree, the code wins. Treat fine
details as provisional and re-check the spec before depending on them.
## Authoring forms and layout
A kit is one OCI image. Its layers are the content and a manifest annotation
carries the **descriptor**: what the kit offers, what it needs from the host
as typed capability requests, and what it needs from other kits. An engine
that does not read the annotation runs it as an ordinary image.
The default authoring form is a companion pair found by filename stem:
```text
<kit>/
<kit>.yaml # the descriptor; first line `# syntax=docker/sandbox-kit:3`
<kit>.dockerfile # the content recipe (omit for a declaration-only mixin)
README.md
```
No `dockerfile:` field is needed. Three other forms exist: an inline `build:`
block, a `# kit:` comment descriptor inside a Dockerfile, and a `kind: set`
list of other kits (SPEC-v3 §3). For a complete declaration-only mixin, see
`assets/v3-mixin-egress.yaml`.
## Descriptor skeleton
This is a fragment, not a complete kit: it needs a companion
`<kit>.dockerfile` whose `ARG GH_VERSION` receives the `buildArg` and installs
that exact release. The companion recipe was not part of the source, so none
is shown for `gh`; use the overlay pattern in `references/v3-recipes.md`.
```yaml
# syntax=docker/sandbox-kit:3
schemaVersion: "3"
kind: mixin
displayName: GitHub CLI
description: gh, installed from the official release tarball
sourceUrl: https://github.com/cli/cli
licenses: [MIT]
# One value drives the install, the provide, the published version and the tag.
version: "${{ kit.args.version }}"
args:
version:
default: "2.98.0"
pattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
description: GitHub CLI release to install
buildArg: GH_VERSION
provides: ["gh@${{ kit.args.version }}"]
# No requires: this overlay ships a release tarball and needs nothing from the
# workload. Add entries only for what the composed runtime must already have.
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow: [github.com, api.github.com]
- type: com.docker.sandbox/agent-context@2
config:
content: Use gh for GitHub operations.
```
Every key is `lowerCamelCase` with acronyms title-cased (`sourceUrl`,
`apiKey`). Decoding is **strict**: an unrecognized key anywhere is an error,
so a misspelled key cannot silently leave a policy absent.
## Capabilities
An optional entry-level `name` gives a short display label and `description`
its explanation. Names may contain spaces and need not be unique; they change
no identity, permission, or merge key. When entries merge, the first nonempty
label in contribution order wins. This label is separate from config fields
such as `apiKey.name`.
A capability is a typed request the host answers. `optional: true` means the
kit degrades without it; the default is required, which fails resolution
closed. Read the capability page for each type you emit; each is normative
for its config and for what a runtime must do. Types below are written
without their `com.docker.sandbox/` prefix.
| Type | Use it for | Easy to get wrong |
|---|---|---|
| `network-policy@1` | egress by host | **Phase-scoped**: an absent phase grants nothing. Hosts your install hooks reach go in `install`, hosts the running agent (or a startup hook) reaches go in `runtime`, hosts both reach go in both. |
| `network-policy@2` | egress bounded by HTTP method and path | Same phases, plus entries that grant only matching requests. Pick `@2` when a host should carry one API and not the rest; stay on `@1` when host alone is the grant. **Exclusive with `@1`**: declaring both is an error, and a bounded allow entry must name its hosts literally. **Verify the bound you rely on**: declare the tightest correct policy, but confirm against your target runtime which parts it enforces before treating one as a security boundary. A refusal is a `403` from the boundary, which an origin can also return, so test a case the origin would allow. |
| `credential@1` | one service's auth | Entries are **required by default**; add `optional: true` unless the kit genuinely cannot run unauthenticated. `phase` accepts a single phase or `[install, runtime]` with shared configuration. Every `inject[].domain` must appear in every listed phase's allow list, matched **exactly**: a `*.example.com` wildcard does not satisfy `api.example.com`. |
| `ssh-agent@1` | git over SSH, SSH commit signing | Set `unrestricted: false` to bound it. `sign: [git]` is all commit signing needs; `authenticate: [git@github.com]` is a login to one server. An entry with `unrestricted: true` (the default) signs anything with every key the user's agent holds: declare that only when a client cannot bind sessions (OpenSSH can), and prefer `credential@1` with HTTPS when a token will do. `optional: true` unless the kit cannot work without it, since many users have no agent running. A hook that uses it declares `SSH_AUTH_SOCK` in `env:`, and only hooks of the granted phase get it. `authenticate` grants a signature, not a connection: the server must also be reachable under the network policy. `phase` accepts a single phase or `[install, runtime]` with shared rules. Commit signing needs git config too (`gpg.format=ssh`, `gpg.ssh.defaultKeyCommand="ssh-add -L"`). |
| `lifecycle@1` | install/startup hooks, staged files | Hook environments are **deny-by-default**. Declare every variable in `env:`, including ones only a child process reads: `curl`, `pip` and `npm` need `HTTP_PROXY`/`HTTPS_PROXY`, and `docker` needs `DOCKER_HOST`. |
| `volume@1` | persistent paths | Declare needed capacity with `size`; omission leaves it unspecified and conflicts with another kit's explicit request. Retained volume settings cannot change on recreation. |
| `host-mount@1` | host-shared caches, datasets, or artifacts | Declare only the absolute, canonical in-container `path` and optional octal `mode`. The runtime owns the host location. Data is shared across sandboxes of the declaring kit, survives sandbox removal, and is visible to the host user. Use an optional group to couple cache setup with the mount. |
| `agent-context@2` | inline instructions the agent reads | v0.50.1 rejects required requests at composition time. Use a supporting host, or `optional: true` only for nonessential guidance. Use `content:` for every body; `contentFile` is rejected. Profile destinations and precedence match @1, but every effective profile contains all selected guidance and the runtime materializes it directly. Kit args and final `kit.env` references expand normally; shell variables remain literal. Do not mix selected @1 and @2 requests. Rebuild every member of a migrated set. The serialized descriptor warns above 64 KiB and fails above 512 KiB after expansion and composition. |
| `agent-context@1` | legacy progressive instructions the agent reads | A workload can supply the legacy workspace-sibling `filename`. An agent workload or mixin supplies `filename` plus an absolute `directory` at its discovery location, which overrides the legacy fallback. Different explicit destinations each get a profile, so agent mixins stack. Tool mixins contribute bodies alone. Use `contentFile:` for a static body, but inline `content:` when the body interpolates an arg, because a staged body is never arg-expanded. |
| `long-running@1` | workloads or service mixins that outlive client sessions | Config-less; a request from any kit applies to the whole sandbox. A background hook or published port does not prevent session auto-stop. Required by default; use `optional: true` only if auto-stop is tolerable. This does not request restart after failure. |
| `git-identity@1` | commits attributed to the runtime-provided user | Config-less; requests only user.name and user.email, not a configuration-source mount. Requires permission; optional when missing identity is tolerable. Signing and authentication are separate grants. |
| `sbx@1` | "launch this as an agent" | Workload-only and config-less, and enforced: a mixin declaring it fails validation. |
| `agent-skill@1` | one bundled skill | `path` names the image directory containing `SKILL.md` and supporting files. The basename is the discovery name unless `config.name` overrides it; the entry-level `name` remains only a display label. |
| `agent-skills@1` | where an agent discovers skills | Declare on the agent workload or agent mixin. The runtime links or otherwise exposes every selected `agent-skill@1` bundle here, and includes host-shared skills when available and enabled. Missing host skills never block startup; `mode` bounds host-store access only. |
| `acp@1` | how to run an ACP agent | Declare on the kit that supplies the launch command, workload or mixin. `agent` is its unversioned provides name; another composed kit may provide it. `command` is a complete non-TTY stdio command, never an argv tail. `env` overlays the session environment; positive `protocolVersion` defaults to 1 and names the protocol major version, not a package release. Use `optional: true` for older hosts. Different configs for one normalized agent conflict. |
| `agent-sessions@1` | the headless verbs a harness drives (run one prompt, continue, resume, list) | Argv tails appended to the launch argv; `prompt` must reference `{{.Prompt}}` and `resume` `{{.SessionID}}`. Most agent kits declare both this and `agent-interactive-sessions@1`; an agent with no interactive mode declares only this. Verify every flag against the tool's real CLI; never invent one. |
| `agent-interactive-sessions@1` | the TUI verbs a human-facing host launches (seeded prompt, continue, resume, session picker, list) | The sibling of `agent-sessions@1` for an agent whose CLI has an interactive mode. **Presence is meaning**: a present key is supported, an absent key is not, and for `continue`, `newSession` and `sessionPicker` `[]` is the launch argv alone (`prompt` and `resume` carry their placeholders, so they are never empty). `newSession` is the exception: omit it when a bare launch opens the TUI, because it then defaults to `lifecycle@1`'s `interactive` launch; if you state both `newSession` and `interactive` they must be the same argv, an explicit `[]` included. `list` is the same command as in `agent-sessions@1`. Declare only verbs you verified. |
| `host-port@1` | one host loopback TCP or UDP service | `host` is required (1-65535); `container` defaults to `host` (also when zero); `transport` is `tcp` (default when empty) or `udp`. `family` selects host loopback: `ipv4` (default), `ipv6`, or `dual` when either reaches the same service; it is part of the grant. The sandbox endpoint stays IPv4 loopback. A mapping conflicts with `port@1` on the same sandbox port and transport. This grants raw access to a host service, not general egress or a published guest port. |
| `dockerd@1` | a Docker Engine (Docker-in-Docker) | Singleton; any kind may declare it. Omit `config` to have the runtime start the engine; `autoStart: false` leaves starting it, waiting for `GET /_ping` to return 200, and the socket's permissions to the kit's own root startup hook, with the same elevation and store (and no wider surface). When kits disagree, the merged entry starts it, so that hook must tolerate an engine already running. Engine settings go in the image's `/etc/docker/daemon.json`. It counts as `privileged@1` plus storage at `/var/lib/docker` on the permission surface, so declaring `privileged@1` beside it is redundant, not refused. By default the runtime starts the `dockerd` on the composed image config's `PATH` before startup hooks and owns `/var/lib/docker`: a `volume@1` or `host-mount@1` at or under it is refused. It does not install the engine; a mixin relying on the workload's keeps `requires: ["deb/docker-ce"]`. Use the `com.docker.sandboxes.start-docker` label only as a transition, beside an optional `dockerd@1`, for runtimes that predate it. |
| `port@1`, `resources@1`, `privileged@1` | inbound ports, limits, elevation | Do not declare on speculation; `privileged@1` is the largest widening available. For an engine inside the sandbox, declare `dockerd@1` instead. |
Declare the least that works: every required capability is a request the user
or host must answer, and `privileged@1`, `host-mount@1`, `host-port@1`,
`ssh-agent@1` with `unrestricted: true`, and `dockerd@1` widen what the kit
can touch. Do not put secret values in a descriptor, arg, or recipe; ask for
the credential with `credential@1` and let the host answer it.
## Volumes and host mounts
Host sharing is a separate grant from `volume@1`, including when the
in-container path stays the same. Do not supply a host path or assume a Linux
bind mount: runtimes may use VM filesystem sharing. Host-shared directories
may have weaker filesystem semantics than private volumes. Concurrent writers
coordinate access themselves. The initial `mode` does not reset existing
directory permissions on later creates. Two host mounts at one path, or a
host mount and a volume there, conflict.
Matching volume requests across kits merge on the cleaned destination;
different sizes, modes, or backing kinds conflict. Sizes compare by byte value
(suffixes use powers of 1024), modes by octal value, and omitted `tmpfs` is
false. Argument-backed sizes and modes remain strings, including byte sizes
such as `1024` and unpadded octal modes such as `755`. An unspecified size or
mode differs from an explicit value. Duplicate destinations within one
declaration block are rejected. When a published set re-exports a volume's
text input, publication keeps the requests separate until create expands and
selects them; matching concrete settings then merge. Do not pin a create-phase
size merely to avoid comparing its placeholder during publication.
**Data lifetime (the inverse of declaring a volume).** Block-volume data
belongs to the sandbox instance, independently of the kits that requested it.
Restart and recreation retain it, including when mixins or the workload
change. Removing a declaration leaves its storage retained and unmounted;
restoring the path reattaches it. Recreation with different settings for a
retained destination refuses before replacing the container. New paths start
empty before hooks; reattachment preserves contents and permissions.
**Removing the instance deletes all its volumes**; creating another with the
same name starts fresh. Tmpfs is empty after stop or recreation. Host mounts
keep their separate sharing contract: their data survives sandbox removal.
## Bundled skills
Use `agent-skill@1` to package a skill as a mixin. Ship the whole directory
under a kit-specific prefix such as `/usr/share/example-skills/review`, and
declare that absolute source path. A source path must be literal after
publishing; use a build-phase argument if it varies. Supporting scripts and
references retain their relative paths. An optional `config.name` overrides
the source basename at discovery destinations; it does not rename or rewrite
the source.
Agent kits declare `agent-skills@1` at their discovery paths. The runtime
links or otherwise exposes every selected `agent-skill@1` bundle at each path,
even when the host store is missing, empty, or disabled. The same declaration
permits host sharing when available, bounded by `mode` and host policy; no
second directory declaration is needed. Runtime assembly of these sources is
implementation-specific. Different source paths claiming one effective name
conflict at composition, and an existing destination entry makes a skill
request unsatisfiable. Without any selected destination, a required skill
request fails; optional requests are skipped and recorded. Registration does
not execute scripts.
## Coupled optional features (groups)
Use a `group` when skipping a capability also needs to skip its hooks, files,
or guidance. Put `optional: true` on the group, never on its members (even
`optional: false` is invalid). Groups are nonempty and cannot nest; required
and one-member groups are valid.
The selection API includes every member or none, before composition. A runtime
supplies decisions on expanded entries; the API owns atomic selection and
ordering. Validate all member configs even in skipped groups. Selected entries
must still satisfy cross-entry rules, and a composition conflict is an error
rather than a reason to skip another group. Singleton arity is per declaration
block; lifecycle lists from selected blocks concatenate, and duplicate file
paths are errors.
Published sets may carry `declarationBlocks` on ordinary items or one-member
group wrappers. Preserve these descriptor-local IDs when reading a published
descriptor. Hand-authored kits normally omit this field.
Selection lasts for one sandbox installation, including restarts. Recreation
selects afresh. A failing selected hook is an execution failure, not optional
unavailability. Skipping a group does not remove old files from reused
volumes, omit image layers, or suppress argument environment exports. Group
names are display labels, not merge keys. Groups extend the unfinished
schema-3 grammar in place: descriptors using them require a reader
implementing this extension, and older strict readers reject them.
## Final environment references
Use `${{ kit.env.HOME }}` in capability configuration strings when a path
depends on the final container environment. Image defaults compose first,
argument `env` exports replace them, and runtime environment overrides win
last. Expansion happens before validation and selection, including inside
groups. Missing names fail; empty values remain empty. This is structural
string substitution, not shell evaluation: `$HOME`, `${HOME}`, and `~/` are
unchanged. Do not use environment references in mapping keys or kit metadata,
and do not pass kit placeholders inside argument or environment values.
Persist the expanded descriptor for restart.
v3-publish-and-sign.md 8.3 KB
# Publishing and signing a v3 kit
Adapted from the `create-kit-v3` skill in docker/sandbox-kit-spec at
`4d932451613f8df89c8468e2bb7c5286882897ca`; publishing and signing have not
been re-run. Local build/conformance and source-load attempts are recorded in
[the authenticated results](../checks/authenticated-results.md). See [sources.md](sources.md)
for provenance and limits. Do not
use `sbx kit push` or `sbx kit sign` for a v3 kit; publishing and signing
here use `docker buildx` and `cosign`.
## Before you push
Publishing writes to a registry and cannot be undone by this skill: tags are
mutable, `latest` moves, and deleting a published tag or digest is
registry-specific and outside the source material. So:
- Get the user's explicit approval for the exact registry, repository, and
tags before any `--push`. Never publish to a shared or production
repository as a trial; use a scratch namespace.
- Verify first, locally: build, `kit-tck validate --layout`, and a real
composition (`references/v3-recipes.md`). Publish only the kit you verified.
- Use credentials already configured for the registry through your normal
Docker login. Never paste tokens into commands, descriptors, or build args.
- Signing is a separate, additive step. State plainly what was signed.
## Publishing is the build
A kit is an OCI artifact and the frontend has already written its
annotations, staged sources and config, so the thing in the registry is the
kit: there is no pack step, no sidecar artifact and no `kit push` subcommand
to look for. Add `--push` to the build that produced the kit you verified:
```sh
docker buildx build --builder kit-builder . -f <kit>.yaml \
--platform linux/amd64,linux/arm64 --provenance=mode=min --push \
-t <registry>/<kit>:<version> -t <registry>/<kit>:latest \
--metadata-file /tmp/<kit>-push.json
kit-tck validate <registry>/<kit>:<version>
```
Validate after pushing: build-time checks cannot see annotations lost by an
exporter or registry. Explicit `--provenance=mode=min` also makes
single-platform index annotation predictable; Buildx's default provenance can
produce an index without kit annotations. Index annotations are an
optimization; consumers fall back to the platform manifest when the index
omits them (§9.3). An OCI layout's outer `index.json` is a catalog, separate
from any image index it references.
The named container builder matters here too. The `docker` driver with the
classic image store can drop manifest annotations during publication,
leaving an image that is no longer a kit.
**Push both platforms in one invocation.** One build writes the index
consumers resolve through; two single-platform builds pushed to the same tag
replace each other, leaving a tag that serves whichever ran last and silently
fails for everyone on the other architecture.
Tag the version and `latest` together. `<version>` is the descriptor's
expanded `version:`, so where a `version` arg drives the install it also
names the tag, and the tag says exactly what the image contains.
## Several kits in one repository
A repository per kit is the simple case; a repository holding a family of
them distinguishes kits *by tag*, which leaves `<kit>:<version>` nowhere to
put the version. Join them and keep the bare name as the moving tag:
```sh
docker buildx build --builder kit-builder . -f <kit>.yaml \
--platform linux/amd64,linux/arm64 --provenance=mode=min --push \
-t <registry>/<kits-repo>:<kit>-<version> \
-t <registry>/<kits-repo>:<kit>
```
Publishing only the bare name leaves consumers no way to ask for a particular
build, or to notice they were moved onto a different one. Reference the
immutable tag from anything that has to keep working. A version-shaped *tag*
is also one of the inputs that answers an unversioned `provides` entry, which
`<kit>-<version>` is not; that is a reason to state `version:` in the
descriptor rather than leaning on how you tagged.
## Signing (optional, orthogonal)
Nothing in the kit grammar requires a signature and no consumer needs
`cosign` to run a kit. A signature is stored as its own object in the
repository rather than as part of the image, so it changes neither the kit's
digest nor its annotations, and a signed kit's `kit-tck` verdict is the one it
already had:
```sh
digest=$(jq -r '."containerimage.digest"' /tmp/<kit>-push.json)
cosign sign --yes <registry>/<kit>@"$digest"
```
**Sign the digest, never the tag.** `--metadata-file` reports the digest the
push actually produced; a tag is mutable, so a signature naming one attests
to whatever it happened to point at.
For a multi-platform build that digest is the **index's**, and signing it
signs the index alone: the per-platform manifests beneath it carry no
signature of their own, so a consumer verifying a platform digest directly
finds nothing. Add `--recursive` to sign each discrete image as well, or say
plainly that only the index is signed and expect verification to name the
index.
In CI, keyless signing avoids managing a key at all: grant the job
`id-token: write` and cosign takes its identity from the OIDC token. The
matching verification names the identity rather than a public key, and for
GitHub Actions that identity is the **workflow**, not the repository:
```sh
cosign verify <registry>/<kit>@"$digest" \
--certificate-identity 'https://github.com/<org>/<repo>/.github/workflows/publish.yml@refs/tags/<tag>' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
```
**Name the whole identity, not a prefix of it.** An identity regexp like
`^https://github\.com/<org>/` accepts a certificate from *any* workflow in
*any* repository in the organization, so any job anywhere in the org with
`id-token: write` can mint something that passes, and verification then
proves only that the signature came from somebody in your org, which is not
the question being asked. The signature is only evidence of provenance when
the identity pins the repository, the workflow file and the ref. Where a tag
varies, keep the rest exact and vary only that part:
```sh
--certificate-identity-regexp '^https://github\.com/<org>/<repo>/\.github/workflows/publish\.yml@refs/tags/'
```
## Tooling notes
- **`docker buildx`**: nothing to install for the frontend; BuildKit pulls
`docker/sandbox-kit:3` from the `# syntax=` line. It was pulled successfully
in the recorded 2026-11-02 run; PR CI also confirmed anonymous manifest
availability and amd64/arm64 entries. This does not test anonymous layer
downloads or establish a pinning policy. Consider pinning the recorded digest.
- **`sbx`**: install the stable CLI from Docker Docs, and see the
`docker/sbx-releases` repository for releases. The source says current
releases support Kits v3 in local and cloud mode and gives no minimum
version. On tested `sbx v0.50.1`, both `kit validate --offline` and
`kit inspect --offline` reject the supplied v3 source mixin with "no kit
builder configured". This is intentional: offline omits the builder.
Normal inspect and validate supply it and require an authenticated daemon.
- **`kit-tck`**: the source installs it with
`go install github.com/docker/sandbox-kit-spec/v3/cmd/kit-tck@latest`.
`@latest` floats, so install a pinned release tag or commit instead and
record it, in the same way you would pin any build tool. A pinned `go install`
may still print `dev` for `kit-tck version`; record `go version -m` on the
installed binary to retain the actual module revision.
- **`cosign`**: only if you sign.
- **Local builds**: recipe-based local source builds use host Docker Buildx
when Docker is available, otherwise the shared builder sandbox. The host
builder needs OCI export support. Select the named builder with
`BUILDX_BUILDER=kit-builder sbx kit inspect ./<kit>`, or use
`SBX_KIT_BUILDER=sandbox` to require the sandbox backend and
`SBX_KIT_BUILDER=host` to require the host backend. `BUILDX_BUILDER` was
exercised in the authenticated run; the `SBX_KIT_BUILDER` overrides were not. Do not infer that a declaration-only mixin
bypasses the daemon requirement: both offline source commands intentionally
omit the builder. Also, v0.50.1 uses Buildx even for declaration-only sources;
the in-process synthesis optimization exists in the inspected checkout,
not that release. Sandbox builder status, history and removal describe
only that backend; removing it does not clear host-builder caches.
v3-recipes.md 12.7 KB
# v3 content recipes
Patterns for the `<kit>.dockerfile` beside a v3 descriptor, and the
invariants an overlay has to satisfy. Adapted from `RECIPES.md` in
docker/sandbox-kit-spec at `4d932451613f8df89c8468e2bb7c5286882897ca`; not
re-run against a live `sbx`. See [sources.md](sources.md) for provenance and
limits. For the surrounding workflow, see
[Build, run, and verify](../SKILL.md#v3-build-run-and-verify).
The base images, URLs, and tool names below are illustrative placeholders. The
`dhi.io/*` base images are the source's choice for carrying the runtime's
platform floor; their public availability is not verified here.
## A workload
A workload's layers are the root filesystem, so its recipe is an ordinary
image build. Build on a base carrying the runtime's platform floor: `bash`,
`sh`, `curl`, `git`, a CA store, and a non-root `agent` user at uid 1000 with
home `/home/agent`. The source names the hardened `dhi.io/sbx-templates:*`
images as providing it. A bare distro base builds fine and fails at agent
launch.
```dockerfile
# syntax=docker/dockerfile:1
ARG BASE_IMAGE=dhi.io/sbx-templates:shell-docker
FROM ${BASE_IMAGE}
ARG TOOL_VERSION
USER root
# Prefer pinning a vendor-published checksum as well; none is shown because it
# is specific to each tool and architecture.
RUN set -eux; \
curl -fsSL "https://example.com/releases/${TOOL_VERSION}/tool-linux-$(dpkg --print-architecture)" \
-o /usr/local/bin/tool; \
chmod 0755 /usr/local/bin/tool; \
# The pin is a claim about content: make the build enforce it.
reported=$(tool --version); \
test "$reported" = "tool ${TOOL_VERSION}"
# The runtime contract lives in the image config, not the descriptor.
ENV IS_SANDBOX=1
USER agent
WORKDIR /home/agent/workspace
# Add launch flags only after verifying them against the tool's real CLI. Do not
# copy a flag that disables the agent's own permission prompts unless you intend
# the agent to run unprompted inside the sandbox.
ENTRYPOINT ["tool"]
```
The version assertion assumes the tool prints exactly `tool VERSION` on
stdout and exits successfully. Adapt that complete literal format to the
real CLI (or use its machine-readable version field); never use a substring
or regex match. A command failure, extra suffix, or different version must
fail the build.
`ENTRYPOINT` plus `CMD` is the headless argv. Use `CMD` only for default
*arguments* to the entrypoint's binary; a `CMD` that repeats the binary
appends a stray argument. An interactive argv tail has no image-config slot
and goes in `lifecycle@1`'s `interactive:` field.
## A mixin overlay
An overlay lands on a filesystem you have never seen. Stage everything under
`/out` in a build stage and copy that into `scratch`:
```dockerfile
# syntax=docker/dockerfile:1
FROM dhi.io/debian-base:trixie-dev AS build
ARG TOOL_VERSION
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates
RUN set -eux; \
mkdir -p /out/usr/local/bin; \
curl -fsSL "https://example.com/releases/${TOOL_VERSION}/tool" -o /out/usr/local/bin/tool; \
chmod 0755 /out/usr/local/bin/tool
# The overlay: lands on any base.
FROM scratch
COPY --from=build /out /
# Static env belongs on the FINAL stage: a build stage's config is discarded.
# A mixin's additive config merges, so this reaches the composed image and the
# agent process; an /etc/profile.d drop would only reach a login shell.
ENV TOOL_HOME=/opt/tool
```
A merged env key other than `PATH` is first-writer-owned: a second kit may
restate the same value, and a different one refuses the composition. Keep
`ENV` to keys the tool owns. A key a base may already set to something else
(`BROWSER`, `TERM`, `LANG`) is what the source's `codex-mixin` and
`cursor-mixin` examples leave to a login profile instead, which applies over
the base's value and reaches only login shells.
Prefer `/usr/local` and `/opt`, and **avoid the agent's home entirely** where
you can: whatever is at `/home/agent` on the composed base may be a mounted
volume, and staging there is how the ownership traps below get hit.
Where the install cannot be relocated (an installer with no prefix option, a
language toolchain that bakes absolute paths), run the unmodified install on
the workload's own base as the build stage, then copy the specific resulting
paths out. Say in a comment why that shape was chosen. **Not apt packages**:
copying selected paths out of one leaves its dpkg state and shared-library
closure behind, so the copy-out shape produces a broken overlay rather than a
portable one.
Some things genuinely cannot travel in an overlay, and the honest move is to
document the limitation rather than fake it: apt packages (they need the
composed base's dpkg database and their shared-library closure), and anything
that must *merge* into a file the base also writes, since a layer replaces a
file rather than merging it.
**A virtualenv travels only if its interpreter travels with it.** A venv keeps
packages in `lib/python3.<minor>` and points `bin/python` at an absolute
interpreter path. Point it at the build base's `/usr/bin/python3` and the
copied tree resolves the *composed* base's python instead, looks for
site-packages under that base's minor version, and fails with
`ModuleNotFoundError` after the launcher has started, so the kit reports
success at create and breaks at use. Two ways out:
- **Bundle the interpreter.** `uv tool install --managed-python --python 3.14`
downloads a standalone CPython into `~/.local/share/uv`, which the overlay
copies, so `bin/python` resolves inside the tree it ships with. Verify by
composing onto a base with **no python at all** and running the tool.
- **Leave it a create-time hook.** Where the venv must use the base's own
python (because an apt hook installs that python in the first place), the
install belongs at create, and the overlay carries only what is portable
(an `ENV` and a wrapper script, say).
The failure is invisible when the build base and the test base happen to
share a minor version, so check `readlink -f <venv>/bin/python`: a path under
the overlay's own tree is self-contained, `/usr/bin/python3` is not.
## Ownership
**An overlay's directory entries override the base's**, so an overlay states
ownership for every level it ships, and both directions are bugs:
- `/home` owned by uid 1000 hands the agent a directory it should not own.
- `/home/agent` owned by root takes `$HOME` from the agent user, and the
entrypoint runs as that user, so its own `chown` would be a no-op.
Three ways to get this wrong, all seen in practice per the source:
```dockerfile
COPY --chown=1000:1000 x /home/agent/x # BuildKit chowns every parent it creates → /home is 1000
RUN chown -R 1000:1000 /out # same result, via the staging root
RUN chown -R 1000:1000 /out/home/agent/x # one level too deep → /home/agent stays root
```
The idiom that gets both right starts the chown exactly at the agent's home:
```dockerfile
USER root
RUN mkdir -p /out/home/agent \
&& cp -a /home/agent/.local /out/home/agent/.local \
&& chown -R 1000:1000 /out/home/agent
```
Numeric ids, because `scratch` carries no `/etc/passwd` for a name to resolve
against.
**Foreign owners ride along in package trees.** npm and PyPI tarballs and
vendor release archives preserve whatever uid the publisher's machine had,
and `cp -a` or `tar -x` carries it in. Real examples are `501:20` (a macOS
developer), `1001:1001` and `2000:2000` (CI runners). Harmless in a build
stage; as image content on an unknown base those ids may be real accounts,
and a file's owner can rewrite it whatever its mode says. Normalize a copied
package tree with `chown -R 0:0`, which is what a root-run install leaves
anyway: the agent needs write access to a *prefix directory* to add packages,
not to the tool's own tree.
## Verifying an overlay
A build proves the recipe ran. It does not prove the overlay works.
Select the named `kit-builder` container builder created in
[Build, run, and verify](../SKILL.md#v3-build-run-and-verify).
**Judge the exported layout with `kit-tck`:**
```sh
docker buildx build --builder kit-builder . -f <kit>.yaml -t <kit>:<version> \
--output type=oci,dest=/tmp/layout,tar=false
kit-tck validate --layout /tmp/layout <version>
```
`kit-tck` judges the two directory levels on every platform manifest:
`overlay-home-ownership` fails an overlay that ships `/home` owned by anyone
but root or `/home/agent` by anyone but uid 1000 (`/home` handed to the
agent, or `/home/agent` taken from it). An overlay shipping neither directory
passes, because it is staying out of the home entirely. The same run warns
under `overlay-links-resolve` for every symlink the overlay's own layers do
not resolve; see the composition shortcut below for why that is a warning.
What it does not judge is **every other owner**. Use the bundled audit,
resolving `SKILL_DIR` to this installed skill's directory (Python 3.11+):
```sh
python3 "$SKILL_DIR/scripts/audit-layer-owners.py" /tmp/layout <version>
```
The audit follows the selected tag through OCI indexes/manifests and reads
only referenced filesystem layers, not arbitrary config/manifest JSON blobs.
It checks blob digests, lists numeric uid/gid pairs without extracting files,
and fails on missing, corrupt, unreadable or unsupported-compression layers.
It emits counts only after every selected layer has been read successfully.
Uncompressed and gzip layers are supported; re-export with gzip if the audit
rejects zstd or another compression format. Buildx attestation manifests are
explicitly excluded by their `vnd.docker.reference.type` annotation.
Every count should be `0/0` or `1000/1000`; other owners produce a nonzero
exit status. This is an owner inventory, not a merged-filesystem proof.
Directory-level ownership and symlink semantics remain `kit-tck`'s job.
**Compose it for real and run the tool.** The assembler is the only thing
that performs an actual composition, so it is the check that counts:
```sh
sbx run ./<workload> --kit ./<kit> --detach --name t .
sbx exec t tool --version
```
`sbx exec` is the verb that runs a command. Arguments after `--` on `sbx run`
are **agent** arguments appended to the agent's start command, so
`sbx run … -- tool --version` starts the workload's agent with
`tool --version` tacked on and never executes the overlay's binary at all.
That merges the additive image config (the `ENV` and `PATH` the overlay sets
on its final stage) and puts the overlay on a base that carries the platform
floor, which is what the kit is entitled to assume. The test sandbox `t` is
yours to clean up afterwards: removal is destructive, so confirm first and use
`docker-sandboxes-lifecycle` for the exact `sbx rm` form.
There is a faster filesystem-only shortcut, but know what it does **not** do
before trusting it:
```sh
docker buildx build --builder kit-builder . -f <kit>.yaml -t <kit>-test:local --load
printf 'FROM <the workload base>\nCOPY --from=<kit>-test:local / /\n' \
| docker build -t compose-test -
docker run --rm --user 1000:1000 compose-test sh -lc 'tool --version'
```
`COPY --from` transfers the overlay's **files and nothing else**: its image
config is discarded, so the `ENV` and `PATH` entries the assembler would have
merged are simply absent. A correct mixin whose tool depends on either will
fail here, and that failure is an artifact of the shortcut rather than a
defect in the kit. Export those variables by hand if you use it. Use the
*workload's* base rather than a stock `ubuntu:24.04` for the same class of
reason: a bare distro image lacks parts of the platform floor, so a kit that
legitimately relies on `git` or the `agent` user fails for reasons the real
composition would not produce.
The Dockerfile arrives on **stdin** so the build context stays empty;
pointing it at `/tmp` uploads whatever else is sitting there, including the
layout you just exported, to build two lines. And `sh -lc` sources any
`/etc/profile.d` drop the overlay ships, which a bare `sh -c` does not. The
`-test:local` image and `compose-test` image are local build artifacts you
created; removing them is destructive, so confirm before you do
(`docker-destructive-guardrails`).
What the shortcut is genuinely good for is **dangling symlinks** against a
real base. Installers routinely relocate a launcher without its payload (a
`--prefix` or `INSTALL_DIR` option moves the symlink while the real tree
stays in `$TOOL_HOME` or a `downloads/` directory), and a build-stage
`test -x` on the launcher passes because the payload is still sitting behind
it *in that stage*. The overlay then ships a link to nothing. `kit-tck`'s
`overlay-links-resolve` warns about every link the overlay cannot resolve by
itself, but only warns: from the artifact alone, a link into the base looks
the same as one into a vanished build stage. The composition tells the two
apart. Gate on the resolved binary, and confirm with the real composition
above.
audit-layer-owners.py 3.5 KB
#!/usr/bin/env python3
"""Inventory numeric owners in a tagged OCI layout without extracting files."""
import argparse
from collections import Counter
import hashlib
import json
from pathlib import Path
import re
import sys
import tarfile
INDEX = "application/vnd.oci.image.index.v1+json"
MANIFEST = "application/vnd.oci.image.manifest.v1+json"
LAYER = "application/vnd.oci.image.layer.v1.tar"
def audit(layout: Path, tag: str) -> Counter:
counts = Counter()
seen = set()
layer_count = 0
def blob(descriptor):
digest = descriptor["digest"]
if not re.fullmatch(r"sha256:[0-9a-f]{64}", digest):
raise ValueError(f"unsupported blob digest: {digest!r}")
path = layout / "blobs" / "sha256" / digest.split(":")[1]
with path.open("rb") as stream:
if hashlib.file_digest(stream, "sha256").hexdigest() != digest.split(":")[1]:
raise ValueError(f"blob digest mismatch: {digest}")
return path
def visit(descriptor):
nonlocal layer_count
if descriptor.get("annotations", {}).get("vnd.docker.reference.type") == "attestation-manifest":
return
digest = descriptor["digest"]
media = descriptor["mediaType"]
key = (digest, media)
if key in seen:
return
seen.add(key)
path = blob(descriptor)
if media in (INDEX, MANIFEST):
document = json.loads(path.read_text())
children = document["manifests" if media == INDEX else "layers"]
if not children:
raise ValueError(f"empty {media}: {digest}")
for child in children:
visit(child)
elif media in (LAYER, LAYER + "+gzip"):
try:
with tarfile.open(path, mode="r:gz" if media.endswith("+gzip") else "r:") as archive:
for member in archive:
if member.isfile():
with archive.extractfile(member) as content:
while content.read(1024 * 1024):
pass
counts[(member.uid, member.gid)] += 1
except (OSError, EOFError, tarfile.TarError) as exc:
raise ValueError(f"cannot read layer {digest}: {exc}") from exc
layer_count += 1
else:
raise ValueError(f"unsupported media type {media!r} in {digest}")
index = json.loads((layout / "index.json").read_text())
matches = [d for d in index["manifests"]
if d.get("annotations", {}).get("org.opencontainers.image.ref.name") == tag]
if len(matches) != 1:
raise ValueError(f"expected exactly one descriptor for tag {tag!r}, found {len(matches)}")
visit(matches[0])
if not layer_count:
raise ValueError("no filesystem layers audited")
return counts
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("layout", type=Path)
parser.add_argument("tag")
args = parser.parse_args()
try:
counts = audit(args.layout, args.tag)
except (OSError, ValueError, KeyError, TypeError, EOFError, tarfile.TarError) as exc:
print(f"ownership audit failed: {exc}", file=sys.stderr)
return 1
for (uid, gid), count in sorted(counts.items()):
print(f"{count:8d} {uid}/{gid}")
if any(owner not in {(0, 0), (1000, 1000)} for owner in counts):
print("ownership audit failed: unexpected numeric owner", file=sys.stderr)
return 1
return 0
if __name__ == "__main__":
sys.exit(main())
License (Apache-2.0)
View full license text
Licensed under the Apache License, Version 2.0. See https://github.com/docker/skills/blob/main/LICENSE