Sign inSign up
github-cli logo

sbx/github-cli

Verified Publisher

By Docker, Inc

•Updated 1 day ago

GitHub CLI overlay with scoped GitHub access and proxy-managed authentication.

Sandbox Kit
0

1.7K

sbx/github-cli repository overview

Digest

sha256:eb3798d4992e…

Size

13.2 MB

Schema

v3

Pushed

1 day ago

Specificationspec.yaml

MIXIN

GitHub CLI overlay with scoped GitHub access and proxy-managed authentication.


Arguments
NameRequiredDefaultDescription
versionRequired—

GitHub CLI release carried by the overlay



CapabilitiesExpand a row to see its full configuration. See the full spec for the complete descriptor.
TypeRequiredDescription
com.docker.sandbox/network-policy@2Required—
com.docker.sandbox/credential@1OptionalGitHub API access for gh
com.docker.sandbox/agent-context@1Optional—
com.docker.sandbox/agent-context@2Optional—

Apply this mixin to a sandbox

sbx run <agent> --kit sbx/github-cli:latest

Make sure you have docker sbx installed

Run the following command to install sbx on your machine.

macOS
brew install docker/tap/sbx
Windows
winget install Docker.sbx
Learn more about docker sbx⁠

⁠GitHub CLI for Docker Sandboxes

This mixin Kit adds the GitHub CLI⁠ executable gh to a compatible workload. It keeps the workload’s launch command and works with native agents without a Node runtime.

This Kit is built on Docker Hardened Images.

⁠Use

Add --kit sbx/github-cli:latest when creating a sandbox with a workload such as Shell⁠. Inside the sandbox, run gh --version, gh pr list, gh issue list, or gh api.

The Kit is named github-cli; the installed command remains gh, at /usr/local/bin/gh. Git commands use the workload’s Git installation.

⁠Authentication and access

Bind your GitHub credential on the host through Docker Sandboxes. With a binding, GH_TOKEN inside the sandbox is a proxy-managed sentinel. The proxy injects the real token for github.com, api.github.com, and uploads.github.com. Do not print or copy the token, and do not run gh auth login. The Kit never puts a real credential in its image layers. Without a host credential, authenticated GitHub operations remain unavailable.

Runtime access covers GitHub repository paths, the API methods used by gh, and upload requests. DELETE requests under api.github.com/repos/** are explicitly denied, including repository deletion. This is a scoped grant, not permission to reach arbitrary release-asset hosts or GitHub Enterprise servers; configure additional destinations separately when needed.

⁠References

See the Sandbox Kit v3 specification⁠, GitHub CLI documentation⁠, Docker Sandboxes documentation⁠, and Docker Hardened Images documentation⁠.