# Sandbox check

> Sandbox check is an open-source agent skill for security. Probes what your coding agent can reach: secrets, Docker, sudo and trust files. It is available on Claude Code, Codex, Cursor and Gemini CLI.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI
- **Website:** https://github.com/RyanAlberts/best-of-Agent-Harnesses/tree/main/skills/sandbox-check
- **Repository:** https://github.com/ryanalberts/best-of-agent-harnesses
- **GitHub stars:** 1,663
- **License:** MIT
- **Skill name:** sandbox-check
- **Collection:** https://github.com/RyanAlberts/best-of-Agent-Harnesses
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill audits the sandbox a coding agent runs in by probing from inside a live session. It checks whether secret files can be opened, which secret-like environment variables are visible, and whether files that git, the shell, the editor or the harness later run can be written. It also tests access to the Docker socket, the SSH agent and passwordless sudo, and reports what the sandbox blocks.

The probe is a standard-library Python script that runs once through the agent's own shell tool. It opens secret files without reading them, appends to existing files and closes them unchanged, and creates and deletes one empty test file per folder. Results are grouped by risk level, compared with the sandbox keys found in harness settings, and followed by fixes. Network checks run only when a flag is passed.

It expects macOS or Linux with Python 3.9 or newer. Python 3.11 or newer is needed to compare Codex settings. Nothing else needs to be installed.

## When your agent uses it

> Sandbox audit that probes, from inside a live coding-agent session, what the agent can really reach: secret files it can open, secret-like environment variables, files that git, the shell, the editor, or the harness later run (git hooks, shell startup files, harness settings), writes outside the project, the Docker socket, the SSH agent, and passwordless sudo. Use when the user asks what the agent can access or write on this machine, whether the sandbox actually works, how big the blast radius is if the agent gets prompt-injected, whether SSH keys, cloud credentials, or .env files are exposed, or whether it could escape through Docker or sudo. Runs locally and edits no existing file: it creates and deletes one empty test file per folder it checks, and only the optional --network flag makes DNS lookups and TCP connections.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/RyanAlberts/best-of-Agent-Harnesses/tree/HEAD/skills/sandbox-check)
- [Network calls found in its scripts](https://github.com/RyanAlberts/best-of-Agent-Harnesses/tree/HEAD/skills/sandbox-check)
- [License: MIT](https://github.com/RyanAlberts/best-of-Agent-Harnesses/tree/HEAD/skills/sandbox-check)

## Features

- **Secret file exposure check:** Tests whether SSH keys, cloud credentials, package tokens and .env files can be opened from the agent's shell.
- **Trust handoff detection:** Finds writable git hooks, shell startup files, editor tasks and harness settings that other programs later run.
- **Privilege and container escape tests:** Checks Docker and Podman socket access, the SSH agent, passwordless sudo and whether the shell runs as root.
- **Harness settings comparison:** Reads sandbox keys from Claude Code, Codex and Gemini CLI settings and flags gaps with what the probe found.
- **Risk-ranked report:** Presents open and blocked checks by Critical, High, Medium and Info levels with a one-line headline.
- **Optional network probe:** Adds DNS lookups and empty TCP connections to a few hosts, including the cloud metadata address, only when requested.

## Good for

- Check whether my agent can read SSH keys or cloud credentials on this machine
- See how much damage a prompt-injected agent could do in this project
- Confirm that the sandbox actually blocks writes to shell startup files
- Find out whether the agent could escape through Docker or passwordless sudo
- Review which .env files and tokens are exposed before an unattended run

## Install

### Claude Code

This skill ships in the `harness-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add RyanAlberts/best-of-Agent-Harnesses
/plugin install harness-skills@agent-harnesses
```

Or copy only this skill to `~/.claude/skills/sandbox-check`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/RyanAlberts/best-of-Agent-Harnesses.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sandbox-check &&
cp -R "$tmp/skills/sandbox-check" ~/.claude/skills/sandbox-check &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sandbox-check` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sandbox-check` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/RyanAlberts/best-of-Agent-Harnesses.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sandbox-check &&
cp -R "$tmp/skills/sandbox-check" ~/.agents/skills/sandbox-check &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sandbox-check` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sandbox-check` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/RyanAlberts/best-of-Agent-Harnesses.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sandbox-check &&
cp -R "$tmp/skills/sandbox-check" ~/.cursor/skills/sandbox-check &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sandbox-check` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/RyanAlberts/best-of-Agent-Harnesses.git --path skills/sandbox-check
```

Or copy the folder to `~/.gemini/skills/sandbox-check` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sandbox-check`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/RyanAlberts/best-of-Agent-Harnesses.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sandbox-check &&
cp -R "$tmp/skills/sandbox-check" ~/.copilot/skills/sandbox-check &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sandbox-check` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/RyanAlberts/best-of-Agent-Harnesses.git
```

Then copy `best-of-Agent-Harnesses/skills/sandbox-check` into your agent's skills folder as `sandbox-check`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the probe change on my machine?

It creates and deletes one empty test file per folder it checks and does not edit any existing file. Existing files are opened for append and closed without changes, so their contents and modified times stay the same.

### Does Sandbox check read my secrets?

No. Secret files are opened and closed without reading a byte, and environment variables are reported by name and length only. Harness settings files are parsed only for their sandbox keys.

### Does Sandbox check send anything over the network?

Not by default. Only the optional --network flag makes DNS lookups and TCP connections to github.com, pypi.org and the cloud metadata address, and it sends no data.

### Which agents does Sandbox check support?

It is built for Claude Code, Codex, Gemini CLI and Cursor, and it also runs in a plain shell or container. Harness detection comes from the variables each harness sets in its shell.

### Can Sandbox check run on a work machine without issues?

Endpoint security and audit tools may log the sudo attempt, the test file in the login-items folder and the write-opens of startup files, so the skill asks for approval before the first run.

### How do I install Sandbox check in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sandbox-check to use it in all your projects, or to .claude/skills/sandbox-check in one project. Or install the harness-skills plugin, which includes it: /plugin marketplace add RyanAlberts/best-of-Agent-Harnesses, then /plugin install harness-skills@agent-harnesses.

### Does Sandbox check run scripts?

Yes. It runs Python scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sandbox check?

Claude Code, Codex, Cursor and Gemini CLI. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sandbox check?

The closest alternatives to Sandbox check are Security audit, Sandbox provision discipline, Guardrail tester, Security review and Source code scanning.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Security audit](https://ai-powered.com/skills/security-audit): Security audit is an open-source agent skill for security.
- [Sandbox provision discipline](https://ai-powered.com/skills/sandbox-provision-discipline): Sandbox provision discipline is an open-source agent skill for security.
- [Guardrail tester](https://ai-powered.com/skills/guardrail-tester): Guardrail tester is an open-source agent skill for security.
- [Security review](https://ai-powered.com/skills/security-review-nabwinsaud): Security review is an open-source agent skill for security.
- [Source code scanning](https://ai-powered.com/skills/source-code-scanning): Source code scanning is an open-source agent skill for security.
- [Security](https://ai-powered.com/skills/security-xiaolai): Security is an open-source agent skill for security.
- [Vibe pre commit audit](https://ai-powered.com/skills/vibe-pre-commit-audit): Vibe pre commit audit is an open-source agent skill for security.
- [Skill scanner](https://ai-powered.com/skills/skill-scanner): Skill scanner is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/sandbox-check
