Repository navigation
docker-sbx: sbx's own secrets, per sandbox, and teardown - #38
Merged
Merged
Conversation
czpython
force-pushed
the
dru-460-docker-sbx-secrets
branch
from
September 6, 2026 15:29
1c1b268 to
082831d
Compare
czpython
force-pushed
the
dru-454-github-through-the-proxy
branch
2 times, most recently
from
September 7, 2026 05:25
4a1a0a7 to
762ecae
Compare
Docker Sandboxes keeps a per-sandbox secret after the sandbox is removed, so a host that goes must take its secrets with it. Host deletion now calls delete_secrets for the box before the VM goes. A provider failure there keeps the row for a retry, like a VM failure does. The seam gets the box alone. Teardown never reads the host row, so a row whose secrets no longer decrypt still goes. On docker-sbx, delete_secrets removes the github secret by service name and every custom secret by the placeholder sbx lists for it, since the CLI has no JSON and no way to clear a scope. Removal can run again after a partial teardown: sbx answers a missing secret with success. The value files go with the secrets. sbx's own github secret now applies only to the catalog's github service. A custom entry named github with a host of its own is a custom secret on that host, so the value reaches that host and never public GitHub. The deploy doc says which sbx secret each service is, that deletion removes the sandbox's scope, and that no global sbx secret may name a destination drukbox manages, since sbx applies the global one first.
czpython
force-pushed
the
dru-460-docker-sbx-secrets
branch
from
September 7, 2026 05:27
082831d to
c51e946
Compare
czpython
changed the base branch from
dru-454-github-through-the-proxy
to
main
September 7, 2026 05:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The docker-sbx side of the seam, finished on the bed, with teardown.
delete_secretsfor the box before the VM goes. Docker Sandboxes keeps a per-sandbox secret after the sandbox is removed, so nothing else would remove it. A provider failure there keeps the row for a retry, like a VM failure does.delete_secretsremoves thegithubsecret by service name and every custom secret by the placeholder sbx lists for it, then the value files. Removal can run again after a partial teardown: sbx answers a missing secret with success.githubsecret applies only to the catalog's github service. A custom entry namedgithubwith a host of its own is a custom secret on that host.Where this differs from the ticket
delete_secrets(vm), not one secret by its placeholder. The host row keeps only a fingerprint of the placeholder, by design, so teardown cannot replay it. sbx lists the placeholders of a sandbox's custom secrets, so the sbx implementation reads them there.sbx secret lshas no JSON andsbx secret rmwithout a name prompts, so the table is parsed, with a test on a captured listing.githubsecret and the custom secrets both read their value through--command cat <file>, as the seam PR set up, sincesbx secret sethas no stdin path.Names
New names, open to change:
delete_secretson the seam,SbxCLI.custom_placeholders.Gates
uv run ruff check,uv run ruff format --check,uv run pyright, anduv run pytestare green.Acceptance
docker-sbx on the KVM bed, with a host that carries a github secret and an anthropic secret:
claude -panswered through sbx's swap.gh api,gh pr list, a clone, a push, and a branch deletion worked against a private repository.DELETE /hosts, the sandbox scope listed no secret, and no value file and no workspace remained.15 of 15 checks passed on this commit. An earlier run, before the review changes, failed one check of the kit's own: it looked for the phrase
No secrets foundin the unscoped listing while the sandbox still existed, and that listing shows every scope. The check now reads the scope column.Review
The adversarial review reported two findings. Both are applied:
githubwith a host of its own went to sbx's native github secret, and its host was ignored. Native applies only to the catalog's github service now. This defect was on the base branch too.