agent-workspace-guard-sdk
In-process filesystem confinement and command-policy guardrails for autonomous coding agents.
| Size | Folder | Inside |
|---|---|---|
| 15.3 kB | src/ | 4 source files |
| 11.8 kB | tests/ | 2 test files |
| 2.5 kB | examples/ | 1 example |
| 30.4 kB | (root) | 15 docs · 2 config files |
| Size | Path |
|---|---|
| 30 B | .gitignore |
| 3.9 kB | ADVERSARIAL_TEST_MATRIX.md |
| 1.4 kB | AGENT_EVAL.md |
| 3 kB | ARCHITECTURE.md |
| 570 B | CHANGELOG.md |
| 506 B | DEPENDENCIES.md |
| 1.7 kB | LICENSE.md |
| 1.3 kB | LIMITATIONS.md |
| 2.5 kB | PREVIEW.md |
| 1.9 kB | QUICKSTART.md |
| 2.6 kB | README.md |
| 632 B | SECURITY_EVIDENCE.md |
| 775 B | SUPPORT.md |
| 1.7 kB | TEST_REPORT.md |
| 213 B | THIRD_PARTY_NOTICES.md |
| 3.6 kB | THREAT_MODEL.md |
| 417 B | VERIFICATION.md |
| 1.1 kB | commercial-manifest.json |
| 2.5 kB | examples/agent-runner-example.mjs |
| 2.5 kB | release-manifest.json |
| 5.1 kB | src/command-policy.mjs |
| 6.8 kB | src/filesystem-shield.mjs |
| 1.1 kB | src/index.d.ts |
| 2.3 kB | src/index.mjs |
| 7.1 kB | tests/adversarial-red-team.test.mjs |
| 4.6 kB | tests/adversarial-security.test.mjs |
Already bought this?
View your purchasesREADME
Agent Workspace Guard SDK
Filesystem confinement and command-policy guardrails for autonomous coding agents.
1. WHAT IS THIS?
The Agent Workspace Guard SDK is a lightweight, zero-dependency Node.js developer security library that prevents autonomous AI coding agents (such as tool-calling LLMs, Cursor extensions, Claude Code tools, or custom agents) from escaping their designated working directory or running dangerous host commands.
2. WHO IS IT FOR?
- Developers building autonomous coding agent workflows.
- DevSecOps engineers integrating AI agent tools into developer machines.
- SaaS platforms allowing AI agents to read and modify project files locally.
3. WHAT PROBLEM DOES IT SOLVE?
AI agents given shell and file-access tools can be tricked via prompt injection or unexpected planning into reading .env credentials, following symlinks outside the workspace, escaping with ../../, or executing destructive commands like rm -rf / or sudo. Heavy cloud microVMs (E2B, Modal) introduce 200ms+ network latency and $50–$200/mo cloud bills. This SDK provides in-process, sub-millisecond confinement directly in your Node.js runtime.
4. WHY PAY FOR IT INSTEAD OF BUILDING IT?
Writing ad-hoc regex or path checks fails on real-world edge cases: symlink race conditions (TOCTOU), Windows backslash traversal evasion (..\..\), multi-dot evasion (....//), shell chaining metacharacters (;, &&, |, $()), and command redirection (<, >). This SDK includes an independently verified, 110-case adversarial red-team test suite covering these exact attack vectors.
5. WHAT IS VERIFIED?
- 110 / 110 Adversarial Attack Cases Passed: Covering path traversal, symlink escapes, secret files, command chaining, and destructive command patterns.
- Zero External Runtime Dependencies: Built strictly on Node.js standard library (
node:fs,node:path,node:crypto). - Cryptographic Audit Log: Every command evaluation is chained using SHA-256 digests.
6. HOW DO I RUN IT?
# 1. Run the 110-case adversarial security test suite
node --test tests/adversarial-red-team.test.mjs
# 2. Run the interactive agent runner demonstration
node examples/agent-runner-example.mjs
Security scan report
Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from X402 Git are listed below.
- secrets
- none found
- X402 Git
- size limits
- within caps
- X402 Git
- known malware
- no dependency manifests to check
- OSV
- known vulnerabilities
- no dependency manifests to check
- OSV
- dependency behaviour
- no dependency manifests to check
- Socket
- instruction smuggling
- none found
- X402 Git
- what it can do
- listed below
- X402 Git
What this can do
- Tools
- none
- Runs
- nothing
- Talks to
- attacker.com
- malicious.org
- malicious.sh
- Reads
- no environment variables
- At install
- nothing runs
- Links to
- attacker.com
- img.shields.io
- malicious.sh
Findings (3)
- LOWtests/adversarial-red-team.test.mjs — Talks to attacker.com
- LOWtests/adversarial-security.test.mjs — Talks to malicious.org
- LOWtests/adversarial-red-team.test.mjs — Talks to malicious.sh
Releases 1
- v1.0.02026-09-16
release: v1.0.0 commercial source edition