greywall
CLAUDE.md306 starsChanged 8 months agoApache-2.0View on GitHub
Deny-by-default command sandbox. Wraps commands with restricted filesystem access (current directory only by default) and transparent network redirection through greyproxy. Supports --learning mode to trace filesystem access and auto-generate config templates. Linux (bubblewrap + seccomp/Landlock/eBPF) and macOS (sandbox-exec Seatbelt profiles). Always run make fmt && make lint before committing. 4 direct deps: doublestar (glob matching), cobra (CLI), jsonc (config parsing), golang.org/x/sys. Runtime (Linux): bubblewrap, socat, embedded tun2socks v2.5.2. GitHub Actions workflows: main.yml (build/lint/test on Linux+macOS), release.yml (GoReleaser + SLSA provenance),…
In this repositoryOne other file it gives its agents.
- docs/agents.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 29
Always run make fmt && make lint before committing.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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.
Files
Greywall
Deny-by-default command sandbox. Wraps commands with restricted filesystem access (current directory only by default) and transparent network redirection through greyproxy. Supports --learning mode to trace filesystem access and auto-generate config templates. Linux (bubblewrap + seccomp/Landlock/eBPF) and macOS (sandbox-exec Seatbelt profiles).
Build & Run
make setup # install deps + lint tools (first time)
make build # compile binary (downloads tun2socks)
make run # build and run
./greywall --help # CLI usageTest
make test # all unit + integration tests
make test-ci # with coverage and race detection (-race -coverprofile)
GREYWALL_TEST_NETWORK=1 ./scripts/smoke_test.sh ./greywall # smoke testsLint & Format
make fmt # format with gofumpt
make lint # golangci-lint (staticcheck, errcheck, gosec, govet, revive, gofumpt, misspell, etc.)Always run make fmt && make lint before committing.
Project Structure
cmd/greywall/ CLI entry point
internal/
config/ Configuration loading & validation
platform/ OS detection
sandbox/ Platform-specific sandboxing (~7k lines)
manager.go Sandbox lifecycle orchestration
command.go Command blocking/allow lists
linux.go bubblewrap + bridges (ProxyBridge, DnsBridge)
macos.go sandbox-exec Seatbelt profiles
linux_seccomp.go Seccomp BPF syscall filtering
linux_landlock.go Landlock filesystem control
linux_ebpf.go eBPF violation monitoring
sanitize.go Environment variable hardening
dangerous.go Protected files/dirs lists
pkg/greywall/ Public Go API
docs/ Full documentation
scripts/ Smoke tests, benchmarks, releaseCode Conventions
- Language: Go 1.25+
- Formatter:
gofumpt(enforced in CI) - Linter:
golangci-lintv2 (config in.golangci.yml) - Import order: stdlib, third-party, local (
github.com/GreyhavenHQ/greywall) - Platform code: build tags (
//go:build linux,//go:build darwin) with*_stub.gofor unsupported platforms - Error handling: custom error types (e.g.,
CommandBlockedError) - Logging: stderr with
[greywall:component]prefixes - Config: JSON with comments (via
tidwall/jsonc), optional pointer fields for three-state booleans
Dependencies
4 direct deps: doublestar (glob matching), cobra (CLI), jsonc (config parsing), golang.org/x/sys.
Runtime (Linux): bubblewrap, socat, embedded tun2socks v2.5.2.
CI
GitHub Actions workflows: main.yml (build/lint/test on Linux+macOS), release.yml (GoReleaser + SLSA provenance), benchmark.yml.
Release
make release # patch (v0.0.X)
make release-minor # minor (v0.X.0)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
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.

