Skip to content

sandboxes: clarify --kit scope, private images, and aws credentials#24958

Merged
dvdksn merged 10 commits intodocker:mainfrom
dvdksn:sbx-user-feedback
May 6, 2026
Merged

sandboxes: clarify --kit scope, private images, and aws credentials#24958
dvdksn merged 10 commits intodocker:mainfrom
dvdksn:sbx-user-feedback

Conversation

@dvdksn
Copy link
Copy Markdown
Contributor

@dvdksn dvdksn commented May 5, 2026

Summary

Seven small docs fixes prompted by questions/conversations in slack and
recurring confusion in docker/sbx-releases issues:

  • Surface that --kit only takes effect on sandbox creation at the first
    sbx run --kit example in customize/kits.md, with a pointer to
    sbx kit add for running sandboxes.
  • Document the current private-image limitation: sbx reuses the user's
    sbx login session to pull private images from Docker Hub but falls
    back to anonymous for other registries. Add IMPORTANT callouts on
    customize/templates.md and the OCI section of customize/kits.md.
    Also document the docker image save -> sbx template load workaround
    for locally-built images and private images on registries sbx can't
    authenticate against (closes Support local image templates and authenticated pulls from private registries in sbx sbx-releases#29).
  • Fix the AWS row in security/credentials.md: drop
    AWS_SECRET_ACCESS_KEY because the source only reads
    AWS_ACCESS_KEY_ID.
  • Revert 8a652d0 to restore the docker/sbx-kits-contrib references
    in build-an-agent.md, kit-examples.md, and the kits Git-source
    example, now that the contrib repo is public.
  • Add an FAQ recipe for opting out of YOLO mode via a custom agent kit
    that drops the permission-skipping flag — survives sandbox recreation
    and works regardless of agent (closes opt out of yolo mode default sbx-releases#47).
  • Explain templates and kits side by side on the customize landing
    page.
  • Refactor the credentials story across customize/kits.md and
    security/credentials.md (closes Confusion points from first-time user sbx-releases#103):
    • Slim the kits "Authenticate to external services" section to a
      capability-tour entry — show the four-block YAML and one runtime
      paragraph, then cross-link out for depth.
    • Add a new "How credential injection works" section to the
      credentials page that names the three host-side mechanisms
      (service-based, custom by target domain + env var, host shell
      fallback) and links to each.
    • Document the kit-declared service identifier path
      ("Services declared by kits") — confirmed end-to-end with a live
      trial that sbx secret set -g <kit-service> flows through to the
      proxy.
    • Tighten the "Custom secrets" framing — it's specifically for
      cases where the service-identifier model doesn't fit
      (format-validating SDKs, request-body secrets), not the catch-all
      for anything kits can't do. Document sbx secret set-custom with
      the EXPERIMENTAL caveat.

Generated by Claude Code

The mixin example uses `sbx run --kit` first. The note that --kit only
applies on create lives further down, so users were trying to apply
mixins to existing sandboxes and bouncing off the CLI error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 75c1694
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/69f9fc6371c94c0008da6661
😎 Deploy Preview https://deploy-preview-24958--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dvdksn dvdksn added the status/review Pull requests that are ready for review label May 5, 2026
@dvdksn dvdksn requested a review from a team May 5, 2026 07:27
@dvdksn dvdksn force-pushed the sbx-user-feedback branch from 5afb74c to 11fd29b Compare May 5, 2026 07:36
dvdksn and others added 4 commits May 5, 2026 09:53
The image-pull credential resolver authenticates with the user's
sbx login session for Docker Hub references and falls back to
anonymous for everything else. So private templates and kits on
ghcr.io, ECR, Nexus, and similar fail to pull silently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ices

The aws credential source in the sandbox kit specs only reads
AWS_ACCESS_KEY_ID; AWS_SECRET_ACCESS_KEY is not recognized today.
Listing it in the table misled users who tried to authenticate
Bedrock with key/secret pairs or STS tokens and silently got only
the access key id.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per-session /permissions only works for Claude Code and resets every
session. Document the agent-kit override pattern so users who want
approval prompts as the default have a recipe that survives sandbox
recreation and works regardless of agent.

Closes docker/sbx-releases#47.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
First-time users repeatedly bounce off one question: what's the
relationship between templates and kits, and when do I use which?
The existing "When to use which" table on the customize landing page
gives goal-to-option mapping but doesn't define each, name the
connection point (a kit's agent.image is a template), or say that
they compose.

Add a "Templates and kits, side by side" section that does. Refs
docker/sbx-releases#103 (the templates-vs-kits part).

The same issue calls out confusion about how kit credentials wire to
sbx secret set vs host env vars vs sbx secret set-custom. That's a
broader rewrite of the kits credentials section and is being deferred
to a separate change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dvdksn dvdksn force-pushed the sbx-user-feedback branch from b067b37 to 52961cf Compare May 5, 2026 08:25
…-custom

The kits page split authenticated-service wiring across two
adjacent subsections — "Control network access" carried the
serviceDomains/serviceAuth example, and "Declare credential sources"
carried the credentials.sources example — but the two only make
sense together. New kit authors couldn't tell which block tied
which (the service identifier is the join key) or where the value
actually comes from. The wider question — does sbx secret set work
for custom kit services? — has no answer in the docs today.

Restructure:

- Strip "Control network access" down to allowedDomains, the only
  block that's independent of credentials. Cross-link to the new
  authentication section.
- Replace "Declare credential sources" with a new
  "Authenticate to external services" section that shows the full
  three-block chain in one example, walks through what the proxy
  does at request time, and spells out resolution order: stored
  secret keyed on the service identifier first, host env var
  fallback. Confirmed end-to-end against sbx v0.28.3 with a custom
  kit (kit-named keychain entries do flow through to the proxy).
- Add a "Custom secrets" section to security/credentials.md
  documenting sbx secret set-custom with the EXPERIMENTAL caveat,
  so the kits page has a real cross-reference target. The
  build-an-agent tutorial already uses set-custom but the
  credentials page didn't acknowledge it existed.

Closes docker/sbx-releases#103.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dvdksn dvdksn force-pushed the sbx-user-feedback branch 6 times, most recently from 1b8853d to adc4fd3 Compare May 5, 2026 09:22
The "Authenticate to external services" section in customize/kits.md
had grown into a deep treatise inside what's otherwise a tour of kit
capabilities. Most of the conceptual model belongs on the credentials
page, not in a capability tour. The credentials page in turn was
implicitly framed around built-in agents only — kit-declared service
identifiers (which work end-to-end with sbx secret set) weren't
acknowledged anywhere.

Restructure:

- customize/kits.md: cut "Authenticate to external services" to a
  show-then-link entry. Four-block YAML with brief inline comments,
  one paragraph on runtime behavior, two cross-links to the
  credentials page. The conceptual depth lives there now.
- security/credentials.md:
  * Add a "How credential injection works" section after the intro
    that names the three host-side mechanisms (service-based,
    custom by host+env, host shell env) and links to each.
  * Rename the "Supported services" subsection to "Built-in services"
    and add a sibling "Services declared by kits" subsection
    documenting the kit-declared identifier path for the first time.
  * Tighten the "Custom secrets" framing — it's no longer
    positioned as the catch-all for things kits can't do; it's
    specifically for cases where the service-identifier model
    doesn't fit (format-validating SDKs, request-body secrets).
- Update the FAQ cross-link to credentials#built-in-services.

Net effect: each page does one job. Kit authors get a tour entry
that points to the canonical model; credential consumers get a
single page that covers all three mechanisms with the missing
kit-declared services pattern documented.

Closes docker/sbx-releases#103.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dvdksn dvdksn force-pushed the sbx-user-feedback branch from adc4fd3 to 830edad Compare May 5, 2026 09:24
@dvdksn
Copy link
Copy Markdown
Contributor Author

dvdksn commented May 5, 2026

/review

Copy link
Copy Markdown
Contributor

@docker-agent docker-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

Note: Verification was inconclusive (verifier returned no verdicts). The following findings from the drafter are surfaced unverified for author review.

1 HIGH and 4 MEDIUM findings across 2 files.

Comment thread content/manuals/ai/sandboxes/security/credentials.md
Comment thread content/manuals/ai/sandboxes/customize/_index.md Outdated
Comment thread content/manuals/ai/sandboxes/customize/_index.md Outdated
Comment thread content/manuals/ai/sandboxes/security/credentials.md Outdated
Comment thread content/manuals/ai/sandboxes/security/credentials.md
dvdksn and others added 2 commits May 5, 2026 16:16
- Drop bold on "template" / "kit" definitions and replace the ambiguous
  "The two compose." opener.
- Reformat the credential-injection bullet list to plain prose instead of
  the marketing-style `**Term.** Description` pattern.
- Add a warning callout on `sbx secret set-custom --value <secret>` about
  shell history and process visibility.
- Replace "subcommand" and "env var" with full forms to clear Vale.Spelling
  errors in the CI run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Vale.Spelling flags bare "repo" in prose. The Docker style guide also
prefers the full word per Docker.RecommendedWords.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dvdksn dvdksn merged commit 1414b91 into docker:main May 6, 2026
13 checks passed
@dvdksn dvdksn deleted the sbx-user-feedback branch May 6, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/review Pull requests that are ready for review

Projects

None yet

2 participants