agentleFS
forefyforefy/.context/skills/hunter-utils/sandboxed-audit-runner/SKILL.md

sandboxed-audit-runner

Skill153 starsChanged 45 days agoMITView on GitHub

Wrap the session in the Anthropic Sandbox Runtime before touching untrusted code. Use before running any audit skill on a codebase you do not trust.

  • Reads credentials
  • Installs packages

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read $SKILL_DIR/references/smart-contract.srt.md, extract the JSON block, and write it to .srt-audit.json in the project root.

    line 29
  2. Very specific:

    All commands run inside that shell - including any invoked audit skill - are now sandboxed at the OS level.

    line 37
  3. Distinctive:

    Test fixtures or build scripts with embedded exfiltration logic

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sandboxed Audit Runner

Before running any audit on untrusted code, this skill configures and launches srt to wrap the entire agent session. The goal is to protect the host from prompt injection attacks embedded in the codebase under review - malicious comments, filenames, or configs designed to make the auditing agent exfiltrate SSH keys, tokens, or make unauthorized network calls.

SKILL DIRECTORY DETECTION:

SKILL_DIR=$([ -d "$HOME/.context/skills/sandboxed-audit-runner" ] && echo "$HOME/.context/skills/sandboxed-audit-runner" || echo ".context/skills/sandboxed-audit-runner")

Prerequisites

npm install -g @anthropic-ai/sandbox-runtime
srt --version

On Linux, also install bubblewrap: apt install bubblewrap.

Setup

1. Create the audit session config

Read $SKILL_DIR/references/smart-contract.srt.md, extract the JSON block, and write it to .srt-audit.json in the project root. Remove any allowedDomains entries the audit does not need.

2. Start the sandboxed session

srt --settings .srt-audit.json bash

All commands run inside that shell - including any invoked audit skill - are now sandboxed at the OS level. On macOS this uses sandbox-exec; on Linux it uses bubblewrap.

3. Invoke the audit skill normally

With the sandbox active, invoke the audit skill as usual:

run smart-contract-audit

The entire agent conversation and all tool calls it makes will execute under the srt restrictions for the duration of the session.

4. Verify the sandbox is active (optional)

cat ~/.ssh/id_rsa      # should be blocked
curl https://example.com  # should be blocked if not in allowedDomains

5. Clean up

exit
rm .srt-audit.json

Why this matters

Audited code can contain:

  • Comments or string literals with prompt injection payloads targeting the AI
  • package.json postinstall scripts that probe ~/.aws or ~/.ssh
  • Test fixtures or build scripts with embedded exfiltration logic
  • Configs that instruct tooling to phone home

Wrapping the session in srt means these attempts are blocked at the OS level before any tool executes them, regardless of whether the AI detected the injection.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.