agentleFS
GreyhavenHQGreyhavenHQ/greywall/CLAUDE.md

greywall

CLAUDE.md289 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.

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
  1. Very specific:

    Always run make fmt && make lint before committing.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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.

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

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 usage

Test

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 tests

Lint & 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, release

Code Conventions

  • Language: Go 1.25+
  • Formatter: gofumpt (enforced in CI)
  • Linter: golangci-lint v2 (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.go for 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)

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.